summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorslotwin <slotwin@users.noreply.github.com>2014-07-02 17:47:12 +0000
committerslotwin <slotwin@users.noreply.github.com>2014-07-02 17:47:12 +0000
commite7458122db4351169a72743a5757dd1c3f3314c9 (patch)
tree44219acf5d9cd53b8f1552be06086120b80c4976 /plugins
parent1c72964e83bec9aea7ec2de859397a070598232f (diff)
TopToolBar: fix 'Show/hide offline contacts' button (call service function with proper param)
git-svn-id: http://svn.miranda-ng.org/main/trunk@9648 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/TopToolBar/src/InternalButtons.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp
index 8f49bae9f4..b264584ba6 100644
--- a/plugins/TopToolBar/src/InternalButtons.cpp
+++ b/plugins/TopToolBar/src/InternalButtons.cpp
@@ -5,6 +5,7 @@
#define TTBI_SOUNDSONOFF "TTBInternal/SoundsOnOFF"
#define TTBI_MAINMENUBUTT "TTBInternal/MainMenuBUTT"
#define TTBI_STATUSMENUBUTT "TTBInternal/StatusMenuButt"
+#define TTBI_SHOWHIDEOFFLINE "TTBInternal/ShowHideOffline"
#define INDEX_OFFLINE 5
#define INDEX_META 6
@@ -26,7 +27,7 @@ static stdButtons[] = {
{ LPGEN("Show accounts manager"), "Protos/ShowAccountManager", SKINICON_OTHER_ACCMGR, 0, LPGEN("Show accounts manager"), NULL, 0, 0 },
{ LPGEN("Find/add contacts"), MS_FINDADD_FINDADD, SKINICON_OTHER_FINDUSER, 0, LPGEN("Find/add contacts"), NULL, 0, 1 },
{ LPGEN("Show status menu"), TTBI_STATUSMENUBUTT, SKINICON_OTHER_STATUS, 0, LPGEN("Show status menu"), NULL, 0, 0 },
- { LPGEN("Show/hide offline contacts"), MS_CLIST_SETHIDEOFFLINE, IDI_HIDEOFFLINE, IDI_SHOWOFFLINE, LPGEN("Hide offline contacts"), LPGEN("Show offline contacts"), 1, 1 },
+ { LPGEN("Show/hide offline contacts"), TTBI_SHOWHIDEOFFLINE, IDI_HIDEOFFLINE, IDI_SHOWOFFLINE, LPGEN("Hide offline contacts"), LPGEN("Show offline contacts"), 1, 1 },
{ LPGEN("Enable/disable metacontacts"), "MetaContacts/OnOff", IDI_METAOFF, IDI_METAON, LPGEN("Disable metacontacts"), LPGEN("Enable metacontacts"), 1, 1 },
{ LPGEN("Enable/disable groups"), TTBI_GROUPSHOWHIDE, IDI_GROUPSOFF, IDI_GROUPSON, LPGEN("Enable groups"), LPGEN("Disable groups"), 1, 1 },
{ LPGEN("Enable/disable sounds"), TTBI_SOUNDSONOFF, IDI_SOUNDSOFF, IDI_SOUNDSON, LPGEN("Disable sounds"), LPGEN("Enable sounds"), 1, 1 },
@@ -95,6 +96,12 @@ INT_PTR TTBInternalSoundsOnOff(WPARAM wParam, LPARAM lParam)
return 0;
}
+INT_PTR TTBInternalShowHideOffline(WPARAM wParam, LPARAM lParam)
+{
+ CallService(MS_CLIST_SETHIDEOFFLINE, -1, 0);
+ return 0;
+}
+
///////////////////////////////////////////////////////////////////////////////
void InitInternalButtons()
@@ -105,6 +112,7 @@ void InitInternalButtons()
CreateServiceFunction(TTBI_SOUNDSONOFF, TTBInternalSoundsOnOff);
CreateServiceFunction(TTBI_MAINMENUBUTT, TTBInternalMainMenuButt);
CreateServiceFunction(TTBI_STATUSMENUBUTT, TTBInternalStatusMenuButt);
+ CreateServiceFunction(TTBI_SHOWHIDEOFFLINE, TTBInternalShowHideOffline);
for (int i = 0; i < SIZEOF(stdButtons); i++) {
TTBButton ttb = {0};