diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-04-30 08:20:16 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-04-30 08:20:16 +0000 |
commit | d373118fad0c3567cfce3817ce363176274a3930 (patch) | |
tree | 850aafb45079b7a6c7468a61a641e49c25db6af7 /protocols/Skype | |
parent | 53a415159610fdc005db6c3289bf614d25c3d78e (diff) |
added all own info exept timezone
git-svn-id: http://svn.miranda-ng.org/main/trunk@4571 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype')
-rw-r--r-- | protocols/Skype/res/Resource.rc | 44 | ||||
-rw-r--r-- | protocols/Skype/src/resource.h | 16 | ||||
-rw-r--r-- | protocols/Skype/src/skype_dialogs.cpp | 182 |
3 files changed, 234 insertions, 8 deletions
diff --git a/protocols/Skype/res/Resource.rc b/protocols/Skype/res/Resource.rc index 4c5eb2b759..8d86d3345a 100644 --- a/protocols/Skype/res/Resource.rc +++ b/protocols/Skype/res/Resource.rc @@ -120,6 +120,42 @@ BEGIN COMBOBOX IDC_LANGUAGE,58,46,86,52,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
LTEXT "About:",IDC_STATIC,5,90,51,8
EDITTEXT IDC_ABOUT,57,88,159,24,ES_MULTILINE | WS_VSCROLL
+ LTEXT "Mood:",IDC_STATIC,6,62,51,8
+ EDITTEXT IDC_MOOD,58,61,159,24,ES_MULTILINE | WS_VSCROLL
+END
+
+IDD_OWNINFO_CONTACT DIALOGEX 0, 0, 222, 132
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "E-mail 1:",IDC_STATIC,5,5,46,8
+ EDITTEXT IDC_EMAIL1,77,2,126,14,ES_AUTOHSCROLL
+ LTEXT "E-mail 2:",IDC_STATIC,5,21,46,8
+ EDITTEXT IDC_EMAIL2,77,17,126,14,ES_AUTOHSCROLL
+ LTEXT "E-mail 3:",IDC_STATIC,5,36,46,8
+ EDITTEXT IDC_EMAIL3,77,32,126,14,ES_AUTOHSCROLL
+ LTEXT "Mobile phone:",IDC_STATIC,5,68,67,8
+ EDITTEXT IDC_MOBPHONE,77,67,126,14,ES_AUTOHSCROLL
+ LTEXT "Home phone:",IDC_STATIC,5,83,67,8
+ EDITTEXT IDC_HOMEPHONE,77,82,126,14,ES_AUTOHSCROLL
+ LTEXT "Office phone:",IDC_STATIC,5,99,67,8
+ EDITTEXT IDC_OFFICEPHONE,77,97,126,14,ES_AUTOHSCROLL
+END
+
+IDD_OWNINFO_HOME DIALOGEX 0, 0, 222, 132
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ LTEXT "City:",IDC_STATIC,5,6,59,8
+ EDITTEXT IDC_CITY,67,4,75,12,ES_AUTOHSCROLL
+ LTEXT "State:",IDC_STATIC,5,20,59,8
+ EDITTEXT IDC_STATE,67,18,75,12,ES_AUTOHSCROLL
+ LTEXT "Country:",IDC_STATIC,5,33,59,8
+ COMBOBOX IDC_COUNTRY,67,31,91,172,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Timezone:",IDC_STATIC,6,47,59,8
+ COMBOBOX IDC_TIMEZONE,68,44,91,172,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
END
IDD_PASSWORD_CHANGE DIALOGEX 0, 0, 201, 90
@@ -172,6 +208,14 @@ BEGIN BEGIN
END
+ IDD_OWNINFO_CONTACT, DIALOG
+ BEGIN
+ END
+
+ IDD_OWNINFO_HOME, DIALOG
+ BEGIN
+ END
+
IDD_PASSWORD_CHANGE, DIALOG
BEGIN
LEFTMARGIN, 7
diff --git a/protocols/Skype/src/resource.h b/protocols/Skype/src/resource.h index 57d21f5aab..a8425e9e65 100644 --- a/protocols/Skype/src/resource.h +++ b/protocols/Skype/src/resource.h @@ -45,13 +45,27 @@ #define IDC_PASSWORD2 1023
#define IDC_INSTRUCTION3 1024
#define IDC_FULLNAME 1025
+#define IDC_EMAIL1 1025
#define IDC_BIRTH_DAY 1026
+#define IDC_EMAIL2 1026
#define IDC_BIRTH_MONTH 1027
+#define IDC_EMAIL3 1027
#define IDC_BIRTH_YEAR 1028
+#define IDC_MOBPHONE 1028
#define IDC_GENDER 1029
+#define IDC_HOMEPHONE 1029
#define IDC_HOMEPAGE 1030
+#define IDC_HOMEPHONE2 1030
+#define IDC_OFFICEPHONE 1030
#define IDC_LANGUAGE 1031
#define IDC_ABOUT 1034
+#define IDC_ABOUT2 1035
+#define IDC_MOOD 1035
+#define IDC_CITY 1036
+#define IDC_STATE 1037
+#define IDC_COUNTRY 1038
+#define IDC_COUNTRY2 1039
+#define IDC_TIMEZONE 1039
// Next default values for new objects
//
@@ -59,7 +73,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 110
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1025
+#define _APS_NEXT_CONTROL_VALUE 1029
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp index db11fcf337..d75aff64ca 100644 --- a/protocols/Skype/src/skype_dialogs.cpp +++ b/protocols/Skype/src/skype_dialogs.cpp @@ -419,7 +419,6 @@ INT_PTR CALLBACK CSkypeProto::SkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam static INT_PTR CALLBACK PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- const unsigned long iPageId = 0;
CSkypeProto *ppro = (CSkypeProto *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
@@ -458,9 +457,9 @@ static INT_PTR CALLBACK PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar {
const wchar_t* value = it->second.c_str();
SendMessage(GetDlgItem(hwndDlg, IDC_LANGUAGE), CB_ADDSTRING, 0, (LPARAM)TranslateTS(value));
- if ( !lang || !::wcslen(lang))
- if ( !lstrcmp(lang, value))
- SetDlgItemText(hwndDlg, IDC_LANGUAGE, TranslateTS(value));
+ int ii = it->second.compare(lang);
+ if(it->second.compare(lang) == 0)
+ SetDlgItemText(hwndDlg, IDC_LANGUAGE, TranslateTS(value));
}
DBVARIANT dbv;
if ( !db_get_ts(NULL, ppro->m_szModuleName, "Nick", &dbv)) {
@@ -484,6 +483,13 @@ static INT_PTR CALLBACK PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar else
SetDlgItemText(hwndDlg, IDC_ABOUT, _T(""));
+ if ( !db_get_ts(NULL, ppro->m_szModuleName, "XStatusMsg", &dbv)) {
+ SetDlgItemText(hwndDlg, IDC_MOOD, dbv.ptszVal);
+ db_free(&dbv);
+ }
+ else
+ SetDlgItemText(hwndDlg, IDC_ABOUT, _T(""));
+
BYTE b = db_get_b(NULL, ppro->m_szModuleName, "Gender", 0);
if (b = 'M')
SetDlgItemText(hwndDlg, IDC_GENDER, TranslateT("Male"));
@@ -505,7 +511,9 @@ static INT_PTR CALLBACK PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar case WM_COMMAND:
if (((HWND)lParam==GetFocus() && HIWORD(wParam)==EN_CHANGE) ||
- ((HWND)lParam==GetDlgItem(hwndDlg, IDC_GENDER) && (HIWORD(wParam)==CBN_EDITCHANGE||HIWORD(wParam)==CBN_SELCHANGE)))
+ (((HWND)lParam==GetDlgItem(hwndDlg, IDC_GENDER) || (HWND)lParam==GetDlgItem(hwndDlg, IDC_BIRTH_DAY) ||
+ (HWND)lParam==GetDlgItem(hwndDlg, IDC_BIRTH_MONTH) || (HWND)lParam==GetDlgItem(hwndDlg, IDC_BIRTH_YEAR) ||
+ (HWND)lParam==GetDlgItem(hwndDlg, IDC_LANGUAGE)) && (HIWORD(wParam)==CBN_EDITCHANGE||HIWORD(wParam)==CBN_SELCHANGE)))
{
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
@@ -515,14 +523,163 @@ static INT_PTR CALLBACK PersonalSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar if (((LPNMHDR)lParam)->idFrom == 0) {
switch (((LPNMHDR)lParam)->code) {
case PSN_PARAMCHANGED:
- SendMessage(hwndDlg, WM_INITDIALOG, 0, ((PSHNOTIFY*)lParam)->lParam);
+ SendMessage(hwndDlg, WM_INITDIALOG, 0, ((PSHNOTIFY *)lParam)->lParam);
+ break;
+ case PSN_APPLY:
+ //ppro->SaveVcardToDB(hwndDlg, iPageId);
+ //if ( !ppro->m_vCardUpdates)
+ // ppro->SetServerVcard(ppro->m_bPhotoChanged, ppro->m_szPhotoFileName);
+ break;
+ }
+ }
+ break;
+ }
+ return FALSE;
+}
+
+static INT_PTR CALLBACK ContactSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ CSkypeProto *ppro = (CSkypeProto *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+
+ switch (msg) {
+ case WM_INITDIALOG:
+ if (lParam) {
+ ppro = (CSkypeProto *)lParam;
+ TranslateDialogDefault(hwndDlg);
+
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
+
+ DBVARIANT dbv;
+ if ( !db_get_ts(NULL, ppro->m_szModuleName, "Cellular", &dbv)) {
+ SetDlgItemText(hwndDlg, IDC_MOBPHONE, dbv.ptszVal);
+ db_free(&dbv);
+ }
+ else
+ SetDlgItemText(hwndDlg, IDC_MOBPHONE, _T(""));
+
+ if ( !db_get_ts(NULL, ppro->m_szModuleName, "Phone", &dbv)) {
+ SetDlgItemText(hwndDlg, IDC_HOMEPHONE, dbv.ptszVal);
+ db_free(&dbv);
+ }
+ else
+ SetDlgItemText(hwndDlg, IDC_HOMEPHONE, _T(""));
+
+ if ( !db_get_ts(NULL, ppro->m_szModuleName, "CompanyPhone", &dbv)) {
+ SetDlgItemText(hwndDlg, IDC_OFFICEPHONE, dbv.ptszVal);
+ db_free(&dbv);
+ }
+ else
+ SetDlgItemText(hwndDlg, IDC_OFFICEPHONE, _T(""));
+
+ if ( !db_get_ts(NULL, ppro->m_szModuleName, "e-mail0", &dbv)) {
+ SetDlgItemText(hwndDlg, IDC_EMAIL1, dbv.ptszVal);
+ db_free(&dbv);
+ }
+ else
+ SetDlgItemText(hwndDlg, IDC_EMAIL1, _T(""));
+
+ if ( !db_get_ts(NULL, ppro->m_szModuleName, "e-mail1", &dbv)) {
+ SetDlgItemText(hwndDlg, IDC_EMAIL2, dbv.ptszVal);
+ db_free(&dbv);
+ }
+ else
+ SetDlgItemText(hwndDlg, IDC_EMAIL2, _T(""));
+
+ if ( !db_get_ts(NULL, ppro->m_szModuleName, "e-mail2", &dbv)) {
+ SetDlgItemText(hwndDlg, IDC_EMAIL3, dbv.ptszVal);
+ db_free(&dbv);
+ }
+ else
+ SetDlgItemText(hwndDlg, IDC_EMAIL3, _T(""));
+ }
+ break;
+
+ case WM_COMMAND:
+ if ((HWND)lParam == GetFocus() && HIWORD(wParam) == EN_CHANGE)
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+
+ case WM_NOTIFY:
+ if (((LPNMHDR)lParam)->idFrom == 0) {
+ switch (((LPNMHDR)lParam)->code) {
+ case PSN_PARAMCHANGED:
+ SendMessage(hwndDlg, WM_INITDIALOG, 0, ((PSHNOTIFY *)lParam)->lParam);
+ break;
+ case PSN_APPLY:
+ //ppro->SaveVcardToDB(hwndDlg, iPageId);
+ //if ( !ppro->m_vCardUpdates)
+ // ppro->SetServerVcard(ppro->m_bPhotoChanged, ppro->m_szPhotoFileName);
+ break;
+ }
+ }
+ break;
+ }
+ return FALSE;
+}
+
+static INT_PTR CALLBACK HomeSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ CSkypeProto *ppro = (CSkypeProto *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+
+ switch (msg) {
+ case WM_INITDIALOG:
+ if (lParam) {
+ ppro = (CSkypeProto *)lParam;
+ TranslateDialogDefault(hwndDlg);
+
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
+
+ DBVARIANT dbv;
+ if ( !db_get_ts(NULL, ppro->m_szModuleName, "City", &dbv)) {
+ SetDlgItemText(hwndDlg, IDC_CITY, dbv.ptszVal);
+ db_free(&dbv);
+ }
+ else
+ SetDlgItemText(hwndDlg, IDC_MOBPHONE, _T(""));
+
+ if ( !db_get_ts(NULL, ppro->m_szModuleName, "State", &dbv)) {
+ SetDlgItemText(hwndDlg, IDC_STATE, dbv.ptszVal);
+ db_free(&dbv);
+ }
+ else
+ SetDlgItemText(hwndDlg, IDC_STATE, _T(""));
+
+ int g_cbCountries;
+ struct CountryListEntry* g_countries;
+ CallService(MS_UTILS_GETCOUNTRYLIST, (WPARAM)&g_cbCountries, (LPARAM)&g_countries);
+ wchar_t *countr = ::db_get_wsa(NULL, ppro->m_szModuleName, "Country");
+ for (int i = 0; i < g_cbCountries; i++) {
+ if (g_countries[i].id != 0xFFFF && g_countries[i].id != 0) {
+ TCHAR *country = mir_a2t(g_countries[i].szName);
+ SendMessage(GetDlgItem(hwndDlg, IDC_COUNTRY), CB_ADDSTRING, 0, (LPARAM)TranslateTS(country));
+ if (_tcscmp(country, countr) == 0)
+ SetDlgItemText(hwndDlg, IDC_COUNTRY, TranslateTS(country));
+ mir_free(country);
+ }
+ }
+
+ tmi.prepareList((HANDLE)lParam, GetDlgItem(hwndDlg, IDC_TIMEZONE), TZF_PLF_CB);
+ }
+ break;
+
+ case WM_COMMAND:
+ if ((HWND)lParam == GetFocus() && HIWORD(wParam) == EN_CHANGE)
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ break;
+
+ case WM_NOTIFY:
+ if (((LPNMHDR)lParam)->idFrom == 0) {
+ switch (((LPNMHDR)lParam)->code) {
+ case PSN_PARAMCHANGED:
+ SendMessage(hwndDlg, WM_INITDIALOG, 0, ((PSHNOTIFY *)lParam)->lParam);
break;
case PSN_APPLY:
//ppro->SaveVcardToDB(hwndDlg, iPageId);
//if ( !ppro->m_vCardUpdates)
// ppro->SetServerVcard(ppro->m_bPhotoChanged, ppro->m_szPhotoFileName);
break;
- } }
+ }
+ }
break;
}
return FALSE;
@@ -550,8 +707,19 @@ int __cdecl CSkypeProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) UserInfo_AddPage(wParam, &odp);
}
} else {
+ odp.pfnDlgProc = ContactSkypeDlgProc;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OWNINFO_CONTACT);
+ odp.ptszTab = LPGENT("Contacts");
+ UserInfo_AddPage(wParam, &odp);
+
+ odp.pfnDlgProc = HomeSkypeDlgProc;
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OWNINFO_HOME);
+ odp.ptszTab = LPGENT("Home");
+ UserInfo_AddPage(wParam, &odp);
+
odp.pfnDlgProc = PersonalSkypeDlgProc;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OWNINFO_PERSONAL);
+ odp.ptszTab = LPGENT("General");
UserInfo_AddPage(wParam, &odp);
}
|