diff options
author | slotwin <slotwin@users.noreply.github.com> | 2014-06-19 02:10:59 +0000 |
---|---|---|
committer | slotwin <slotwin@users.noreply.github.com> | 2014-06-19 02:10:59 +0000 |
commit | 67e3f0fb7e0ace16b2aae903d7f17beea95fafe0 (patch) | |
tree | fc1fd3d9d512287f0225cb72462697a9b6a869bb /plugins/Clist_nicer/src | |
parent | a80bdd6af923f74516a4ccdb0fb2c72f82c48df4 (diff) |
Clist_nicer: fix updating state of toggle buttons (internal toptoolbar and skin buttons) when settings were changed by other plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@9539 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src')
-rw-r--r-- | plugins/Clist_nicer/src/clc.cpp | 4 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clui.cpp | 3 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/contact.cpp | 6 |
3 files changed, 11 insertions, 2 deletions
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index a083760a2f..3788b87334 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -171,6 +171,10 @@ static int ClcSettingChanged(WPARAM hContact, LPARAM lParam) ClcSetButtonState(IDC_TBSOUND, cfg::dat.soundsOff ? BST_CHECKED : BST_UNCHECKED);
SetButtonStates(pcli->hwndContactList);
}
+ else if (!__strcmp(cws->szModule, "CList") && !__strcmp(cws->szSetting, "UseGroups")) {
+ ClcSetButtonState(IDC_TBHIDEGROUPS, cfg::getByte(cws->szModule, cws->szSetting, SETTING_USEGROUPS_DEFAULT));
+ SetButtonStates(pcli->hwndContactList);
+ }
else if (!__strcmp(cws->szModule, "TopToolBar") && !__strcmp(cws->szSetting, "UseFlatButton")) {
SetButtonToSkinned();
}
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index af7cf779c3..9b8263034c 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1566,7 +1566,8 @@ buttons_done: int newVal = !(GetWindowLongPtr(pcli->hwndContactTree, GWL_STYLE) & CLS_USEGROUPS);
cfg::writeByte("CList", "UseGroups", (BYTE)newVal);
SendMessage(pcli->hwndContactTree, CLM_SETUSEGROUPS, newVal, 0);
- CheckDlgButton(hwnd, IDC_TBHIDEGROUPS, newVal ? BST_CHECKED : BST_UNCHECKED);
+ ClcSetButtonState(IDC_TBHIDEGROUPS, newVal);
+ SetButtonStates(hwnd);
}
break;
case POPUP_HIDEMIRANDA:
diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp index f28d97019b..be94835dbd 100644 --- a/plugins/Clist_nicer/src/contact.cpp +++ b/plugins/Clist_nicer/src/contact.cpp @@ -267,15 +267,19 @@ int CompareContacts(const ClcContact* c1, const ClcContact* c2) int SetHideOffline(WPARAM wParam, LPARAM lParam)
{
+ int newVal = (int)wParam;
switch ((int)wParam) {
case 0:
cfg::writeByte("CList", "HideOffline", 0); break;
case 1:
cfg::writeByte("CList", "HideOffline", 1); break;
case -1:
- cfg::writeByte("CList", "HideOffline", (BYTE) ! cfg::getByte("CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)); break;
+ newVal = !cfg::getByte("CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT);
+ cfg::writeByte("CList", "HideOffline", (BYTE)newVal);
+ break;
}
SetButtonStates(pcli->hwndContactList);
+ ClcSetButtonState(IDC_TBHIDEOFFLINE, newVal);
LoadContactTree();
return 0;
}
|