summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_opt.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-06-05 16:11:08 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-06-05 16:11:08 +0000
commiteec361608fde60d63fe4511e26e3b95c7f72be13 (patch)
tree0263d1829438c7778a713ee2ae6bbda27c0d260a /protocols/JabberG/src/jabber_opt.cpp
parent7e822f45eccd034e7acd8d868ce5dc8c55458ff0 (diff)
- fix for #1059;
- direct unsafe work with icons replaces with Window_SetIcon_IcoLib / Window_SetSkinIcon_IcoLib; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@16917 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_opt.cpp')
-rw-r--r--protocols/JabberG/src/jabber_opt.cpp57
1 files changed, 27 insertions, 30 deletions
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp
index 8130aa286c..28e5f33660 100644
--- a/protocols/JabberG/src/jabber_opt.cpp
+++ b/protocols/JabberG/src/jabber_opt.cpp
@@ -1393,45 +1393,42 @@ static INT_PTR CALLBACK JabberRosterOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wP
CJabberProto *ppro = (CJabberProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
+ case WM_INITDIALOG:
+ ppro = (CJabberProto*)lParam;
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
+
+ TranslateDialogDefault(hwndDlg);
+ WindowSetIcon(hwndDlg, ppro, "Agents");
+
+ Utils_RestoreWindowPosition(hwndDlg, NULL, ppro->m_szModuleName, "rosterCtrlWnd_");
+
+ ListView_SetExtendedListViewStyle(GetDlgItem(hwndDlg, IDC_ROSTER), LVS_EX_CHECKBOXES | LVS_EX_BORDERSELECT /*| LVS_EX_FULLROWSELECT*/ | LVS_EX_GRIDLINES /*| LVS_EX_HEADERDRAGDROP*/);
+ mir_subclassWindow(GetDlgItem(hwndDlg, IDC_ROSTER), _RosterNewListProc);
+ _RosterListClear(hwndDlg);
+ ppro->rrud.hwndDlg = hwndDlg;
+ ppro->rrud.bReadyToDownload = TRUE;
+ ppro->rrud.bReadyToUpload = FALSE;
+ SendMessage(hwndDlg, JM_STATUSCHANGED, 0, 0);
+ return TRUE;
+
case JM_STATUSCHANGED:
{
int count = ListView_GetItemCount(GetDlgItem(hwndDlg, IDC_ROSTER));
EnableWindow(GetDlgItem(hwndDlg, IDC_DOWNLOAD), ppro->m_bJabberOnline);
EnableWindow(GetDlgItem(hwndDlg, IDC_UPLOAD), count && ppro->m_bJabberOnline);
EnableWindow(GetDlgItem(hwndDlg, IDC_EXPORT), count > 0);
- break;
- }
- case WM_CLOSE:
- {
- DestroyWindow(hwndDlg);
- break;
- }
- case WM_DESTROY:
- {
- Utils_SaveWindowPosition(hwndDlg, NULL, ppro->m_szModuleName, "rosterCtrlWnd_");
- ppro->rrud.hwndDlg = NULL;
- WindowFreeIcon(hwndDlg);
- break;
}
- case WM_INITDIALOG:
- {
- ppro = (CJabberProto*)lParam;
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
-
- TranslateDialogDefault(hwndDlg);
- WindowSetIcon(hwndDlg, ppro, "Agents");
+ break;
- Utils_RestoreWindowPosition(hwndDlg, NULL, ppro->m_szModuleName, "rosterCtrlWnd_");
+ case WM_CLOSE:
+ DestroyWindow(hwndDlg);
+ break;
- ListView_SetExtendedListViewStyle(GetDlgItem(hwndDlg, IDC_ROSTER), LVS_EX_CHECKBOXES | LVS_EX_BORDERSELECT /*| LVS_EX_FULLROWSELECT*/ | LVS_EX_GRIDLINES /*| LVS_EX_HEADERDRAGDROP*/);
- mir_subclassWindow(GetDlgItem(hwndDlg, IDC_ROSTER), _RosterNewListProc);
- _RosterListClear(hwndDlg);
- ppro->rrud.hwndDlg = hwndDlg;
- ppro->rrud.bReadyToDownload = TRUE;
- ppro->rrud.bReadyToUpload = FALSE;
- SendMessage(hwndDlg, JM_STATUSCHANGED, 0, 0);
- }
- return TRUE;
+ case WM_DESTROY:
+ Utils_SaveWindowPosition(hwndDlg, NULL, ppro->m_szModuleName, "rosterCtrlWnd_");
+ ppro->rrud.hwndDlg = NULL;
+ Window_FreeIcon_IcoLib(hwndDlg);
+ break;
case WM_GETMINMAXINFO:
{