diff options
Diffstat (limited to 'plugins/ChangeKeyboardLayout')
-rw-r--r-- | plugins/ChangeKeyboardLayout/src/commonheaders.h | 1 | ||||
-rw-r--r-- | plugins/ChangeKeyboardLayout/src/hook_events.cpp | 12 | ||||
-rw-r--r-- | plugins/ChangeKeyboardLayout/src/main.cpp | 14 |
3 files changed, 15 insertions, 12 deletions
diff --git a/plugins/ChangeKeyboardLayout/src/commonheaders.h b/plugins/ChangeKeyboardLayout/src/commonheaders.h index 3692b5a59b..1160595f75 100644 --- a/plugins/ChangeKeyboardLayout/src/commonheaders.h +++ b/plugins/ChangeKeyboardLayout/src/commonheaders.h @@ -110,5 +110,6 @@ extern MainOptions moOptions; extern PopupOptions poOptions, poOptionsTemp;
LRESULT CALLBACK Keyboard_Hook(int code, WPARAM wParam, LPARAM lParam);
+int OnIconsChanged(WPARAM wParam, LPARAM lParam);
#endif
\ No newline at end of file diff --git a/plugins/ChangeKeyboardLayout/src/hook_events.cpp b/plugins/ChangeKeyboardLayout/src/hook_events.cpp index 5033843923..8253c9c7ab 100644 --- a/plugins/ChangeKeyboardLayout/src/hook_events.cpp +++ b/plugins/ChangeKeyboardLayout/src/hook_events.cpp @@ -93,12 +93,6 @@ int OnIconsChanged(WPARAM wParam, LPARAM lParam) return 0;
}
-static IconItem iconList[] =
-{
- { LPGEN("Popup"), "ckl_popup_icon", IDI_POPUPICON },
- { LPGEN("Copy to clipboard"), "ckl_copy_icon", IDI_COPYICON }
-};
-
int ModulesLoaded(WPARAM wParam, LPARAM lParam)
{
LPCTSTR ptszEmptySting = _T("");
@@ -138,12 +132,6 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) hGetLayoutOfText = CreateServiceFunction(MS_CKL_GETLAYOUTOFTEXT, APIGetLayoutOfText);
hChangeTextLayout = CreateServiceFunction(MS_CKL_CHANGETEXTLAYOUT, APIChangeTextLayout);
- // IcoLib support
- Icon_Register(hInst, ModuleName, iconList, SIZEOF(iconList));
-
- HookEvent(ME_SKIN2_ICONSCHANGED, OnIconsChanged);
-
- OnIconsChanged(0, 0);
RegPopupActions();
db_set_dw(NULL, ModuleName, "CurrentVer", PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM));
diff --git a/plugins/ChangeKeyboardLayout/src/main.cpp b/plugins/ChangeKeyboardLayout/src/main.cpp index f2ea678b30..ae2c9e9a88 100644 --- a/plugins/ChangeKeyboardLayout/src/main.cpp +++ b/plugins/ChangeKeyboardLayout/src/main.cpp @@ -43,6 +43,12 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda return &pluginInfoEx;
}
+static IconItem iconList[] =
+{
+ { LPGEN("Popup"), "ckl_popup_icon", IDI_POPUPICON },
+ { LPGEN("Copy to clipboard"), "ckl_copy_icon", IDI_COPYICON }
+};
+
extern "C" __declspec(dllexport) int Load(void)
{
mir_getLP(&pluginInfoEx);
@@ -53,6 +59,14 @@ extern "C" __declspec(dllexport) int Load(void) HookEvent(ME_OPT_INITIALISE, OnOptionsInitialise);
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
+
+ // IcoLib support
+ Icon_Register(hInst, ModuleName, iconList, SIZEOF(iconList));
+
+ HookEvent(ME_SKIN2_ICONSCHANGED, OnIconsChanged);
+
+ OnIconsChanged(0, 0);
+
return 0;
}
|