From 0c1bb6ed8a95c6820d59756d5da52c86affd6f1f Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Tue, 18 Sep 2012 18:48:23 +0000 Subject: Restart: renamed to cpp git-svn-id: http://svn.miranda-ng.org/main/trunk@1599 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Restart/Restart.vcxproj | 4 +- plugins/Restart/Restart.vcxproj.filters | 2 +- plugins/Restart/src/restart.c | 79 --------------------------------- plugins/Restart/src/restart.cpp | 79 +++++++++++++++++++++++++++++++++ 4 files changed, 82 insertions(+), 82 deletions(-) delete mode 100644 plugins/Restart/src/restart.c create mode 100644 plugins/Restart/src/restart.cpp diff --git a/plugins/Restart/Restart.vcxproj b/plugins/Restart/Restart.vcxproj index 44b0b82cad..72d29f8ace 100644 --- a/plugins/Restart/Restart.vcxproj +++ b/plugins/Restart/Restart.vcxproj @@ -26,7 +26,7 @@ DynamicLibrary false - MultiByte + Unicode true @@ -250,7 +250,7 @@ - + diff --git a/plugins/Restart/Restart.vcxproj.filters b/plugins/Restart/Restart.vcxproj.filters index 9010c77480..9dc9aa73c4 100644 --- a/plugins/Restart/Restart.vcxproj.filters +++ b/plugins/Restart/Restart.vcxproj.filters @@ -17,7 +17,7 @@ - + Source Files diff --git a/plugins/Restart/src/restart.c b/plugins/Restart/src/restart.c deleted file mode 100644 index a36ba08b4c..0000000000 --- a/plugins/Restart/src/restart.c +++ /dev/null @@ -1,79 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include "resource.h" - -HINSTANCE hInst; -HANDLE hIconHandle; -int hLangpack; - -PLUGININFOEX pluginInfo={ - sizeof(PLUGININFOEX), - "Restart plugin", - PLUGIN_MAKE_VERSION(0,0,6,0), - "Adds Restart menu item", - "(..нужное вписать..)", - "ep@eugn.me", - "© 2008 - 2012 -=J-Scar=-", - "http://miranda.im", - UNICODE_AWARE, - 0x61bedf3a, 0xcc2, 0x41a3, { 0xb9, 0x80, 0xbb, 0x93, 0x93, 0x36, 0x89, 0x35 } // {61BEDF3A-0CC2-41a3-B980-BB9393368935} -}; - -BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) -{ - hInst = hinstDLL; - return TRUE; -} - -static INT_PTR RestartMenuCommand(WPARAM wParam,LPARAM lParam) -{ - CallService("Miranda/System/Restart",0,0); - return 0; -} - -__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) -{ - return &pluginInfo; -} - -int __declspec(dllexport) Load(void) -{ - SKINICONDESC sid = {0}; - CLISTMENUITEM mi = {0}; - TCHAR szFile[MAX_PATH]; - - // IcoLib support - GetModuleFileName(hInst, szFile, MAX_PATH); - sid.pszDefaultFile = szFile; - sid.cbSize = sizeof(sid); - - sid.pszSection = "Restart Plugin"; - sid.pszDescription = "Restart"; - sid.pszName = "rst_restart_icon"; - sid.iDefaultIndex = -IDI_RESTARTICON; - hIconHandle = Skin_AddIcon(&sid); - - CreateServiceFunction("RestartPlug/MenuCommand",RestartMenuCommand); - - mi.cbSize = sizeof(mi); - mi.position = -0x7FFFFFFF; - mi.flags = CMIF_ICONFROMICOLIB; - mi.icolibItem = hIconHandle; - mi.pszName="Restart"; - mi.pszService="RestartPlug/MenuCommand"; - Menu_AddMainMenuItem(&mi); - Menu_AddTrayMenuItem(&mi); - return 0; -} - - -int __declspec(dllexport) Unload(void) -{ - return 0; -} \ No newline at end of file diff --git a/plugins/Restart/src/restart.cpp b/plugins/Restart/src/restart.cpp new file mode 100644 index 0000000000..a36ba08b4c --- /dev/null +++ b/plugins/Restart/src/restart.cpp @@ -0,0 +1,79 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "resource.h" + +HINSTANCE hInst; +HANDLE hIconHandle; +int hLangpack; + +PLUGININFOEX pluginInfo={ + sizeof(PLUGININFOEX), + "Restart plugin", + PLUGIN_MAKE_VERSION(0,0,6,0), + "Adds Restart menu item", + "(..нужное вписать..)", + "ep@eugn.me", + "© 2008 - 2012 -=J-Scar=-", + "http://miranda.im", + UNICODE_AWARE, + 0x61bedf3a, 0xcc2, 0x41a3, { 0xb9, 0x80, 0xbb, 0x93, 0x93, 0x36, 0x89, 0x35 } // {61BEDF3A-0CC2-41a3-B980-BB9393368935} +}; + +BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) +{ + hInst = hinstDLL; + return TRUE; +} + +static INT_PTR RestartMenuCommand(WPARAM wParam,LPARAM lParam) +{ + CallService("Miranda/System/Restart",0,0); + return 0; +} + +__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +{ + return &pluginInfo; +} + +int __declspec(dllexport) Load(void) +{ + SKINICONDESC sid = {0}; + CLISTMENUITEM mi = {0}; + TCHAR szFile[MAX_PATH]; + + // IcoLib support + GetModuleFileName(hInst, szFile, MAX_PATH); + sid.pszDefaultFile = szFile; + sid.cbSize = sizeof(sid); + + sid.pszSection = "Restart Plugin"; + sid.pszDescription = "Restart"; + sid.pszName = "rst_restart_icon"; + sid.iDefaultIndex = -IDI_RESTARTICON; + hIconHandle = Skin_AddIcon(&sid); + + CreateServiceFunction("RestartPlug/MenuCommand",RestartMenuCommand); + + mi.cbSize = sizeof(mi); + mi.position = -0x7FFFFFFF; + mi.flags = CMIF_ICONFROMICOLIB; + mi.icolibItem = hIconHandle; + mi.pszName="Restart"; + mi.pszService="RestartPlug/MenuCommand"; + Menu_AddMainMenuItem(&mi); + Menu_AddTrayMenuItem(&mi); + return 0; +} + + +int __declspec(dllexport) Unload(void) +{ + return 0; +} \ No newline at end of file -- cgit v1.2.3