diff options
Diffstat (limited to 'plugins/AsSingleWindow/src/AsSingleWindow.cpp')
-rw-r--r-- | plugins/AsSingleWindow/src/AsSingleWindow.cpp | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/plugins/AsSingleWindow/src/AsSingleWindow.cpp b/plugins/AsSingleWindow/src/AsSingleWindow.cpp index ef96b0e7f3..f4fd623e24 100644 --- a/plugins/AsSingleWindow/src/AsSingleWindow.cpp +++ b/plugins/AsSingleWindow/src/AsSingleWindow.cpp @@ -2,19 +2,20 @@ #include "AsSingleWindow.h" #include "Options.h" #include "WindowsManager.h" +#include "version.h" CLIST_INTERFACE *pcli; int hLangpack; PLUGININFOEX pluginInfo = { - sizeof(PLUGININFOEX), // PLUGININFOEX - "AsSingleWindow", - PLUGIN_MAKE_VERSION(0, 1, 2, 1), - "Makes easier windows manipulation: allows you to move, minimize and activate Miranda's windows as if it were a single window.", - "Aleksey Smyrnov aka Soar", - "i@soar.name", - "© Soar, 2010-2011", - "http://soar.name/tag/assinglewindow/", + sizeof(PLUGININFOEX), + __PLUGIN_NAME, + PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM), + __DESCRIPTION, + __AUTHOR, + __AUTHOREMAIL, + __COPYRIGHT, + __AUTHORWEB, UNICODE_AWARE, {0xF6C73B4, 0x2B2B, 0x711D, {0xFB, 0xB6, 0xBB, 0x26, 0x7D, 0xFD, 0x72, 0x08}}, // 0xF6C73B42B2B711DFBB6BB267DFD7208 }; @@ -27,12 +28,6 @@ bool WINAPI DllMain(HINSTANCE hInstDLL, DWORD, LPVOID) return true; } -static const MUUID interfaces[] = {MIID_CLIST, MIID_SRMM, MIID_LAST}; -extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) -{ - return interfaces; -} - extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { return &pluginInfo; @@ -45,17 +40,14 @@ extern "C" __declspec(dllexport) int Load(void) ::InitializeCriticalSection(&pluginVars.m_CS); pluginVars.IsUpdateInProgress = false; - pluginVars.heModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); - pluginVars.heOptionsLoaded = HookEvent(ME_OPT_INITIALISE, InitOptions); + HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); + HookEvent(ME_OPT_INITIALISE, InitOptions); return 0; } extern "C" __declspec(dllexport) int Unload(void) { - UnhookEvent(pluginVars.heOptionsLoaded); - UnhookEvent(pluginVars.heModulesLoaded); - ::DeleteCriticalSection(&pluginVars.m_CS); return 0; @@ -66,7 +58,7 @@ int OnModulesLoaded(WPARAM, LPARAM) HWND hWndCListWindow = pcli->hwndContactList; windowAdd(hWndCListWindow, true); - pluginVars.heMsgWndEvent = HookEvent(ME_MSG_WINDOWEVENT, MsgWindowEvent); + HookEvent(ME_MSG_WINDOWEVENT, MsgWindowEvent); optionsLoad(); @@ -83,14 +75,12 @@ int MsgWindowEvent(WPARAM, LPARAM lParam) switch (data->uType) { - // Здесь можно отлавливать только открытие окна, - // т.к. закрытие может быть закрытием вкладки - case MSG_WINDOW_EVT_OPEN: - windowAdd(data->hwndWindow, false); - break; + // Здесь можно отлавливать только открытие окна, + // т.к. закрытие может быть закрытием вкладки + case MSG_WINDOW_EVT_OPEN: + windowAdd(data->hwndWindow, false); + break; } return 0; } - -// end of file
\ No newline at end of file |