summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-08-07 13:07:59 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-08-07 13:07:59 +0000
commitc56192dd999c079ebd935a6736315de3a5d60a05 (patch)
treef48b7bd376da3e2a8fdf8545fd09c4bf159d060e /plugins/DbEditorPP
parent4a3b0b63ac83dd08dc27336f9bcfb7387e2a2929 (diff)
useless variables removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@10114 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbEditorPP')
-rw-r--r--plugins/DbEditorPP/src/main.cpp29
1 files changed, 10 insertions, 19 deletions
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp
index 4bffb7ddee..1245c39541 100644
--- a/plugins/DbEditorPP/src/main.cpp
+++ b/plugins/DbEditorPP/src/main.cpp
@@ -12,8 +12,6 @@ BYTE nameOrder[NAMEORDERCOUNT];
HGENMENU hUserMenu;
WatchListArrayStruct WatchListArray;
MCONTACT hRestore;
-HANDLE sMenuCommand, sImport, sServicemodeLaunch;
-HANDLE hModulesLoadedHook = NULL, hSettingsChangedHook = NULL, hOptInitHook = NULL, hPreShutdownHook = NULL;
IconItem iconList[];
//========================
@@ -175,8 +173,6 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam)
hkd.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT | HOTKEYF_EXT, 'D');
Hotkey_Register(&hkd);
- UnhookEvent(hModulesLoadedHook);
-
usePopups = db_get_b(NULL, modname, "UsePopUps", 0);
// Load the name order
@@ -202,20 +198,15 @@ int PreShutdown(WPARAM wParam, LPARAM lParam)
if (hwnd2watchedVarsWindow) DestroyWindow(hwnd2watchedVarsWindow);
if (hwnd2mainWindow) DestroyWindow(hwnd2mainWindow);
if (hwnd2importWindow) DestroyWindow(hwnd2importWindow);
-
- UnhookEvent(hSettingsChangedHook);
- UnhookEvent(hOptInitHook);
- UnhookEvent(hPreShutdownHook);
-
- DestroyServiceFunction(sServicemodeLaunch);
- DestroyServiceFunction(sMenuCommand);
- DestroyServiceFunction(sImport);
return 0;
}
INT_PTR ServiceMode(WPARAM wParam, LPARAM lParam)
{
bServiceMode = TRUE;
+
+ HookEvent(ME_DB_CONTACT_SETTINGCHANGED, DBSettingChanged);
+
return SERVICE_ONLYDB; // load database and then call us
}
@@ -233,15 +224,15 @@ extern "C" __declspec(dllexport) int Load(void)
hRestore = NULL;
g_db = GetCurrentDatabase();
- hSettingsChangedHook = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, DBSettingChanged);
- hOptInitHook = HookEvent(ME_OPT_INITIALISE, OptInit);
- hPreShutdownHook = HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
- hModulesLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
+ HookEvent(ME_DB_CONTACT_SETTINGCHANGED, DBSettingChanged);
+ HookEvent(ME_OPT_INITIALISE, OptInit);
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
+ HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
- sMenuCommand = CreateServiceFunction("DBEditorpp/MenuCommand", DBEditorppMenuCommand);
- sImport = CreateServiceFunction("DBEditorpp/Import", ImportFromFile);
+ CreateServiceFunction("DBEditorpp/MenuCommand", DBEditorppMenuCommand);
+ CreateServiceFunction("DBEditorpp/Import", ImportFromFile);
- sServicemodeLaunch = CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceMode);
+ CreateServiceFunction(MS_SERVICEMODE_LAUNCH, ServiceMode);
// Ensure that the common control DLL is loaded.
INITCOMMONCONTROLSEX icex;