diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-11 21:53:08 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-11 21:53:08 +0000 |
commit | 2b982f8a1f23ae29136f62fb3819df50c281e19f (patch) | |
tree | 2bcd75424aa5187212a888fa57f1ff63a6baa8ae /plugins/DbEditorPP | |
parent | c25eab397cf1ab92b1d6fa5933a6981ba0409bd7 (diff) |
rest of minor TopToolbar_AddButton issues
git-svn-id: http://svn.miranda-ng.org/main/trunk@3981 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbEditorPP')
-rw-r--r-- | plugins/DbEditorPP/src/main.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index df3505c2e5..7bc8b290fa 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -12,7 +12,7 @@ HANDLE hUserMenu; HANDLE hRestore;
WatchListArrayStruct WatchListArray;
HANDLE sMenuCommand, sRegisterModule, sRegisterSingleModule, sImport, sServicemodeLaunch;
-HANDLE hModulesLoadedHook = NULL, hSettingsChangedHook=NULL, hOptInitHook=NULL, hPreShutdownHook=NULL, hTTBHook = NULL;
+HANDLE hModulesLoadedHook = NULL, hSettingsChangedHook=NULL, hOptInitHook=NULL, hPreShutdownHook=NULL;
//========================
// MirandaPluginInfo
@@ -141,17 +141,15 @@ BOOL IsCP_UTF8(void) static int OnTTBLoaded(WPARAM wParam,LPARAM lParam)
{
- TTBButton ttbb = {0};
HICON ico = LoadIcon(hInst, MAKEINTRESOURCE(ICO_DBE_BUTT));
- UnhookEvent(hTTBHook);
-
- ttbb.cbSize = sizeof(ttbb);
- ttbb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
- ttbb.pszService = "DBEditorpp/MenuCommand";
- ttbb.name = LPGEN("Database Editor++");
- ttbb.hIconUp = ico;
- ttbb.pszTooltipUp = LPGEN("Open Database Editor");
- hTTBButt = TopToolbar_AddButton(&ttbb);
+
+ TTBButton ttb = { sizeof(ttb) };
+ ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP;
+ ttb.pszService = "DBEditorpp/MenuCommand";
+ ttb.name = LPGEN("Database Editor++");
+ ttb.hIconUp = ico;
+ ttb.pszTooltipUp = LPGEN("Open Database Editor");
+ hTTBButt = TopToolbar_AddButton(&ttb);
return 0;
}
@@ -175,8 +173,7 @@ int ModulesLoaded(WPARAM wParam,LPARAM lParam) hUserMenu = Menu_AddContactMenuItem(&mi);
// Register hotkeys
- HOTKEYDESC hkd = {0};
- hkd.cbSize = sizeof(hkd);
+ HOTKEYDESC hkd = { sizeof(hkd) };
hkd.pszName = "hk_dbepp_open";
hkd.pszService = "DBEditorpp/MenuCommand";
hkd.ptszDescription = LPGEN("Open Database Editor");
@@ -235,7 +232,7 @@ int ModulesLoaded(WPARAM wParam,LPARAM lParam) DBFreeVariant(&dbv);
}
- hTTBHook = HookEvent(ME_TTB_MODULELOADED, OnTTBLoaded);
+ HookEvent(ME_TTB_MODULELOADED, OnTTBLoaded);
if ( bServiceMode )
CallService("DBEditorpp/MenuCommand",0,0);
|