summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-09-21 21:57:05 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-09-21 21:57:05 +0000
commit706a2bf1ba1917107feb9e8ce76fa41c3b141272 (patch)
tree2b8465ce3d8c525a030f34b9f2234bf995e7b921 /plugins/Clist_modern
parentdde8a903731848145c6f05a51aea57771c2ef006 (diff)
more correct version of the previous fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@1629 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r--plugins/Clist_modern/src/modern_toolbar.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp
index 9b7101b216..ce407edc96 100644
--- a/plugins/Clist_modern/src/modern_toolbar.cpp
+++ b/plugins/Clist_modern/src/modern_toolbar.cpp
@@ -306,17 +306,6 @@ void CustomizeToolbar(HWND hwnd)
pMTBInfo->mtbXPTheme = xpt_AddThemeHandle(hwnd, L"TOOLBAR");
}
-static int Toolbar_ModulesLoaded(WPARAM, LPARAM)
-{
- CallService(MS_BACKGROUNDCONFIG_REGISTER, (WPARAM)"ToolBar Background/ToolBar",0);
- HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ehhToolBarSettingsChanged);
- HookEvent(ME_BACKGROUNDCONFIG_CHANGED, ehhToolBarBackgroundSettingsChanged);
- HookEvent(ME_TTB_INITBUTTONS, Modern_InitButtons);
- return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
#define TTB_OPTDIR "TopToolBar"
#if defined(WIN64)
@@ -332,8 +321,13 @@ static void CopySettings(const char* to, const char* from)
db_set_b(NULL, TTB_OPTDIR, to, db_get_b(NULL,"ModernToolBar",from, 0));
}
-HRESULT ToolbarLoadModule()
+static int Toolbar_ModulesLoaded(WPARAM, LPARAM)
{
+ CallService(MS_BACKGROUNDCONFIG_REGISTER, (WPARAM)"ToolBar Background/ToolBar",0);
+ HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ehhToolBarSettingsChanged);
+ HookEvent(ME_BACKGROUNDCONFIG_CHANGED, ehhToolBarBackgroundSettingsChanged);
+ HookEvent(ME_TTB_INITBUTTONS, Modern_InitButtons);
+
BYTE bOldSetting = db_get_b(NULL, "CLUI", "ShowButtonBar", 255);
if (bOldSetting != 255) {
CopySettings("BUTTWIDTH", "option_Bar0_BtnWidth");
@@ -345,13 +339,19 @@ HRESULT ToolbarLoadModule()
db_unset(NULL, "CLUI", "ShowButtonBar");
CallService(MS_DB_MODULE_DELETE, 0, (LPARAM)"ModernToolBar");
-
- if ( !ServiceExists( MS_TTB_REMOVEBUTTON)) {
+ }
+ if ( !ServiceExists( MS_TTB_REMOVEBUTTON)) {
if (bOldSetting == 1)
if (IDYES == MessageBox(NULL, TranslateTS(szWarning), TranslateT("Toolbar upgrade"), MB_ICONQUESTION | MB_YESNO))
CallService(MS_UTILS_OPENURL, 0, (LPARAM)szUrl);
- } }
+ }
+ return 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+HRESULT ToolbarLoadModule()
+{
ehhToolBarBackgroundSettingsChanged(0,0);
HookEvent(ME_SYSTEM_MODULESLOADED, Toolbar_ModulesLoaded);
return S_OK;