summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_nicer')
-rw-r--r--plugins/Clist_nicer/src/clc.cpp4
-rw-r--r--plugins/Clist_nicer/src/clui.cpp3
-rw-r--r--plugins/Clist_nicer/src/contact.cpp6
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;
}