summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src/contact.cpp
diff options
context:
space:
mode:
authorslotwin <slotwin@users.noreply.github.com>2014-06-19 02:10:59 +0000
committerslotwin <slotwin@users.noreply.github.com>2014-06-19 02:10:59 +0000
commit67e3f0fb7e0ace16b2aae903d7f17beea95fafe0 (patch)
treefc1fd3d9d512287f0225cb72462697a9b6a869bb /plugins/Clist_nicer/src/contact.cpp
parenta80bdd6af923f74516a4ccdb0fb2c72f82c48df4 (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/contact.cpp')
-rw-r--r--plugins/Clist_nicer/src/contact.cpp6
1 files changed, 5 insertions, 1 deletions
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;
}