diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-17 17:37:22 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-17 17:37:22 +0000 |
commit | 78d71d2cad6f243c6ff31d41380b8c5b58407de5 (patch) | |
tree | d0c05983b315352c5e66d23420da4b8fd8b5aff4 /plugins/ProfileManager | |
parent | a9e8daee448c229aa3f8ded0c5f5c0fe7aa42529 (diff) |
added some plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@20 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/ProfileManager')
-rw-r--r-- | plugins/ProfileManager/pmanagerEx.c | 109 | ||||
-rw-r--r-- | plugins/ProfileManager/pmanagerEx.vcproj | 247 | ||||
-rw-r--r-- | plugins/ProfileManager/res/ChangePM.ico | bin | 0 -> 1150 bytes | |||
-rw-r--r-- | plugins/ProfileManager/res/LoadPM.ico | bin | 0 -> 1150 bytes | |||
-rw-r--r-- | plugins/ProfileManager/resource.h | 17 | ||||
-rw-r--r-- | plugins/ProfileManager/resource.rc | 46 |
6 files changed, 419 insertions, 0 deletions
diff --git a/plugins/ProfileManager/pmanagerEx.c b/plugins/ProfileManager/pmanagerEx.c new file mode 100644 index 0000000000..63f57f5bea --- /dev/null +++ b/plugins/ProfileManager/pmanagerEx.c @@ -0,0 +1,109 @@ +/*
+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.
+*/
+#include <windows.h>
+#include <newpluginapi.h>
+#include <m_clist.h>
+#include <m_skin.h>
+#include <m_langpack.h>
+#include <tchar.h>
+#include "resource.h"
+
+
+HINSTANCE hInst;
+PLUGINLINK *pluginLink;
+TCHAR fn[MAX_PATH];
+TCHAR lmn[MAX_PATH];
+TCHAR* pathn;
+
+#define SIZEOF(x) (sizeof(x)/sizeof(*x))
+
+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 } }
+
+};
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+{
+ hInst=hinstDLL;
+ return TRUE;
+}
+
+static int 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 LoadPM(WPARAM wParam,LPARAM lParam)
+{
+ GetModuleFileName(GetModuleHandle(NULL), fn, SIZEOF(fn));
+ ShellExecute(0, "open", fn, "/FORCESHOW", "", 1);
+ return 0;
+}
+
+
+__declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ return &pluginInfo;
+}
+
+static const MUUID interfaces[] = {MIID_TESTPLUGIN, MIID_LAST};
+__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+{
+ return interfaces;
+}
+
+int __declspec(dllexport) Load(PLUGINLINK *link)
+{
+ CLISTMENUITEM mi;
+ pluginLink=link;
+
+ 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";
+ CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&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";
+ CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&mi);
+ return 0;
+}
+
+int __declspec(dllexport) Unload(void)
+{
+ return 0;
+}
\ No newline at end of file diff --git a/plugins/ProfileManager/pmanagerEx.vcproj b/plugins/ProfileManager/pmanagerEx.vcproj new file mode 100644 index 0000000000..4c5613bdec --- /dev/null +++ b/plugins/ProfileManager/pmanagerEx.vcproj @@ -0,0 +1,247 @@ +<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="pmanagerEx"
+ ProjectGUID="{728CF16E-F3FF-4DEB-88C5-E9118F61ACD5}"
+ RootNamespace="pmanager"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/pmanager.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="4"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;pmanager_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="0"
+ PrecompiledHeaderFile=".\Debug/pmanager.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="./plugins/pmanager.dll"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile=".\Debug/pmanager.pdb"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary=".\Debug/pmanager.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\Debug/pmanager.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release Unicode|Win32"
+ OutputDirectory="$(SolutionDir)/Debug/"
+ IntermediateDirectory="$(SolutionDir)/Debug/Obj/$(ProjectName)"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/pmanager.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="3"
+ InlineFunctionExpansion="2"
+ EnableIntrinsicFunctions="true"
+ FavorSizeOrSpeed="2"
+ OmitFramePointers="false"
+ EnableFiberSafeOptimizations="false"
+ AdditionalIncludeDirectories="../../include;../ExternalAPI"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;pmanager_EXPORTS"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ EnableEnhancedInstructionSet="2"
+ PrecompiledHeaderFile="$(IntDir)/pmanager.pch"
+ AssemblerListingLocation="$(IntDir)/"
+ ObjectFile="$(IntDir)/"
+ ProgramDataBaseFileName="$(IntDir)/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="2057"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="D:\Miranda\plugins/pmanager.dll"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ManifestFile="$(IntDir)\$(TargetFileName).intermediate.manifest"
+ ProgramDatabaseFile="$(IntDir)/pmanager.pdb"
+ ProfileGuidedDatabase=""
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/pmanager.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ OutputDocumentFile="$(IntDir)$(TargetName).xml"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile="$(IntDir)/pmanager.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ CommandLine=""
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath=".\pmanagerEx.c"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\resource.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath=".\resource.rc"
+ >
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/plugins/ProfileManager/res/ChangePM.ico b/plugins/ProfileManager/res/ChangePM.ico Binary files differnew file mode 100644 index 0000000000..89b5d08f0f --- /dev/null +++ b/plugins/ProfileManager/res/ChangePM.ico diff --git a/plugins/ProfileManager/res/LoadPM.ico b/plugins/ProfileManager/res/LoadPM.ico Binary files differnew file mode 100644 index 0000000000..ec298dea37 --- /dev/null +++ b/plugins/ProfileManager/res/LoadPM.ico diff --git a/plugins/ProfileManager/resource.h b/plugins/ProfileManager/resource.h new file mode 100644 index 0000000000..638fcfb4f6 --- /dev/null +++ b/plugins/ProfileManager/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
diff --git a/plugins/ProfileManager/resource.rc b/plugins/ProfileManager/resource.rc new file mode 100644 index 0000000000..92a42063c4 --- /dev/null +++ b/plugins/ProfileManager/resource.rc @@ -0,0 +1,46 @@ +// 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
+
|