diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-11-18 14:06:20 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-11-18 14:06:20 +0000 |
commit | eb7b026241099ac8c5d6e3b295df8cb88c1cf276 (patch) | |
tree | 6cbe2812d84c4719d759db62976d4fb2b265ae46 /protocols/Skype/src | |
parent | e73b0c15407c45faa15963485aa218f6820893e5 (diff) |
some code for own info
git-svn-id: http://svn.miranda-ng.org/main/trunk@2353 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Skype/src')
-rw-r--r-- | protocols/Skype/src/skype_dialogs.cpp | 34 | ||||
-rw-r--r-- | protocols/Skype/src/skype_profile.cpp | 19 | ||||
-rw-r--r-- | protocols/Skype/src/skype_proto.h | 32 |
3 files changed, 83 insertions, 2 deletions
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp index 4e57273320..092a17f927 100644 --- a/protocols/Skype/src/skype_dialogs.cpp +++ b/protocols/Skype/src/skype_dialogs.cpp @@ -321,6 +321,40 @@ INT_PTR CALLBACK CSkypeProto::SkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam INT_PTR CALLBACK CSkypeProto::OwnSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
+ switch(msg) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault(hwndDlg);
+ HWND hwndList = GetDlgItem(hwndDlg, IDC_LIST);
+ ListView_SetExtendedListViewStyle(hwndList, LVS_EX_FULLROWSELECT);
+ /*LOGFONT lf;
+ GetObject((HFONT)SendMessage(hwndList, WM_GETFONT, 0, 0), sizeof(lf), &lf);
+ lf.lfHeight -= 5;
+ HFONT hFont = CreateFontIndirect(&lf);
+ SendMessage(hwndList, WM_SETFONT, (WPARAM)hFont, 0);*/
+ // Prepare ListView Columns
+ LV_COLUMN lvc = {0};
+ RECT rc;
+ GetClientRect(hwndList, &rc);
+ rc.right -= GetSystemMetrics(SM_CXVSCROLL);
+ lvc.mask = LVCF_WIDTH;
+ lvc.cx = rc.right / 3;
+ ListView_InsertColumn(hwndList, 0, &lvc);
+ lvc.cx = rc.right - lvc.cx;
+ ListView_InsertColumn(hwndList, 1, &lvc);
+ // Prepare Setting Items
+ LV_ITEM lvi = {0};
+ lvi.mask = LVIF_PARAM | LVIF_TEXT;
+
+ for (lvi.iItem = 0; lvi.iItem < SIZEOF(setting); lvi.iItem++)
+ {
+ lvi.lParam = lvi.iItem;
+ lvi.pszText = (LPTSTR)setting[lvi.iItem].szDescription;
+ ListView_InsertItem(hwndList, &lvi);
+ }
+
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ return TRUE;
+ }
return FALSE;
}
diff --git a/protocols/Skype/src/skype_profile.cpp b/protocols/Skype/src/skype_profile.cpp index a0e72d1f37..1554c47114 100644 --- a/protocols/Skype/src/skype_profile.cpp +++ b/protocols/Skype/src/skype_profile.cpp @@ -2,7 +2,7 @@ void CSkypeProto::UpdateOwnAvatar()
{
- uint newTS = 0;
+ /*uint newTS = 0;
this->account->GetPropAvatarTimestamp(newTS);
DWORD oldTS = this->GetSettingDword("AvatarTS");
if (newTS > oldTS)
@@ -31,7 +31,7 @@ void CSkypeProto::UpdateOwnAvatar() }
delete path;
}
- }
+ }*/
}
void CSkypeProto::UpdateOwnBirthday()
@@ -278,6 +278,17 @@ void CSkypeProto::UpdateOwnTimezone() this->DeleteSetting("TimeZone");
}
+void CSkypeProto::UpdateOwnAbout()
+{
+ SEString data;
+ this->account->GetPropAbout(data);
+ wchar_t* about = ::mir_utf8decodeW((const char*)data);
+ if (wcscmp(about, L"") == 0)
+ this->DeleteSetting("About");
+ else
+ this->SetSettingString("About", about);
+ ::mir_free(about);
+}
void CSkypeProto::UpdateOwnProfile()
{
uint newTS = 0;
@@ -300,6 +311,7 @@ void CSkypeProto::UpdateOwnProfile() this->UpdateOwnState();
this->UpdateOwnStatusMessage();
this->UpdateOwnTimezone();
+ this->UpdateOwnAbout();
this->SetSettingDword("ProfileTS", newTS);
}
@@ -359,6 +371,9 @@ void CSkypeProto::OnAccountChanged(int prop) case CAccount::P_FULLNAME:
this->UpdateOwnNickName();
break;
+ case CAccount::P_ABOUT:
+ this->UpdateOwnAbout();
+ break;
}
}
diff --git a/protocols/Skype/src/skype_proto.h b/protocols/Skype/src/skype_proto.h index 9df51105cf..19f8d35657 100644 --- a/protocols/Skype/src/skype_proto.h +++ b/protocols/Skype/src/skype_proto.h @@ -24,6 +24,37 @@ struct LanguagesListEntry { char ISOcode[3];
};
+struct SettingItem
+{
+ const TCHAR *szDescription;
+ const char *szDbSetting;
+};
+
+const SettingItem setting[]={
+ {LPGENT("Full name"), "Nick"},
+ {LPGENT("Mood"), "XStatusMsg"},
+
+ {LPGENT("Mobile phone"), "Cellular"},
+ {LPGENT("Home phone"), "Phone"},
+ {LPGENT("Office phone"), "CompanyPhone"},
+ {LPGENT("E-mail 1"), "e-mail0"},
+ {LPGENT("E-mail 2"), "e-mail1"},
+ {LPGENT("E-mail 3"), "e-mail2"},
+
+ {LPGENT("Country"), "Country"},
+ {LPGENT("State"), "State"},
+ {LPGENT("City"), "City"},
+ {LPGENT("Time zone"), "Timezone"},
+ {LPGENT("Homepage"), "Homepage"},
+ {LPGENT("Gender"), "Gender"},
+ {LPGENT("Birth day"), "BirthDay"},
+ {LPGENT("Birth month"), "BirthMonth"},
+ {LPGENT("Birth year"), "BirthYear"},
+ {LPGENT("Language"), "Language1"},
+
+ {LPGENT("About"), "About"}
+};
+
struct CSkypeProto : public PROTO_INTERFACE, public MZeroedObject
{
public:
@@ -193,6 +224,7 @@ protected: void UpdateOwnStatusMessage();
void UpdateOwnTimezone();
void UpdateOwnProfile();
+ void UpdateOwnAbout();
void OnAccountChanged(int prop);
|