From 1e92bf5cf72665b5fec103a0a70d734340725539 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Tue, 24 Jul 2012 09:26:39 +0000 Subject: StopSpamPlus, TipperYM, TooltipNotify, TopToolBar, TranslitSwitcher, UserGuide: changed folder structure git-svn-id: http://svn.miranda-ng.org/main/trunk@1159 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/UserGuide/UserGuide_10.vcxproj | 12 +-- plugins/UserGuide/UserGuide_10.vcxproj.filters | 8 +- plugins/UserGuide/commonheaders.h | 14 --- plugins/UserGuide/docs/userguide-translation.txt | 5 + plugins/UserGuide/main.cpp | 122 ----------------------- plugins/UserGuide/src/commonheaders.h | 14 +++ plugins/UserGuide/src/main.cpp | 122 +++++++++++++++++++++++ plugins/UserGuide/userguide-translation.txt | 5 - 8 files changed, 149 insertions(+), 153 deletions(-) delete mode 100644 plugins/UserGuide/commonheaders.h create mode 100644 plugins/UserGuide/docs/userguide-translation.txt delete mode 100644 plugins/UserGuide/main.cpp create mode 100644 plugins/UserGuide/src/commonheaders.h create mode 100644 plugins/UserGuide/src/main.cpp delete mode 100644 plugins/UserGuide/userguide-translation.txt (limited to 'plugins/UserGuide') diff --git a/plugins/UserGuide/UserGuide_10.vcxproj b/plugins/UserGuide/UserGuide_10.vcxproj index a04c09b0e4..375843b925 100644 --- a/plugins/UserGuide/UserGuide_10.vcxproj +++ b/plugins/UserGuide/UserGuide_10.vcxproj @@ -75,7 +75,7 @@ AnySuitable Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;UserGuide_EXPORTS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true true Level3 @@ -96,7 +96,7 @@ AnySuitable Size ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;NDEBUG;_WINDOWS;_USRDLL;UserGuide_EXPORTS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true true Level3 @@ -115,7 +115,7 @@ Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;UserGuide_EXPORTS;%(PreprocessorDefinitions) + WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebugDLL @@ -134,7 +134,7 @@ Disabled ..\..\include;..\ExternalAPI;%(AdditionalIncludeDirectories) - WIN64;_DEBUG;_WINDOWS;_USRDLL;UserGuide_EXPORTS;%(PreprocessorDefinitions) + WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL Level3 @@ -148,10 +148,10 @@ - + - + diff --git a/plugins/UserGuide/UserGuide_10.vcxproj.filters b/plugins/UserGuide/UserGuide_10.vcxproj.filters index 711c4c9dc2..c40fe0a474 100644 --- a/plugins/UserGuide/UserGuide_10.vcxproj.filters +++ b/plugins/UserGuide/UserGuide_10.vcxproj.filters @@ -9,18 +9,14 @@ {72da96a4-67f9-49cc-94d3-6730544c949f} h;hpp;hxx;hm;inl - - {34beb523-18cd-4f3d-85db-ec309fbf1d1a} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - + Source Files - + Header Files diff --git a/plugins/UserGuide/commonheaders.h b/plugins/UserGuide/commonheaders.h deleted file mode 100644 index 498dbb5b13..0000000000 --- a/plugins/UserGuide/commonheaders.h +++ /dev/null @@ -1,14 +0,0 @@ -#define _CRT_SECURE_NO_WARNINGS - -#define MIRANDA_VER 0x0A00 - -#include -#include -#include -#include -#include -#include -#include -#include - -#define MIID_USERGUIDE {0x297ec1e7, 0x41b7, 0x41f9, { 0xbb, 0x91, 0xef, 0xa9, 0x50, 0x28, 0xf1, 0x6c }} //297ec1e7-41b7-41f9-bb91-efa95028f16c diff --git a/plugins/UserGuide/docs/userguide-translation.txt b/plugins/UserGuide/docs/userguide-translation.txt new file mode 100644 index 0000000000..73bd66f0ac --- /dev/null +++ b/plugins/UserGuide/docs/userguide-translation.txt @@ -0,0 +1,5 @@ +; Common strings that belong to many files +;[] + +; ../../plugins/UserGuide/main.cpp +;[User Guide] diff --git a/plugins/UserGuide/main.cpp b/plugins/UserGuide/main.cpp deleted file mode 100644 index 2f0f53f02f..0000000000 --- a/plugins/UserGuide/main.cpp +++ /dev/null @@ -1,122 +0,0 @@ -#include "commonheaders.h" - -HINSTANCE hInst; - -HANDLE hModulesLoaded, hShowGuide; -int hLangpack; - -PLUGININFOEX pluginInfo={ - sizeof(PLUGININFOEX), - "User Guide Plugin", - PLUGIN_MAKE_VERSION(0,0,0,1), - "This plug-in adds the main menu item used to view miranda-im pack user guide.", - "Yasnovidyashii", - "yasnovidyashii@gmail.com", - "© 2009 Mikhail Yuriev", - "http://nightly.miranda.im/", - UNICODE_AWARE, - MIID_USERGUIDE -}; - -static INT_PTR ShowGuideFile(WPARAM wParam,LPARAM lParam) -{ - DBVARIANT dbv = {0}; - int iRes; - - LPCTSTR pszEmptySting = _T(""); - LPTSTR pszDirName, pszDirNameEx, pszFileName,pszDivider; - - REPLACEVARSDATA dat = {0}; - dat.cbSize = sizeof( dat ); - dat.dwFlags = RVF_TCHAR; - - pszDirName = (LPTSTR)mir_alloc(250*sizeof(TCHAR)); - pszFileName = (LPTSTR)mir_alloc(250*sizeof(TCHAR)); - - iRes = DBGetContactSettingTString(NULL, "UserGuide", "PathToHelpFile", &dbv); - - if (iRes!=0) - { - _tcscpy(pszDirName, _T("%miranda_path%\\Plugins")); - _tcscpy(pszFileName, _T("UserGuide.chm")); - } - else - { - if(!_tcscmp((dbv.ptszVal), pszEmptySting)) - { - _tcscpy(pszDirName, _T("%miranda_path%\\Plugins")); - _tcscpy(pszFileName, _T("UserGuide.chm")); - } - else - { - pszDivider = _tcsrchr(dbv.ptszVal, '\\'); - if (pszDivider == NULL) - { - pszDirName = _T(""); - _tcsncpy(pszFileName, dbv.ptszVal, _tcslen(dbv.ptszVal)); - } - else - { - _tcsncpy(pszFileName, pszDivider + 1, _tcslen(dbv.ptszVal) - _tcslen(pszDivider) - 1); - pszFileName[_tcslen(dbv.ptszVal) - _tcslen(pszDivider) - 1] = 0; - _tcsncpy(pszDirName, dbv.ptszVal, pszDivider - dbv.ptszVal); - pszDirName[pszDivider - dbv.ptszVal] = 0; - } - } - DBFreeVariant(&dbv); - } - if (ServiceExists(MS_UTILS_REPLACEVARS)) - pszDirNameEx = (TCHAR *) CallService(MS_UTILS_REPLACEVARS, (WPARAM)pszDirName, (LPARAM)&dat); - else - pszDirNameEx = mir_tstrdup(pszDirName); - - ShellExecute(NULL, _T("open"), pszFileName, NULL, pszDirNameEx, SW_SHOW); - mir_free(pszDirName); - mir_free(pszFileName); - mir_free(pszDirNameEx); - return 0; -} - -int ModulesLoaded(WPARAM wParam,LPARAM lParam) -{ - CLISTMENUITEM mi; - - hShowGuide = CreateServiceFunction("UserGuide/ShowGuide", ShowGuideFile); - ZeroMemory(&mi, sizeof(mi)); - mi.cbSize = sizeof(mi); - mi.position = 500000; - mi.flags = CMIF_TCHAR; - mi.hIcon = LoadSkinnedIcon(SKINICON_OTHER_HELP); - mi.ptszName = LPGENT("User Guide"); - mi.pszService = "UserGuide/ShowGuide"; - Menu_AddMainMenuItem(&mi); - - return 0; -} - -BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) -{ - hInst = hinstDLL; - return TRUE; -} - - -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) -{ - return &pluginInfo; -} - -extern "C" __declspec(dllexport) int Load(void) -{ - - mir_getLP(&pluginInfo); - hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED,ModulesLoaded); - return 0; -} - -extern "C" __declspec(dllexport) int Unload(void) -{ - UnhookEvent(hModulesLoaded); - DestroyServiceFunction(hShowGuide); - return 0; -} \ No newline at end of file diff --git a/plugins/UserGuide/src/commonheaders.h b/plugins/UserGuide/src/commonheaders.h new file mode 100644 index 0000000000..498dbb5b13 --- /dev/null +++ b/plugins/UserGuide/src/commonheaders.h @@ -0,0 +1,14 @@ +#define _CRT_SECURE_NO_WARNINGS + +#define MIRANDA_VER 0x0A00 + +#include +#include +#include +#include +#include +#include +#include +#include + +#define MIID_USERGUIDE {0x297ec1e7, 0x41b7, 0x41f9, { 0xbb, 0x91, 0xef, 0xa9, 0x50, 0x28, 0xf1, 0x6c }} //297ec1e7-41b7-41f9-bb91-efa95028f16c diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp new file mode 100644 index 0000000000..2f0f53f02f --- /dev/null +++ b/plugins/UserGuide/src/main.cpp @@ -0,0 +1,122 @@ +#include "commonheaders.h" + +HINSTANCE hInst; + +HANDLE hModulesLoaded, hShowGuide; +int hLangpack; + +PLUGININFOEX pluginInfo={ + sizeof(PLUGININFOEX), + "User Guide Plugin", + PLUGIN_MAKE_VERSION(0,0,0,1), + "This plug-in adds the main menu item used to view miranda-im pack user guide.", + "Yasnovidyashii", + "yasnovidyashii@gmail.com", + "© 2009 Mikhail Yuriev", + "http://nightly.miranda.im/", + UNICODE_AWARE, + MIID_USERGUIDE +}; + +static INT_PTR ShowGuideFile(WPARAM wParam,LPARAM lParam) +{ + DBVARIANT dbv = {0}; + int iRes; + + LPCTSTR pszEmptySting = _T(""); + LPTSTR pszDirName, pszDirNameEx, pszFileName,pszDivider; + + REPLACEVARSDATA dat = {0}; + dat.cbSize = sizeof( dat ); + dat.dwFlags = RVF_TCHAR; + + pszDirName = (LPTSTR)mir_alloc(250*sizeof(TCHAR)); + pszFileName = (LPTSTR)mir_alloc(250*sizeof(TCHAR)); + + iRes = DBGetContactSettingTString(NULL, "UserGuide", "PathToHelpFile", &dbv); + + if (iRes!=0) + { + _tcscpy(pszDirName, _T("%miranda_path%\\Plugins")); + _tcscpy(pszFileName, _T("UserGuide.chm")); + } + else + { + if(!_tcscmp((dbv.ptszVal), pszEmptySting)) + { + _tcscpy(pszDirName, _T("%miranda_path%\\Plugins")); + _tcscpy(pszFileName, _T("UserGuide.chm")); + } + else + { + pszDivider = _tcsrchr(dbv.ptszVal, '\\'); + if (pszDivider == NULL) + { + pszDirName = _T(""); + _tcsncpy(pszFileName, dbv.ptszVal, _tcslen(dbv.ptszVal)); + } + else + { + _tcsncpy(pszFileName, pszDivider + 1, _tcslen(dbv.ptszVal) - _tcslen(pszDivider) - 1); + pszFileName[_tcslen(dbv.ptszVal) - _tcslen(pszDivider) - 1] = 0; + _tcsncpy(pszDirName, dbv.ptszVal, pszDivider - dbv.ptszVal); + pszDirName[pszDivider - dbv.ptszVal] = 0; + } + } + DBFreeVariant(&dbv); + } + if (ServiceExists(MS_UTILS_REPLACEVARS)) + pszDirNameEx = (TCHAR *) CallService(MS_UTILS_REPLACEVARS, (WPARAM)pszDirName, (LPARAM)&dat); + else + pszDirNameEx = mir_tstrdup(pszDirName); + + ShellExecute(NULL, _T("open"), pszFileName, NULL, pszDirNameEx, SW_SHOW); + mir_free(pszDirName); + mir_free(pszFileName); + mir_free(pszDirNameEx); + return 0; +} + +int ModulesLoaded(WPARAM wParam,LPARAM lParam) +{ + CLISTMENUITEM mi; + + hShowGuide = CreateServiceFunction("UserGuide/ShowGuide", ShowGuideFile); + ZeroMemory(&mi, sizeof(mi)); + mi.cbSize = sizeof(mi); + mi.position = 500000; + mi.flags = CMIF_TCHAR; + mi.hIcon = LoadSkinnedIcon(SKINICON_OTHER_HELP); + mi.ptszName = LPGENT("User Guide"); + mi.pszService = "UserGuide/ShowGuide"; + Menu_AddMainMenuItem(&mi); + + return 0; +} + +BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) +{ + hInst = hinstDLL; + return TRUE; +} + + +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +{ + return &pluginInfo; +} + +extern "C" __declspec(dllexport) int Load(void) +{ + + mir_getLP(&pluginInfo); + hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED,ModulesLoaded); + return 0; +} + +extern "C" __declspec(dllexport) int Unload(void) +{ + UnhookEvent(hModulesLoaded); + DestroyServiceFunction(hShowGuide); + return 0; +} \ No newline at end of file diff --git a/plugins/UserGuide/userguide-translation.txt b/plugins/UserGuide/userguide-translation.txt deleted file mode 100644 index 73bd66f0ac..0000000000 --- a/plugins/UserGuide/userguide-translation.txt +++ /dev/null @@ -1,5 +0,0 @@ -; Common strings that belong to many files -;[] - -; ../../plugins/UserGuide/main.cpp -;[User Guide] -- cgit v1.2.3