summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Actman/ua/i_uaplaces.inc4
-rw-r--r--plugins/NewsAggregator/Src/Services.cpp2
-rw-r--r--plugins/QuickSearch/quicksearch.dpr4
-rw-r--r--plugins/QuickSearch/sr_global.pas6
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp22
-rw-r--r--plugins/TranslitSwitcher/src/TranslitSwitcher.cpp8
-rw-r--r--plugins/mRadio/i_hotkey.inc5
7 files changed, 10 insertions, 41 deletions
diff --git a/plugins/Actman/ua/i_uaplaces.inc b/plugins/Actman/ua/i_uaplaces.inc
index 6ea5113bc8..e103793ab2 100644
--- a/plugins/Actman/ua/i_uaplaces.inc
+++ b/plugins/Actman/ua/i_uaplaces.inc
@@ -231,9 +231,7 @@ end;
procedure DeleteCoreHotkey(var ActionItem:tMyActionItem);
begin
- if // bCoreHotkeyPresents and
- // (ServiceExists(MS_HOTKEY_UNREGISTER)<>0) and
- ((ActionItem.flags and UAF_HKREGGED)<>0) then
+ if ((ActionItem.flags and UAF_HKREGGED)<>0) then
begin
CallService(MS_HOTKEY_UNREGISTER,0,LParam(ActionItem.szNameID));
ActionItem.flags:=ActionItem.flags and not UAF_HKREGGED;
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp
index 8e1bb31bfa..c021e5f6fa 100644
--- a/plugins/NewsAggregator/Src/Services.cpp
+++ b/plugins/NewsAggregator/Src/Services.cpp
@@ -69,8 +69,6 @@ int NewsAggrPreShutdown(WPARAM, LPARAM)
KillTimer(NULL, timerId);
NetlibUnInit();
-
- CallService(MS_HOTKEY_UNREGISTER, 0, (LPARAM)"NewsAggregator/CheckAllFeeds");
return 0;
}
diff --git a/plugins/QuickSearch/quicksearch.dpr b/plugins/QuickSearch/quicksearch.dpr
index c712d74d88..2a6ce5742b 100644
--- a/plugins/QuickSearch/quicksearch.dpr
+++ b/plugins/QuickSearch/quicksearch.dpr
@@ -180,11 +180,9 @@ end;
function Unload:integer;cdecl;
begin
result:=0;
- removetoolbar; //??
+ removetoolbar;
DestroyFrame;
-// unreghotkeys;
-
CloseSrWindow;
clear_columns(qsopt.columns);
diff --git a/plugins/QuickSearch/sr_global.pas b/plugins/QuickSearch/sr_global.pas
index b827aba32b..0abc91cf62 100644
--- a/plugins/QuickSearch/sr_global.pas
+++ b/plugins/QuickSearch/sr_global.pas
@@ -113,7 +113,6 @@ type
procedure reghotkeys;
-procedure unreghotkeys;
procedure saveopt_wnd;
procedure loadopt_wnd;
@@ -198,11 +197,6 @@ begin
CallService(MS_HOTKEY_REGISTER,0,lparam(@hkrec));
end;
-procedure unreghotkeys;
-begin
- CallService(MS_HOTKEY_UNREGISTER,0,lparam(HKN_GLOBAL));
-end;
-
procedure removetoolbar;
begin
if hTTBButton<>0 then
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index 8adffbdbef..3f672f890c 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -223,8 +223,6 @@ DLL_EXPORT PLUGININFOEX* MirandaPluginInfoEx(DWORD)
return const_cast<PLUGININFOEX*>(&pluginInfo);
}
/// hooks
-static HANDLE m_hookModulesLoaded = 0;
-static HANDLE m_hookSystemPreShutdown = 0;
int hook_ModulesLoaded(WPARAM, LPARAM)
{
g_myGlobals.PopupExist = ServiceExists(MS_POPUP_ADDPOPUPT);
@@ -268,11 +266,13 @@ DLL_EXPORT int Load(void)
return 1;
}
/// hook events
- m_hookModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, hook_ModulesLoaded);
- m_hookSystemPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, hook_SystemPreShutdown);
+ HookEvent(ME_SYSTEM_MODULESLOADED, hook_ModulesLoaded);
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, hook_SystemPreShutdown);
+
/// icons
Icon_Register(g_hSendSS, SZ_SENDSS, ICONS, sizeof(ICONS) / sizeof(IconItem), SZ_SENDSS);
Icon_Register(g_hSendSS, SZ_SENDSS "/" LPGEN("Buttons"), ICONS_BTN, sizeof(ICONS_BTN) / sizeof(IconItem), SZ_SENDSS);
+
/// services
#define srv_reg(name) do{\
m_h##name=CreateServiceFunction(SZ_SENDSS "/" #name, service_##name);\
@@ -327,16 +327,8 @@ DLL_EXPORT int Load(void)
* Called by Miranda when it will exit or when the plugin gets deselected
*/
DLL_EXPORT int Unload(void)
-{//as "ghazan" says, it's useless to unregister services or unhook events, let's still do it for now :P
- CallService(MS_HOTKEY_UNREGISTER, 0, (LPARAM)"Open SendSS+");
- /// deregister services
-#define srv_dereg(name) do{ if(m_h##name) DestroyServiceFunction(m_h##name),m_h##name=0; }while(0)
- srv_dereg(OpenCaptureDialog);
- srv_dereg(SendDesktop);
- srv_dereg(EditBitmap);
- srv_dereg(Send2ImageShack);
- if (m_hookModulesLoaded) UnhookEvent(m_hookModulesLoaded), m_hookModulesLoaded = 0;
- if (m_hookSystemPreShutdown) UnhookEvent(m_hookSystemPreShutdown), m_hookSystemPreShutdown = 0;
- if (g_clsTargetHighlighter) UnregisterClass((TCHAR*)g_clsTargetHighlighter, g_hSendSS), g_clsTargetHighlighter = 0;
+{
+ if (g_clsTargetHighlighter)
+ UnregisterClass((TCHAR*)g_clsTargetHighlighter, g_hSendSS), g_clsTargetHighlighter = 0;
return 0;
}
diff --git a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp
index 1dcd9f4b71..1d86857b02 100644
--- a/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp
+++ b/plugins/TranslitSwitcher/src/TranslitSwitcher.cpp
@@ -136,16 +136,10 @@ int OnPreShutdown(WPARAM, LPARAM)
bbd.dwButtonID = 1;
bbd.dwDefPos = 50;
CallService(MS_BB_REMOVEBUTTON, 0, (LPARAM)&bbd);
-
}
- CallService(MS_HOTKEY_UNREGISTER, 0, (LPARAM)"TranslitSwitcher/ConvertAllOrSelected");
- CallService(MS_HOTKEY_UNREGISTER, 0, (LPARAM)"TranslitSwitcher/ConvertLastOrSelected");
- CallService(MS_HOTKEY_UNREGISTER, 0, (LPARAM)"TranslitSwitcher/TranslitAllOrSelected");
- CallService(MS_HOTKEY_UNREGISTER, 0, (LPARAM)"TranslitSwitcher/TranslitLastOrSelected");
- CallService(MS_HOTKEY_UNREGISTER, 0, (LPARAM)"TranslitSwitcher/InvertCaseAllOrSelected");
- CallService(MS_HOTKEY_UNREGISTER, 0, (LPARAM)"TranslitSwitcher/InvertCaseLastOrSelected");
return 0;
}
+
//-------------------------------------------------------------------------------------------------------
extern "C" __declspec(dllexport) int Load(void)
diff --git a/plugins/mRadio/i_hotkey.inc b/plugins/mRadio/i_hotkey.inc
index 7ec4cf766b..9797b61f1c 100644
--- a/plugins/mRadio/i_hotkey.inc
+++ b/plugins/mRadio/i_hotkey.inc
@@ -61,10 +61,5 @@ end;
procedure UnregisterHotKey;
begin
- CallService(MS_HOTKEY_UNREGISTER,0,lparam(HKN_PLAYPAUSE));
- CallService(MS_HOTKEY_UNREGISTER,0,lparam(HKN_STOP));
- CallService(MS_HOTKEY_UNREGISTER,0,lparam(HKN_MUTE));
- CallService(MS_HOTKEY_UNREGISTER,0,lparam(HKN_RECORD));
-
DestroyServiceFunction(hRadioHotkey);
end;