diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-11-26 21:10:31 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-11-26 21:10:31 +0000 |
commit | 8cf41c81a5445f29198fdc214544dd27259187bc (patch) | |
tree | 624c94f04bd679bea1e9367b477164801aa09ffc | |
parent | 56471987f0e6e39594e426637eea74cc7853bad1 (diff) |
partly viewing of own info
git-svn-id: http://svn.miranda-ng.org/main/trunk@2513 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/Skype/src/skype_dialogs.cpp | 91 |
1 files changed, 52 insertions, 39 deletions
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp index 256628679a..759caec82e 100644 --- a/protocols/Skype/src/skype_dialogs.cpp +++ b/protocols/Skype/src/skype_dialogs.cpp @@ -324,50 +324,63 @@ INT_PTR CALLBACK CSkypeProto::OwnSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa switch(msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- HWND hwndList = GetDlgItem(hwndDlg, IDC_LIST);
- ListView_SetExtendedListViewStyle(hwndList, LVS_EX_FULLROWSELECT);
- // 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);
- wchar_t *text;
- switch(setting[lvi.iItem].dbType) {
- DBVARIANT dbv;
- case DBVT_WCHAR:
- //text = this->GetSettingString(setting[lvi.iItem].szDbSetting);
- /*if ( !DBGetContactSettingWString(NULL, "Skype_1", setting[lvi.iItem].szDbSetting, &dbv)) {
- text = mir_tstrdup(dbv.pwszVal);
- db_free(&dbv);
- }*/
+ break;
+ case WM_NOTIFY:
+ switch (((LPNMHDR)lParam)->idFrom) {
+ case 0:
+ switch (((LPNMHDR)lParam)->code) {
+ case PSN_PARAMCHANGED:
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (( PSHNOTIFY* )lParam )->lParam );
break;
- case DBVT_BYTE:
- //text = (wchar_t*)ppro->GetSettingByte(setting[lvi.iItem].szDbSetting);
- break;
- case DBVT_WORD:
- //text = (wchar_t*)ppro->GetSettingWord(setting[lvi.iItem].szDbSetting);
+
+ case PSN_INFOCHANGED:
+ {
+ CSkypeProto* ppro = (CSkypeProto*)::GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ if (!ppro)
+ break;
+
+ HWND hwndList = GetDlgItem(hwndDlg, IDC_LIST);
+ ListView_SetExtendedListViewStyle(hwndList, LVS_EX_FULLROWSELECT);
+ // 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);
+ wchar_t *text = L"";
+ switch(setting[lvi.iItem].dbType) {
+ case DBVT_WCHAR:
+ text = ppro->GetSettingString(setting[lvi.iItem].szDbSetting);
+ break;
+ case DBVT_BYTE:
+ //text = (wchar_t*)ppro->GetSettingByte(setting[lvi.iItem].szDbSetting);
+ break;
+ case DBVT_WORD:
+ //text = (wchar_t*)ppro->GetSettingWord(setting[lvi.iItem].szDbSetting);
+ break;
+ }
+ ListView_SetItemText(hwndList, lvi.iItem, 1, text);
+ }
+ }
break;
}
- ListView_SetItemText(hwndList, lvi.iItem, 1, text);
+ break;
}
-
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- return TRUE;
+ break;
}
return FALSE;
}
|