diff options
author | George Hazan <george.hazan@gmail.com> | 2012-09-27 19:35:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-09-27 19:35:36 +0000 |
commit | c23145643c47428677da6a42f3185b94968fddf1 (patch) | |
tree | 12a03568f3b2f0ce8f2756801c9b781dd4df978a /plugins/Clist_nicer/src/cluiservices.cpp | |
parent | c94b07138f148a4ee92313e8a57e5725d51fe1b4 (diff) |
clutch for TopToolBar not to destroy buttons on Apply in options
git-svn-id: http://svn.miranda-ng.org/main/trunk@1691 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src/cluiservices.cpp')
-rw-r--r-- | plugins/Clist_nicer/src/cluiservices.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp index d5cba25d3d..9572935020 100644 --- a/plugins/Clist_nicer/src/cluiservices.cpp +++ b/plugins/Clist_nicer/src/cluiservices.cpp @@ -240,26 +240,28 @@ void CluiProtocolStatusChanged( int parStatus, const char* szProto ) * status mode button
*/
- if (szStatus) {
- if (pcli->hwndContactList && IsWindow(GetDlgItem(pcli->hwndContactList, IDC_TBGLOBALSTATUS))) {
- HWND hwndTtbStatus = ClcGetButtonWindow(IDC_TBTOPSTATUS);
-
- SendMessage(GetDlgItem(pcli->hwndContactList, IDC_TBGLOBALSTATUS), WM_SETTEXT, 0, (LPARAM) szStatus);
- if (!hIcon) {
- SendMessage(GetDlgItem(pcli->hwndContactList, IDC_TBGLOBALSTATUS), BUTTONSETIMLICON, (WPARAM) hCListImages, (LPARAM) iIcon);
- if (g_ButtonItems == NULL && hwndTtbStatus)
- SendMessage( hwndTtbStatus, BUTTONSETIMLICON, (WPARAM) hCListImages, (LPARAM) iIcon);
- }
- else {
- SendMessage(GetDlgItem(pcli->hwndContactList, IDC_TBGLOBALSTATUS), BM_SETIMAGE, IMAGE_ICON, (LPARAM) hIcon);
- if (g_ButtonItems == NULL && hwndTtbStatus)
+ if (szStatus && pcli->hwndContactList) {
+ HWND hwndClistBtn = GetDlgItem(pcli->hwndContactList, IDC_TBGLOBALSTATUS);
+ if ( IsWindow(hwndClistBtn)) {
+ SendMessage(hwndClistBtn, WM_SETTEXT, 0, (LPARAM) szStatus);
+ if (!hIcon)
+ SendMessage(hwndClistBtn, BUTTONSETIMLICON, (WPARAM) hCListImages, (LPARAM) iIcon);
+ else
+ SendMessage(hwndClistBtn, BM_SETIMAGE, IMAGE_ICON, (LPARAM) hIcon);
+ InvalidateRect(hwndClistBtn, NULL, TRUE);
+ }
+
+ HWND hwndTtbStatus = ClcGetButtonWindow(IDC_TBTOPSTATUS);
+ if ( IsWindow(hwndTtbStatus)) {
+ if (g_ButtonItems == NULL) {
+ if (!hIcon)
+ SendMessage(hwndTtbStatus, BUTTONSETIMLICON, (WPARAM) hCListImages, (LPARAM) iIcon);
+ else
SendMessage(hwndTtbStatus, BM_SETIMAGE, IMAGE_ICON, (LPARAM) hIcon);
}
- InvalidateRect(GetDlgItem(pcli->hwndContactList, IDC_TBGLOBALSTATUS), NULL, TRUE);
- if (hwndTtbStatus)
- InvalidateRect(hwndTtbStatus, NULL, TRUE);
- SFL_Update(hIcon, iIcon, hCListImages, szStatus, TRUE);
+ InvalidateRect(hwndTtbStatus, NULL, TRUE);
}
+ SFL_Update(hIcon, iIcon, hCListImages, szStatus, TRUE);
}
return;
}
|