From 5ab173a0cbc02e0a35c33f33c4ff9dd8a1754bb9 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 23 Jun 2012 14:34:26 +0000 Subject: ProfileManager: renamed to .cpp git-svn-id: http://svn.miranda-ng.org/main/trunk@559 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/ProfileManager/pmanagerEx.c | 120 ---------------------------------- plugins/ProfileManager/pmanagerEx.cpp | 120 ++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+), 120 deletions(-) delete mode 100644 plugins/ProfileManager/pmanagerEx.c create mode 100644 plugins/ProfileManager/pmanagerEx.cpp diff --git a/plugins/ProfileManager/pmanagerEx.c b/plugins/ProfileManager/pmanagerEx.c deleted file mode 100644 index 6556478e25..0000000000 --- a/plugins/ProfileManager/pmanagerEx.c +++ /dev/null @@ -1,120 +0,0 @@ -/* -Miranda plugin template, originally by Richard Hughes -http://miranda-icq.sourceforge.net/ - -This file is placed in the public domain. Anybody is free to use or -modify it as they wish with no restriction. -There is no warranty. -*/ -#define MIRANDA_VER 0x0A00 - -#include -#include - -#include -#include -#include -#include -#include - -#include "resource.h" - -HINSTANCE hInst; -PLUGINLINK *pluginLink; -TCHAR fn[MAX_PATH]; -TCHAR lmn[MAX_PATH]; -TCHAR* pathn; -int hLangpack; - -PLUGININFOEX pluginInfo={ - sizeof(PLUGININFOEX), - "Miranda IM Profile Changer", - PLUGIN_MAKE_VERSION(0,0,0,3), - "Adds a menu item to change or load a different profile of Miranda IM.", - "Roman Gemini", - "woobind@ukr.net", - "© 2008 - 2010 Roman Gemini", - "http://code.google.com/p/alfamar/", - 0, //not transient - 0, //doesn't replace anything built-in - // Generate your own unique id for your plugin. - // Do not use this UUID! - // Use uuidgen.exe to generate the uuuid - {0x7eeeb55e, 0x9d83, 0x4e1a, { 0xa1, 0x2f, 0x8f, 0x13, 0xf1, 0xa1, 0x24, 0xfb } } - -}; - -__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) -{ - return &pluginInfo; -} - -/////////////////////////////////////////////////////////////////////////////// - -BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) -{ - hInst=hinstDLL; - return TRUE; -} - -/////////////////////////////////////////////////////////////////////////////// - -static const MUUID interfaces[] = {MIID_TESTPLUGIN, MIID_LAST}; -__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) -{ - return interfaces; -} - -/////////////////////////////////////////////////////////////////////////////// - -static INT_PTR ChangePM(WPARAM wParam,LPARAM lParam) -{ - GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn)); - ShellExecute(0, "open", fn, "/FORCESHOW", "", 1); - CallService("CloseAction", 0, 0); - return 0; -} - -static INT_PTR LoadPM(WPARAM wParam,LPARAM lParam) -{ - GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn)); - ShellExecute(0, "open", fn, "/FORCESHOW", "", 1); - return 0; -} - -int __declspec(dllexport) Load(PLUGINLINK *link) -{ - CLISTMENUITEM mi; - pluginLink=link; - mir_getLP(&pluginInfo); - - CreateServiceFunction("Database/LoadPM",LoadPM); - ZeroMemory(&mi,sizeof(mi)); - mi.cbSize=sizeof(mi); - mi.position=-500200000; - mi.flags=0; - mi.hIcon=LoadIcon(hInst, MAKEINTRESOURCE(IDI_LoadPM)); - mi.pszPopupName = "Database"; - mi.pszName=LPGEN("Load profile"); - mi.pszService="Database/LoadPM"; - Menu_AddMainMenuItem(&mi); - - CreateServiceFunction("Database/ChangePM",ChangePM); - ZeroMemory(&mi,sizeof(mi)); - mi.cbSize=sizeof(mi); - mi.position=-500200000; - mi.flags=0; - mi.hIcon=LoadIcon(hInst, MAKEINTRESOURCE(IDI_ChangePM)); - mi.pszPopupName = "Database"; - mi.pszName=LPGEN("Change profile"); - mi.pszService="Database/ChangePM"; - Menu_AddMainMenuItem(&mi); - return 0; -} - -/////////////////////////////////////////////////////////////////////////////// - -int __declspec(dllexport) Unload(void) -{ - return 0; -} \ No newline at end of file diff --git a/plugins/ProfileManager/pmanagerEx.cpp b/plugins/ProfileManager/pmanagerEx.cpp new file mode 100644 index 0000000000..6556478e25 --- /dev/null +++ b/plugins/ProfileManager/pmanagerEx.cpp @@ -0,0 +1,120 @@ +/* +Miranda plugin template, originally by Richard Hughes +http://miranda-icq.sourceforge.net/ + +This file is placed in the public domain. Anybody is free to use or +modify it as they wish with no restriction. +There is no warranty. +*/ +#define MIRANDA_VER 0x0A00 + +#include +#include + +#include +#include +#include +#include +#include + +#include "resource.h" + +HINSTANCE hInst; +PLUGINLINK *pluginLink; +TCHAR fn[MAX_PATH]; +TCHAR lmn[MAX_PATH]; +TCHAR* pathn; +int hLangpack; + +PLUGININFOEX pluginInfo={ + sizeof(PLUGININFOEX), + "Miranda IM Profile Changer", + PLUGIN_MAKE_VERSION(0,0,0,3), + "Adds a menu item to change or load a different profile of Miranda IM.", + "Roman Gemini", + "woobind@ukr.net", + "© 2008 - 2010 Roman Gemini", + "http://code.google.com/p/alfamar/", + 0, //not transient + 0, //doesn't replace anything built-in + // Generate your own unique id for your plugin. + // Do not use this UUID! + // Use uuidgen.exe to generate the uuuid + {0x7eeeb55e, 0x9d83, 0x4e1a, { 0xa1, 0x2f, 0x8f, 0x13, 0xf1, 0xa1, 0x24, 0xfb } } + +}; + +__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +{ + return &pluginInfo; +} + +/////////////////////////////////////////////////////////////////////////////// + +BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) +{ + hInst=hinstDLL; + return TRUE; +} + +/////////////////////////////////////////////////////////////////////////////// + +static const MUUID interfaces[] = {MIID_TESTPLUGIN, MIID_LAST}; +__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) +{ + return interfaces; +} + +/////////////////////////////////////////////////////////////////////////////// + +static INT_PTR ChangePM(WPARAM wParam,LPARAM lParam) +{ + GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn)); + ShellExecute(0, "open", fn, "/FORCESHOW", "", 1); + CallService("CloseAction", 0, 0); + return 0; +} + +static INT_PTR LoadPM(WPARAM wParam,LPARAM lParam) +{ + GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn)); + ShellExecute(0, "open", fn, "/FORCESHOW", "", 1); + return 0; +} + +int __declspec(dllexport) Load(PLUGINLINK *link) +{ + CLISTMENUITEM mi; + pluginLink=link; + mir_getLP(&pluginInfo); + + CreateServiceFunction("Database/LoadPM",LoadPM); + ZeroMemory(&mi,sizeof(mi)); + mi.cbSize=sizeof(mi); + mi.position=-500200000; + mi.flags=0; + mi.hIcon=LoadIcon(hInst, MAKEINTRESOURCE(IDI_LoadPM)); + mi.pszPopupName = "Database"; + mi.pszName=LPGEN("Load profile"); + mi.pszService="Database/LoadPM"; + Menu_AddMainMenuItem(&mi); + + CreateServiceFunction("Database/ChangePM",ChangePM); + ZeroMemory(&mi,sizeof(mi)); + mi.cbSize=sizeof(mi); + mi.position=-500200000; + mi.flags=0; + mi.hIcon=LoadIcon(hInst, MAKEINTRESOURCE(IDI_ChangePM)); + mi.pszPopupName = "Database"; + mi.pszName=LPGEN("Change profile"); + mi.pszService="Database/ChangePM"; + Menu_AddMainMenuItem(&mi); + return 0; +} + +/////////////////////////////////////////////////////////////////////////////// + +int __declspec(dllexport) Unload(void) +{ + return 0; +} \ No newline at end of file -- cgit v1.2.3