summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/MenuItemEx/menuex_10.vcxproj11
-rw-r--r--plugins/MenuItemEx/menuex_10.vcxproj.filters3
-rw-r--r--plugins/MenuItemEx/menuex_11.vcxproj11
-rw-r--r--plugins/MenuItemEx/menuex_11.vcxproj.filters3
-rw-r--r--plugins/MenuItemEx/res/resource.rc4
-rw-r--r--plugins/MenuItemEx/res/salad.right.icobin1150 -> 0 bytes
-rw-r--r--plugins/MenuItemEx/res/version.rc27
-rw-r--r--plugins/MenuItemEx/src/images.cpp1
-rw-r--r--plugins/MenuItemEx/src/main.cpp34
-rw-r--r--plugins/MenuItemEx/src/menuex.h55
-rw-r--r--plugins/MenuItemEx/src/options.cpp5
-rw-r--r--plugins/MenuItemEx/src/stdafx.cpp18
-rw-r--r--plugins/MenuItemEx/src/version.h21
13 files changed, 114 insertions, 79 deletions
diff --git a/plugins/MenuItemEx/menuex_10.vcxproj b/plugins/MenuItemEx/menuex_10.vcxproj
index ea7cc22ca9..567b47ee8a 100644
--- a/plugins/MenuItemEx/menuex_10.vcxproj
+++ b/plugins/MenuItemEx/menuex_10.vcxproj
@@ -78,6 +78,8 @@
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeaderFile>menuex.h</PrecompiledHeaderFile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -102,6 +104,8 @@
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeaderFile>menuex.h</PrecompiledHeaderFile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -129,6 +133,8 @@
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeaderFile>menuex.h</PrecompiledHeaderFile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -159,6 +165,8 @@
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeaderFile>menuex.h</PrecompiledHeaderFile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -182,6 +190,9 @@
<ClCompile Include="src\images.cpp" />
<ClCompile Include="src\main.cpp" />
<ClCompile Include="src\options.cpp" />
+ <ClCompile Include="src\stdafx.cpp">
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\images.h" />
diff --git a/plugins/MenuItemEx/menuex_10.vcxproj.filters b/plugins/MenuItemEx/menuex_10.vcxproj.filters
index 19cda8f373..28a67e03d9 100644
--- a/plugins/MenuItemEx/menuex_10.vcxproj.filters
+++ b/plugins/MenuItemEx/menuex_10.vcxproj.filters
@@ -24,6 +24,9 @@
<ClCompile Include="src\options.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="src\stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\images.h">
diff --git a/plugins/MenuItemEx/menuex_11.vcxproj b/plugins/MenuItemEx/menuex_11.vcxproj
index 5947f6e4e2..9617d2c6dd 100644
--- a/plugins/MenuItemEx/menuex_11.vcxproj
+++ b/plugins/MenuItemEx/menuex_11.vcxproj
@@ -82,6 +82,8 @@
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeaderFile>menuex.h</PrecompiledHeaderFile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -106,6 +108,8 @@
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeaderFile>menuex.h</PrecompiledHeaderFile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -133,6 +137,8 @@
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeaderFile>menuex.h</PrecompiledHeaderFile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -163,6 +169,8 @@
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN64;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
+ <PrecompiledHeaderFile>menuex.h</PrecompiledHeaderFile>
+ <PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
@@ -186,6 +194,9 @@
<ClCompile Include="src\images.cpp" />
<ClCompile Include="src\main.cpp" />
<ClCompile Include="src\options.cpp" />
+ <ClCompile Include="src\stdafx.cpp">
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\images.h" />
diff --git a/plugins/MenuItemEx/menuex_11.vcxproj.filters b/plugins/MenuItemEx/menuex_11.vcxproj.filters
index 19cda8f373..28a67e03d9 100644
--- a/plugins/MenuItemEx/menuex_11.vcxproj.filters
+++ b/plugins/MenuItemEx/menuex_11.vcxproj.filters
@@ -24,6 +24,9 @@
<ClCompile Include="src\options.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="src\stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\images.h">
diff --git a/plugins/MenuItemEx/res/resource.rc b/plugins/MenuItemEx/res/resource.rc
index bec11ac250..47d0f24e47 100644
--- a/plugins/MenuItemEx/res/resource.rc
+++ b/plugins/MenuItemEx/res/resource.rc
@@ -7,7 +7,7 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
-#include <windows.h>
+#include <winres.h>
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -133,7 +133,7 @@ END
2 TEXTINCLUDE
BEGIN
- "#include <windows.h>\r\n"
+ "#include <winres.h>\r\n"
"\0"
END
diff --git a/plugins/MenuItemEx/res/salad.right.ico b/plugins/MenuItemEx/res/salad.right.ico
deleted file mode 100644
index df1e64906b..0000000000
--- a/plugins/MenuItemEx/res/salad.right.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/MenuItemEx/res/version.rc b/plugins/MenuItemEx/res/version.rc
index 981fcdaebc..5bfbab4754 100644
--- a/plugins/MenuItemEx/res/version.rc
+++ b/plugins/MenuItemEx/res/version.rc
@@ -1,14 +1,11 @@
+// Microsoft Visual C++ generated resource script.
+//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
-#include "..\src\version.h"
#include "afxres.h"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Version
-//
+#include "..\src\version.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION __FILEVERSION_STRING
@@ -20,24 +17,22 @@ VS_VERSION_INFO VERSIONINFO
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
- FILETYPE 0x2L
+ FILETYPE 0x0L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
- BLOCK "040904b0"
+ BLOCK "000004b0"
BEGIN
- VALUE "FileDescription", __PLUGIN_NAME
- VALUE "FileVersion", __VERSION_STRING
- VALUE "InternalName", "menuex"
- VALUE "LegalCopyright", __COPYRIGHTS
- VALUE "OriginalFilename", "menuex.dll"
- VALUE "ProductName", "menuex"
- VALUE "ProductVersion", __VERSION_STRING
+ VALUE "FileDescription", __DESCRIPTION
+ VALUE "InternalName", __PLUGIN_NAME
+ VALUE "LegalCopyright", __COPYRIGHT
+ VALUE "OriginalFilename", __FILENAME
+ VALUE "ProductName", __PLUGIN_NAME
END
END
BLOCK "VarFileInfo"
BEGIN
- VALUE "Translation", 0x409, 1200
+ VALUE "Translation", 0x0, 1200
END
END
diff --git a/plugins/MenuItemEx/src/images.cpp b/plugins/MenuItemEx/src/images.cpp
index 61d7b7750f..bafb96f440 100644
--- a/plugins/MenuItemEx/src/images.cpp
+++ b/plugins/MenuItemEx/src/images.cpp
@@ -1,5 +1,4 @@
#include "menuex.h"
-#include "images.h"
extern HINSTANCE hinstance;
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index ee64d7425b..4d88b91996 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -1,6 +1,4 @@
#include "menuex.h"
-#include "images.h"
-#include "version.h"
#define MS_SETINVIS "MenuEx/SetInvis"
#define MS_SETVIS "MenuEx/SetVis"
@@ -83,15 +81,15 @@ static const ii[] = {
PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
- MODULENAME,
- __VERSION_DWORD,
- __DESC,
- __AUTHORS,
- __EMAIL,
- __COPYRIGHTS,
- __WEB,
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
UNICODE_AWARE,
- // {b1902a52-9114-4d7e-ac2e-b3a52e01d574}
+ // {B1902A52-9114-4D7E-AC2E-B3A52E01D574}
{0xb1902a52, 0x9114, 0x4d7e, {0xac, 0x2e, 0xb3, 0xa5, 0x2e, 0x01, 0xd5, 0x74}}
};
@@ -691,9 +689,9 @@ INT_PTR onCopyID(WPARAM wparam,LPARAM lparam)
if ((szProto = GetContactProto(hContact)) == NULL)
return 0;
- GetID(hContact,szProto,(LPSTR)&szID);
+ GetID(hContact, szProto, (LPSTR)&szID);
- if(DBGetContactSettingDword(NULL,VISPLG,"flags",vf_default)&VF_CIDN) {
+ if(db_get_dw(NULL, MODULENAME, "flags", vf_default) & VF_CIDN) {
PROTOACCOUNT *pa = ProtoGetAccount(szProto);
if (!pa->bOldProto)
@@ -718,7 +716,7 @@ INT_PTR onCopyStatusMsg(WPARAM wparam,LPARAM lparam)
char par[32];
TCHAR buffer[2048];
int i;
- DWORD flags = DBGetContactSettingDword(NULL,VISPLG,"flags",vf_default);
+ DWORD flags = db_get_dw(NULL, MODULENAME, "flags", vf_default);
module = GetContactProto((HANDLE)wparam);
if (!module)
@@ -841,8 +839,8 @@ int isIgnored(HANDLE hContact, int type)
INT_PTR onIgnore(WPARAM wparam,LPARAM lparam)
{
- if (DBGetContactSettingByte(NULL, VISPLG, "ignorehide", 0) && (lparam == IGNOREEVENT_ALL)) {
- DBWriteContactSettingByte((HANDLE)wparam, "CList", "Hidden", (isIgnored((HANDLE)wparam, lparam) ? (byte)0 : (byte)1));
+ if (db_get_b(NULL, MODULENAME, "ignorehide", 0) && (lparam == IGNOREEVENT_ALL)) {
+ db_set_b((HANDLE)wparam, "CList", "Hidden", (isIgnored((HANDLE)wparam, lparam) ? (byte)0 : (byte)1));
CallService(MS_CLUI_SORTLIST, 0, 0);
}
@@ -878,8 +876,8 @@ static void ModifySubmenuItem(HANDLE hItem, TCHAR* name, int checked, int hidden
// called when the contact-menu is built
int BuildMenu(WPARAM wparam,LPARAM lparam)
{
- CLISTMENUITEM miAV = {0},miNV,miHFL,miIGN,miPROTO,miADD,miREQ,miCID,miRECV,miSTAT,miCIP,miCMV;
- DWORD flags = DBGetContactSettingDword(NULL,VISPLG,"flags",vf_default);
+ CLISTMENUITEM miAV = {0}, miNV, miHFL, miIGN, miPROTO, miADD, miREQ, miCID, miRECV, miSTAT, miCIP, miCMV;
+ DWORD flags = db_get_dw(NULL, MODULENAME, "flags", vf_default);
int i = 0, j = 0, check = 0, all = 0, hide = 0;
BOOL bIsOnline = FALSE, bShowAll = CTRL_IS_PRESSED;
char* pszProto = GetContactProto((HANDLE)wparam);
@@ -1120,7 +1118,7 @@ static int ContactSettingChanged( WPARAM wParam, LPARAM lParam )
DBDeleteContactSetting(hContact, lpzProto, "LogoffTS");
// TESTING: updating user's details
- if (DBGetContactSettingDword(NULL, VISPLG, "flags", vf_default) & VF_REFRESH) {
+ if (db_get_dw(NULL, MODULENAME, "flags", vf_default) & VF_REFRESH) {
// don't refresh Hidden or NotOnList contact's details
if (!DBGetContactSettingByte(hContact, "CList", "Hidden", 0) && !DBGetContactSettingByte((HANDLE)wParam, "CList", "NotOnList", 0))
CallContactService(hContact, PSS_GETINFO, 0, 0 );
diff --git a/plugins/MenuItemEx/src/menuex.h b/plugins/MenuItemEx/src/menuex.h
index 4d4bf8d1bd..6e04db8293 100644
--- a/plugins/MenuItemEx/src/menuex.h
+++ b/plugins/MenuItemEx/src/menuex.h
@@ -2,40 +2,35 @@
#define MENUEX_H__
#define _CRT_SECURE_NO_DEPRECATE
-#define MIRANDA_VER 0x0A00
-#include "m_stdhdr.h"
#include <windows.h>
-#include "resource.h"
-#include <stdio.h>
-#include "newpluginapi.h"
-#include "win2k.h"
-#include "time.h"
-#include "m_system.h"
-#include "m_system_cpp.h"
-#include "m_utils.h"
-#include "m_options.h"
-#include "m_database.h"
-#include "m_langpack.h"
-#include "m_file.h"
-#include "m_clist.h"
-#include "m_protosvc.h"
-#include "m_protomod.h"
-#include "m_clui.h"
-#include "m_ignore.h"
-#include "m_icolib.h"
-#include "m_skin.h"
-#include "m_genmenu.h"
-#include "m_popup.h"
-#include "m_message.h"
-#include "m_fingerprint.h"
-#include "m_metacontacts.h"
-#include "m_msg_buttonsbar.h"
+#include <time.h>
+
+#include <newpluginapi.h>
+#include <win2k.h>
+#include <m_system_cpp.h>
+#include <m_options.h>
+#include <m_database.h>
+#include <m_langpack.h>
+#include <m_file.h>
+#include <m_protomod.h>
+#include <m_clui.h>
+#include <m_ignore.h>
+#include <m_icolib.h>
+#include <m_skin.h>
+#include <m_genmenu.h>
+#include <m_popup.h>
+#include <m_message.h>
-#pragma optimize("gsy",on)
+#include <m_fingerprint.h>
+#include <m_metacontacts.h>
+#include <m_msg_buttonsbar.h>
+
+#include "images.h"
+#include "version.h"
+#include "resource.h"
-#define VISPLG "MenuItemEx"
-#define MODULENAME VISPLG
+#define MODULENAME "MenuItemEx"
#define MIIM_STRING 0x00000040
diff --git a/plugins/MenuItemEx/src/options.cpp b/plugins/MenuItemEx/src/options.cpp
index 9b9fadc838..106c77453a 100644
--- a/plugins/MenuItemEx/src/options.cpp
+++ b/plugins/MenuItemEx/src/options.cpp
@@ -1,6 +1,5 @@
#include "menuex.h"
-
extern HINSTANCE hinstance;
extern BOOL bPopUpService;
@@ -31,7 +30,7 @@ static const checkboxes[]={
INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
{
- DWORD flags=DBGetContactSettingDword(NULL,VISPLG,"flags",vf_default);
+ DWORD flags = db_get_dw(NULL, MODULENAME, "flags", vf_default);
TCHAR buffer[64] = {0};
int i;
@@ -89,7 +88,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
}
//DBDeleteContactSetting(NULL,VISPLG,"flags");
- DBWriteContactSettingDword(NULL,VISPLG,"flags",mod_flags);
+ db_set_dw(NULL, MODULENAME, "flags", mod_flags);
return 1;
}
diff --git a/plugins/MenuItemEx/src/stdafx.cpp b/plugins/MenuItemEx/src/stdafx.cpp
new file mode 100644
index 0000000000..004cc7b921
--- /dev/null
+++ b/plugins/MenuItemEx/src/stdafx.cpp
@@ -0,0 +1,18 @@
+/*
+Copyright (C) 2012-13 Miranda NG Project (http://miranda-ng.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation version 2
+of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "menuex.h" \ No newline at end of file
diff --git a/plugins/MenuItemEx/src/version.h b/plugins/MenuItemEx/src/version.h
index 54ade5f3fa..da114387e0 100644
--- a/plugins/MenuItemEx/src/version.h
+++ b/plugins/MenuItemEx/src/version.h
@@ -1,11 +1,14 @@
-#define __FILEVERSION_STRING 1,3,0,9
-#define __VERSION_STRING "1.3.0.9"
-#define __VERSION_DWORD 0x01030009
+#define __MAJOR_VERSION 1
+#define __MINOR_VERSION 3
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 9
-#define __PLUGIN_NAME "Menu Item Ext"
-#define __WEB "http://miranda-ng.org/"
-#define __DESC "Adds some useful options to a contacts menu."
-#define __AUTHORS "Heiko Schillinger, Baloo, Billy_Bons, Robert P\xf6" "sel"
-#define __EMAIL "micron@nexgo.de, baloo@bk.ru, tatarinov.sergey@gmail.com, robyer@seznam.cz"
-#define __COPYRIGHTS "© 2001-03 Heiko Schillinger, © 2006-08 Baloo, © 2009-10 Billy_Bons, © 2011-12 Robert P\xf6" "sel"
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __PLUGIN_NAME "Menu item ext"
+#define __FILENAME "MenuEx.dll"
+#define __DESCRIPTION "Adds some useful options to a contacts menu."
+#define __AUTHOR "Heiko Schillinger, Baloo, Billy_Bons, Robert P\xf6" "sel"
+#define __AUTHOREMAIL "micron@nexgo.de; baloo@bk.ru; tatarinov.sergey@gmail.com; robyer@seznam.cz"
+#define __AUTHORWEB "http://miranda-ng.org/"
+#define __COPYRIGHT "© 2001-03 Heiko Schillinger, © 2006-08 Baloo, © 2009-10 Billy_Bons, © 2011-12 Robert P\xf6" "sel"