From 7a8e3055b162b2572152ed951ebcefd60182edbc Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Mon, 23 Jul 2012 12:21:37 +0000 Subject: PasteIt, PopUp, ProfileManager: changed folder structure git-svn-id: http://svn.miranda-ng.org/main/trunk@1117 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- .../docs/profilemanager-translation.txt | 2 + plugins/ProfileManager/pmanagerEx.cpp | 106 --------------------- plugins/ProfileManager/pmanagerEx.vcxproj | 14 +-- plugins/ProfileManager/pmanagerEx.vcxproj.filters | 6 +- plugins/ProfileManager/pmanagerEx.vcxproj.user | 3 + .../ProfileManager/profilemanager-translation.txt | 2 - plugins/ProfileManager/res/resource.rc | 46 +++++++++ plugins/ProfileManager/resource.h | 17 ---- plugins/ProfileManager/resource.rc | 46 --------- plugins/ProfileManager/src/pmanagerEx.cpp | 106 +++++++++++++++++++++ plugins/ProfileManager/src/resource.h | 17 ++++ 11 files changed, 184 insertions(+), 181 deletions(-) create mode 100644 plugins/ProfileManager/docs/profilemanager-translation.txt delete mode 100644 plugins/ProfileManager/pmanagerEx.cpp create mode 100644 plugins/ProfileManager/pmanagerEx.vcxproj.user delete mode 100644 plugins/ProfileManager/profilemanager-translation.txt create mode 100644 plugins/ProfileManager/res/resource.rc delete mode 100644 plugins/ProfileManager/resource.h delete mode 100644 plugins/ProfileManager/resource.rc create mode 100644 plugins/ProfileManager/src/pmanagerEx.cpp create mode 100644 plugins/ProfileManager/src/resource.h (limited to 'plugins/ProfileManager') diff --git a/plugins/ProfileManager/docs/profilemanager-translation.txt b/plugins/ProfileManager/docs/profilemanager-translation.txt new file mode 100644 index 0000000000..52329c17db --- /dev/null +++ b/plugins/ProfileManager/docs/profilemanager-translation.txt @@ -0,0 +1,2 @@ +; Common strings that belong to many files +;[] diff --git a/plugins/ProfileManager/pmanagerEx.cpp b/plugins/ProfileManager/pmanagerEx.cpp deleted file mode 100644 index be6bfb8c0f..0000000000 --- a/plugins/ProfileManager/pmanagerEx.cpp +++ /dev/null @@ -1,106 +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; - -TCHAR fn[MAX_PATH]; -TCHAR lmn[MAX_PATH]; -TCHAR* pathn; -int hLangpack; -HANDLE hLoadPM, hChangePM; - -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/", - UNICODE_AWARE, - {0x7eeeb55e, 0x9d83, 0x4e1a, { 0xa1, 0x2f, 0x8f, 0x13, 0xf1, 0xa1, 0x24, 0xfb } } -}; - -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) -{ - return &pluginInfo; -} - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - hInst = hinstDLL; - return TRUE; -} - -static INT_PTR ChangePM(WPARAM wParam, LPARAM lParam) -{ - GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn)); - ShellExecute(0, _T("open"), fn, _T("/FORCESHOW"), _T(""), 1); - CallService("CloseAction", 0, 0); - return 0; -} - -static INT_PTR LoadPM(WPARAM wParam, LPARAM lParam) -{ - GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn)); - ShellExecute(0, _T("open"), fn, _T("/FORCESHOW"), _T(""), 1); - return 0; -} - -extern "C" __declspec(dllexport) int Load(void) -{ - CLISTMENUITEM mi; - - mir_getLP(&pluginInfo); - - hLoadPM = CreateServiceFunction("Database/LoadPM", LoadPM); - ZeroMemory(&mi, sizeof(mi)); - mi.cbSize = sizeof(mi); - mi.position = -500200000; - mi.flags = CMIF_TCHAR; - mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LoadPM)); - mi.ptszPopupName = _T("Database"); - mi.ptszName = _T("Load profile"); - mi.pszService = "Database/LoadPM"; - Menu_AddMainMenuItem(&mi); - - hChangePM = CreateServiceFunction("Database/ChangePM", ChangePM); - ZeroMemory(&mi, sizeof(mi)); - mi.cbSize = sizeof(mi); - mi.position = -500200000; - mi.flags = CMIF_TCHAR; - mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ChangePM)); - mi.ptszPopupName = _T("Database"); - mi.ptszName = _T("Change profile"); - mi.pszService = "Database/ChangePM"; - Menu_AddMainMenuItem(&mi); - - return 0; -} - -extern "C" __declspec(dllexport) int Unload(void) -{ - DestroyServiceFunction(hLoadPM); - DestroyServiceFunction(hChangePM); - - return 0; -} \ No newline at end of file diff --git a/plugins/ProfileManager/pmanagerEx.vcxproj b/plugins/ProfileManager/pmanagerEx.vcxproj index cb727ed048..38508aa2eb 100644 --- a/plugins/ProfileManager/pmanagerEx.vcxproj +++ b/plugins/ProfileManager/pmanagerEx.vcxproj @@ -73,7 +73,7 @@ Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;pmanager_EXPORTS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -96,7 +96,7 @@ Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;_DEBUG;_WINDOWS;_USRDLL;pmanager_EXPORTS;%(PreprocessorDefinitions) + WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Level3 @@ -119,7 +119,7 @@ AnySuitable Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;pmanager_EXPORTS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true true Level3 @@ -144,7 +144,7 @@ AnySuitable Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;pmanager_EXPORTS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true true Level3 @@ -164,13 +164,13 @@ - + - + - + diff --git a/plugins/ProfileManager/pmanagerEx.vcxproj.filters b/plugins/ProfileManager/pmanagerEx.vcxproj.filters index 91e07c558e..223e2d2d66 100644 --- a/plugins/ProfileManager/pmanagerEx.vcxproj.filters +++ b/plugins/ProfileManager/pmanagerEx.vcxproj.filters @@ -15,17 +15,17 @@ - + Source Files - + Header Files - + Resource Files diff --git a/plugins/ProfileManager/pmanagerEx.vcxproj.user b/plugins/ProfileManager/pmanagerEx.vcxproj.user new file mode 100644 index 0000000000..695b5c78b9 --- /dev/null +++ b/plugins/ProfileManager/pmanagerEx.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugins/ProfileManager/profilemanager-translation.txt b/plugins/ProfileManager/profilemanager-translation.txt deleted file mode 100644 index 52329c17db..0000000000 --- a/plugins/ProfileManager/profilemanager-translation.txt +++ /dev/null @@ -1,2 +0,0 @@ -; Common strings that belong to many files -;[] diff --git a/plugins/ProfileManager/res/resource.rc b/plugins/ProfileManager/res/resource.rc new file mode 100644 index 0000000000..8a81324da1 --- /dev/null +++ b/plugins/ProfileManager/res/resource.rc @@ -0,0 +1,46 @@ +// Microsoft Visual C++ generated resource script. +// +#include "..\src\resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "afxres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// Neutral resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) +#ifdef _WIN32 +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +#pragma code_page(1250) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_ChangePM ICON "ChangePM.ico" +IDI_LoadPM ICON "LoadPM.ico" +#endif // Neutral resources +///////////////////////////////////////////////////////////////////////////// + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED + diff --git a/plugins/ProfileManager/resource.h b/plugins/ProfileManager/resource.h deleted file mode 100644 index 638fcfb4f6..0000000000 --- a/plugins/ProfileManager/resource.h +++ /dev/null @@ -1,17 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by resource.rc -// -#define IDI_ChangePM 101 -#define IDI_LoadPM 102 - -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 105 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1007 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif diff --git a/plugins/ProfileManager/resource.rc b/plugins/ProfileManager/resource.rc deleted file mode 100644 index 92a42063c4..0000000000 --- a/plugins/ProfileManager/resource.rc +++ /dev/null @@ -1,46 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Neutral resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEU) -#ifdef _WIN32 -LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL -#pragma code_page(1250) -#endif //_WIN32 - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ChangePM ICON "res/ChangePM.ico" -IDI_LoadPM ICON "res/LoadPM.ico" -#endif // Neutral resources -///////////////////////////////////////////////////////////////////////////// - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp new file mode 100644 index 0000000000..be6bfb8c0f --- /dev/null +++ b/plugins/ProfileManager/src/pmanagerEx.cpp @@ -0,0 +1,106 @@ +/* +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; + +TCHAR fn[MAX_PATH]; +TCHAR lmn[MAX_PATH]; +TCHAR* pathn; +int hLangpack; +HANDLE hLoadPM, hChangePM; + +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/", + UNICODE_AWARE, + {0x7eeeb55e, 0x9d83, 0x4e1a, { 0xa1, 0x2f, 0x8f, 0x13, 0xf1, 0xa1, 0x24, 0xfb } } +}; + +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +{ + return &pluginInfo; +} + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + hInst = hinstDLL; + return TRUE; +} + +static INT_PTR ChangePM(WPARAM wParam, LPARAM lParam) +{ + GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn)); + ShellExecute(0, _T("open"), fn, _T("/FORCESHOW"), _T(""), 1); + CallService("CloseAction", 0, 0); + return 0; +} + +static INT_PTR LoadPM(WPARAM wParam, LPARAM lParam) +{ + GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn)); + ShellExecute(0, _T("open"), fn, _T("/FORCESHOW"), _T(""), 1); + return 0; +} + +extern "C" __declspec(dllexport) int Load(void) +{ + CLISTMENUITEM mi; + + mir_getLP(&pluginInfo); + + hLoadPM = CreateServiceFunction("Database/LoadPM", LoadPM); + ZeroMemory(&mi, sizeof(mi)); + mi.cbSize = sizeof(mi); + mi.position = -500200000; + mi.flags = CMIF_TCHAR; + mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_LoadPM)); + mi.ptszPopupName = _T("Database"); + mi.ptszName = _T("Load profile"); + mi.pszService = "Database/LoadPM"; + Menu_AddMainMenuItem(&mi); + + hChangePM = CreateServiceFunction("Database/ChangePM", ChangePM); + ZeroMemory(&mi, sizeof(mi)); + mi.cbSize = sizeof(mi); + mi.position = -500200000; + mi.flags = CMIF_TCHAR; + mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ChangePM)); + mi.ptszPopupName = _T("Database"); + mi.ptszName = _T("Change profile"); + mi.pszService = "Database/ChangePM"; + Menu_AddMainMenuItem(&mi); + + return 0; +} + +extern "C" __declspec(dllexport) int Unload(void) +{ + DestroyServiceFunction(hLoadPM); + DestroyServiceFunction(hChangePM); + + return 0; +} \ No newline at end of file diff --git a/plugins/ProfileManager/src/resource.h b/plugins/ProfileManager/src/resource.h new file mode 100644 index 0000000000..638fcfb4f6 --- /dev/null +++ b/plugins/ProfileManager/src/resource.h @@ -0,0 +1,17 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by resource.rc +// +#define IDI_ChangePM 101 +#define IDI_LoadPM 102 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 105 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1007 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif -- cgit v1.2.3