diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2013-09-01 17:46:03 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2013-09-01 17:46:03 +0000 |
commit | 7dcd1e659b4bd69b806e8aa9d8a112ef8a73d3e5 (patch) | |
tree | 9b40dfc12df37d0b3e31ab3b632f14c27b99e58a /plugins/TabSRMM | |
parent | af3d167f9c00d4ca3543f13014f537976a3c7b6d (diff) |
- own toptoolbar support for tabsrmm
git-svn-id: http://svn.miranda-ng.org/main/trunk@5894 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r-- | plugins/TabSRMM/src/commonheaders.h | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 21 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.h | 1 |
3 files changed, 23 insertions, 0 deletions
diff --git a/plugins/TabSRMM/src/commonheaders.h b/plugins/TabSRMM/src/commonheaders.h index 9392bbf7fa..403bde5359 100644 --- a/plugins/TabSRMM/src/commonheaders.h +++ b/plugins/TabSRMM/src/commonheaders.h @@ -86,6 +86,7 @@ #include <m_timezones.h>
#include <m_modernopt.h>
#include <m_xstatus.h>
+#include <m_toptoolbar.h>
#include <m_ieview.h>
#include <m_popup2.h>
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 3a4ece8828..48d35ce01b 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -309,6 +309,26 @@ void CGlobals::hookSystemEvents() HookEvent(ME_AV_MYAVATARCHANGED, ::MyAvatarChanged);
}
+int CGlobals::TopToolbarLoaded(WPARAM,LPARAM)
+{
+ TTBButton ttb = {0};
+ ttb.cbSize = sizeof(ttb);
+ ttb.dwFlags = TTBBF_SHOWTOOLTIP | TTBBF_VISIBLE;
+ ttb.pszService = MS_TABMSG_TRAYSUPPORT;
+ ttb.name = "CLN_slist";
+ ttb.pszTooltipUp = LPGEN("tabSRMM session list");
+ ttb.hIconHandleUp = Skin_GetIcon("tabSRMM_sb_slist");
+ TopToolbar_AddButton(&ttb);
+
+ ttb.name = "CLN_menu";
+ ttb.pszTooltipUp = LPGEN("tabSRMM Menu");
+ ttb.lParamUp = ttb.lParamDown = 1;
+ ttb.hIconHandleUp = Skin_GetIcon("tabSRMM_container");
+ TopToolbar_AddButton(&ttb);
+
+ return 0;
+}
+
/**
* second part of the startup initialisation. All plugins are now fully loaded
*/
@@ -386,6 +406,7 @@ int CGlobals::ModulesLoaded(WPARAM wParam, LPARAM lParam) HookEvent(ME_MC_UNFORCESEND, MetaContactEvent);
}
HookEvent(ME_FONT_RELOAD, ::FontServiceFontsChanged);
+ HookEvent(ME_TTB_MODULELOADED, TopToolbarLoaded);
return 0;
}
diff --git a/plugins/TabSRMM/src/globals.h b/plugins/TabSRMM/src/globals.h index a45c18bac3..9e841f3eec 100644 --- a/plugins/TabSRMM/src/globals.h +++ b/plugins/TabSRMM/src/globals.h @@ -181,6 +181,7 @@ private: static int m_exLine;
static bool m_exAllowContinue;
private:
+ static int TopToolbarLoaded(WPARAM,LPARAM);
static int ModulesLoaded(WPARAM wParam, LPARAM lParam);
static int DBSettingChanged(WPARAM wParam, LPARAM lParam);
static int DBContactDeleted(WPARAM wParam, LPARAM lParam);
|