diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-11-27 20:39:38 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-11-27 20:39:38 +0000 |
commit | 28795392422af10036b0545815133691e124a33a (patch) | |
tree | 05978e6eb8ef65a0a0878cec091e064fd3263bc7 | |
parent | 04d04bf8722015d92f4b097fbc6d0df44ee492b6 (diff) |
fixed gender showing
git-svn-id: http://svn.miranda-ng.org/main/trunk@2528 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/Skype/src/skype_dialogs.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp index bf023d4c49..4e65d5a495 100644 --- a/protocols/Skype/src/skype_dialogs.cpp +++ b/protocols/Skype/src/skype_dialogs.cpp @@ -368,10 +368,21 @@ INT_PTR CALLBACK CSkypeProto::OwnSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa break;
case DBVT_BYTE:
{
- wchar_t tmp[10];
- _ltot(ppro->GetSettingByte(setting[lvi.iItem].szDbSetting), tmp, 10);
- text = mir_tstrdup(tmp);
- //text = (wchar_t*)ppro->GetSettingByte(setting[lvi.iItem].szDbSetting);
+ if (!strcmp(setting[lvi.iItem].szDbSetting, "Gender")) {
+ switch(ppro->GetSettingByte(setting[lvi.iItem].szDbSetting)) {
+ case 'M':
+ text = L"Male";
+ break;
+ case 'F':
+ text = L"Female";
+ break;
+ }
+ //} else if (!strcmp(setting[lvi.iItem].szDbSetting, "Timezone")) {
+ } else {
+ wchar_t tmp[10];
+ _ltot(ppro->GetSettingByte(setting[lvi.iItem].szDbSetting), tmp, 10);
+ text = mir_tstrdup(tmp);
+ }
break;
}
case DBVT_WORD:
@@ -384,7 +395,7 @@ INT_PTR CALLBACK CSkypeProto::OwnSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa }
}
ListView_SetItemText(hwndList, lvi.iItem, 1, text);
- if (setting[lvi.iItem].dbType != DBVT_WCHAR)
+ if (setting[lvi.iItem].dbType == DBVT_WORD || (strcmp(setting[lvi.iItem].szDbSetting, "Gender") && setting[lvi.iItem].dbType == DBVT_BYTE))
mir_free(text);
}
}
|