summaryrefslogtreecommitdiff
path: root/plugins/StatusPlugins/StartupStatus
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-10 12:45:32 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-10 12:45:32 +0000
commit6ac63284a8f93f977db66673727d4995a86764c4 (patch)
tree79d7e0b6744e1de21e6c01c0b0869be8927621a1 /plugins/StatusPlugins/StartupStatus
parent102a413497df49bd2af8ee0a1770718fa0ecfcc2 (diff)
various TTB initialization issues
git-svn-id: http://svn.miranda-ng.org/main/trunk@3957 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/StartupStatus')
-rw-r--r--plugins/StatusPlugins/StartupStatus/profiles.cpp3
-rw-r--r--plugins/StatusPlugins/StartupStatus/startupstatus.h1
-rw-r--r--plugins/StatusPlugins/StartupStatus/toolbars.cpp10
3 files changed, 4 insertions, 10 deletions
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp
index aa417e7672..c38364fd8d 100644
--- a/plugins/StatusPlugins/StartupStatus/profiles.cpp
+++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp
@@ -377,8 +377,7 @@ int LoadProfileModule()
int InitProfileModule()
{
- if ((hTTBModuleLoadedHook = HookEvent(ME_TTB_MODULELOADED, CreateTopToolbarButtons)) != NULL)
- RegisterButtons();
+ hTTBModuleLoadedHook = HookEvent(ME_TTB_MODULELOADED, CreateTopToolbarButtons);
HookEvent( ME_CLIST_PREBUILDSTATUSMENU, CreateMainMenuItems);
diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.h b/plugins/StatusPlugins/StartupStatus/startupstatus.h
index f76f1a468a..a54be8f70c 100644
--- a/plugins/StatusPlugins/StartupStatus/startupstatus.h
+++ b/plugins/StatusPlugins/StartupStatus/startupstatus.h
@@ -156,7 +156,6 @@ INT_PTR GetProfileName(WPARAM wParam, LPARAM lParam);
extern HANDLE hTTBModuleLoadedHook;
void RemoveTopToolbarButtons();
int CreateTopToolbarButtons(WPARAM wParam, LPARAM lParam);
-void RegisterButtons();
int LoadProfileModule();
int InitProfileModule();
diff --git a/plugins/StatusPlugins/StartupStatus/toolbars.cpp b/plugins/StatusPlugins/StartupStatus/toolbars.cpp
index 6d9c62ea1d..ffabfcd152 100644
--- a/plugins/StatusPlugins/StartupStatus/toolbars.cpp
+++ b/plugins/StatusPlugins/StartupStatus/toolbars.cpp
@@ -44,6 +44,9 @@ void RemoveTopToolbarButtons()
int CreateTopToolbarButtons(WPARAM wParam, LPARAM lParam)
{
+ if (iconList[0].hIcolib == NULL)
+ Icon_Register(hInst, "Toolbar/StartupStatus", iconList, SIZEOF(iconList));
+
int profileCount = CallService(MS_SS_GETPROFILECOUNT, 0, 0);
TTBButton ttb = { 0 };
@@ -72,10 +75,3 @@ int CreateTopToolbarButtons(WPARAM wParam, LPARAM lParam)
}
return 0;
}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
-void RegisterButtons()
-{
- Icon_Register(hInst, "Toolbar/StartupStatus", iconList, SIZEOF(iconList));
-}