From 7fd3863d1a8da7ad32f44762792c1df82eebf5bf Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Thu, 28 Feb 2013 19:06:11 +0000 Subject: added precompiled header git-svn-id: http://svn.miranda-ng.org/main/trunk@3808 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MenuItemEx/src/images.cpp | 1 - plugins/MenuItemEx/src/main.cpp | 34 +++++++++++------------ plugins/MenuItemEx/src/menuex.h | 55 +++++++++++++++++--------------------- plugins/MenuItemEx/src/options.cpp | 5 ++-- plugins/MenuItemEx/src/stdafx.cpp | 18 +++++++++++++ plugins/MenuItemEx/src/version.h | 21 ++++++++------- 6 files changed, 73 insertions(+), 61 deletions(-) create mode 100644 plugins/MenuItemEx/src/stdafx.cpp (limited to 'plugins/MenuItemEx/src') 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 -#include "resource.h" -#include -#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 + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#pragma optimize("gsy",on) +#include +#include +#include + +#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 . +*/ + +#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" -- cgit v1.2.3