From b36570eeab759b37b50da15f67a2f844357fde1a Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sat, 1 Aug 2015 20:12:09 +0000 Subject: UInfoEx: common project git-svn-id: http://svn.miranda-ng.org/main/trunk@14795 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/UserInfoEx/src/Flags/svc_flags.cpp | 2 +- plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp | 2 +- plugins/UserInfoEx/src/classMAnnivDate.cpp | 2 +- plugins/UserInfoEx/src/classMTime.cpp | 2 +- plugins/UserInfoEx/src/classPsTree.cpp | 2 +- plugins/UserInfoEx/src/classPsTreeItem.cpp | 2 +- plugins/UserInfoEx/src/commonheaders.cpp | 2 +- plugins/UserInfoEx/src/commonheaders.h | 233 --------------------- plugins/UserInfoEx/src/ctrl_annivedit.cpp | 2 +- plugins/UserInfoEx/src/ctrl_base.cpp | 2 +- plugins/UserInfoEx/src/ctrl_button.cpp | 2 +- plugins/UserInfoEx/src/ctrl_combo.cpp | 2 +- plugins/UserInfoEx/src/ctrl_contact.cpp | 2 +- plugins/UserInfoEx/src/ctrl_edit.cpp | 2 +- plugins/UserInfoEx/src/ctrl_tzcombo.cpp | 2 +- plugins/UserInfoEx/src/dlg_anniversarylist.cpp | 2 +- plugins/UserInfoEx/src/dlg_msgbox.cpp | 2 +- plugins/UserInfoEx/src/dlg_propsheet.cpp | 2 +- .../src/ex_import/classExImContactBase.cpp | 2 +- .../src/ex_import/classExImContactXML.cpp | 2 +- .../UserInfoEx/src/ex_import/dlg_ExImModules.cpp | 2 +- .../src/ex_import/dlg_ExImOpenSaveFile.cpp | 2 +- .../UserInfoEx/src/ex_import/dlg_ExImProgress.cpp | 2 +- plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp | 2 +- plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp | 2 +- plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp | 2 +- plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp | 2 +- plugins/UserInfoEx/src/ex_import/tinystr.cpp | 2 +- plugins/UserInfoEx/src/ex_import/tinyxml.cpp | 2 +- plugins/UserInfoEx/src/ex_import/tinyxmlerror.cpp | 2 +- plugins/UserInfoEx/src/ex_import/tinyxmlparser.cpp | 2 +- plugins/UserInfoEx/src/init.cpp | 2 +- plugins/UserInfoEx/src/mir_contactqueue.cpp | 2 +- plugins/UserInfoEx/src/mir_db.cpp | 2 +- plugins/UserInfoEx/src/mir_icolib.cpp | 2 +- plugins/UserInfoEx/src/mir_menuitems.cpp | 2 +- plugins/UserInfoEx/src/mir_string.cpp | 2 +- plugins/UserInfoEx/src/psp_about.cpp | 2 +- plugins/UserInfoEx/src/psp_anniversary.cpp | 2 +- plugins/UserInfoEx/src/psp_base.cpp | 2 +- plugins/UserInfoEx/src/psp_company.cpp | 2 +- plugins/UserInfoEx/src/psp_contact.cpp | 2 +- plugins/UserInfoEx/src/psp_general.cpp | 2 +- plugins/UserInfoEx/src/psp_options.cpp | 2 +- plugins/UserInfoEx/src/psp_origin.cpp | 2 +- plugins/UserInfoEx/src/psp_profile.cpp | 2 +- plugins/UserInfoEx/src/stdafx.cpp | 18 -- plugins/UserInfoEx/src/stdafx.cxx | 18 ++ plugins/UserInfoEx/src/stdafx.h | 232 ++++++++++++++++++++ plugins/UserInfoEx/src/svc_avatar.cpp | 2 +- plugins/UserInfoEx/src/svc_constants.cpp | 2 +- plugins/UserInfoEx/src/svc_contactinfo.cpp | 2 +- plugins/UserInfoEx/src/svc_email.cpp | 2 +- plugins/UserInfoEx/src/svc_gender.cpp | 2 +- plugins/UserInfoEx/src/svc_homepage.cpp | 2 +- plugins/UserInfoEx/src/svc_phone.cpp | 2 +- plugins/UserInfoEx/src/svc_refreshci.cpp | 2 +- plugins/UserInfoEx/src/svc_reminder.cpp | 2 +- plugins/UserInfoEx/src/svc_timezone.cpp | 2 +- plugins/UserInfoEx/src/svc_timezone_old.cpp | 2 +- 60 files changed, 306 insertions(+), 307 deletions(-) delete mode 100644 plugins/UserInfoEx/src/commonheaders.h delete mode 100644 plugins/UserInfoEx/src/stdafx.cpp create mode 100644 plugins/UserInfoEx/src/stdafx.cxx create mode 100644 plugins/UserInfoEx/src/stdafx.h (limited to 'plugins/UserInfoEx/src') diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp index 33d0ccf619..98c2b9744a 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp @@ -22,7 +22,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "..\commonheaders.h" +#include "..\stdafx.h" #define M_ENABLE_SUBCTLS (WM_APP+1) diff --git a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp index edc6e1718c..3468fcb749 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flagsicons.cpp @@ -22,7 +22,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "..\commonheaders.h" +#include "..\stdafx.h" /************************* Bitmap Access **************************/ diff --git a/plugins/UserInfoEx/src/classMAnnivDate.cpp b/plugins/UserInfoEx/src/classMAnnivDate.cpp index 6515cb28a5..6ab6a0644b 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.cpp +++ b/plugins/UserInfoEx/src/classMAnnivDate.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** * System Includes: **/ -#include "commonheaders.h" +#include "stdafx.h" /** * name: MAnnivDate diff --git a/plugins/UserInfoEx/src/classMTime.cpp b/plugins/UserInfoEx/src/classMTime.cpp index 35955d4d14..ac8eee269a 100644 --- a/plugins/UserInfoEx/src/classMTime.cpp +++ b/plugins/UserInfoEx/src/classMTime.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** * System Includes: **/ -#include "commonheaders.h" +#include "stdafx.h" /****************************************************************************************** * class MTime diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp index 033ce4c271..890af51d6c 100644 --- a/plugins/UserInfoEx/src/classPsTree.cpp +++ b/plugins/UserInfoEx/src/classPsTree.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /*********************************************************************************************************** * construction and destruction diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp index 48607af40a..1ab4e27610 100644 --- a/plugins/UserInfoEx/src/classPsTreeItem.cpp +++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /** * name: BoldGroupTitlesEnumChildren() diff --git a/plugins/UserInfoEx/src/commonheaders.cpp b/plugins/UserInfoEx/src/commonheaders.cpp index 9b4d77bff0..4a169f82ab 100644 --- a/plugins/UserInfoEx/src/commonheaders.cpp +++ b/plugins/UserInfoEx/src/commonheaders.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" // global: HINSTANCE ghInst = NULL; diff --git a/plugins/UserInfoEx/src/commonheaders.h b/plugins/UserInfoEx/src/commonheaders.h deleted file mode 100644 index 2fbfbafe67..0000000000 --- a/plugins/UserInfoEx/src/commonheaders.h +++ /dev/null @@ -1,233 +0,0 @@ -/* -UserinfoEx plugin for Miranda IM - -Copyright: -� 2006-2010 DeathAxe, Yasnovidyashii, Merlin, K. Romanov, Kreol - -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; either version 2 -of the License, or (at your option) any later version. - -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, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#pragma once - -/*********************************************************************************************************** - * some compiler definitions - ***********************************************************************************************************/ - -#define _CRT_SECURE_NO_DEPRECATE 1 -#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 0 -#define _CRT_SECURE_NO_WARNINGS - -/*********************************************************************************************************** - * standard windows includes - ***********************************************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace std; - -/*********************************************************************************************************** - * Miranda NG SDK includes and macros - ***********************************************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/*********************************************************************************************************** - * Used Plugins SDK includes and macros - ***********************************************************************************************************/ - -#include -#include -#include -#include - -/*********************************************************************************************************** - * UserInfoEx plugin includes and macros - ***********************************************************************************************************/ - -#ifndef MIR_OK -#define MIR_OK 0 // success value of a miranda service function -#define MIR_FAIL 1 // general failure value of a miranda service function -#endif - -#define MIRSUCCEEDED(f) ((f)==MIR_OK) -#define MIRFAILED(f) ((f)!=MIR_OK) -#define MIREXISTS(f) ((INT_PTR)(f)!=CALLSERVICE_NOTFOUND) - -#define PtrIsValid(p) (((p)!=0)&&(((HANDLE)(p))!=INVALID_HANDLE_VALUE)) -#define FREE(p) {if (PtrIsValid(p)){free((void*)p);(p)=NULL;}} -#define MIR_DELETE(p) {if (PtrIsValid(p)){delete(p);(p)=NULL;}} -#define MIR_FREE(p) {if (PtrIsValid(p)){mir_free((void*)p);(p)=NULL;}} - -#define GetUserData(p) GetWindowLongPtr((p), GWLP_USERDATA) -#define SetUserData(p, l) SetWindowLongPtr((p), GWLP_USERDATA, (LONG_PTR) (l)) - -unsigned int hashSetting_M2(const wchar_t * key); //new Murma2 hash -unsigned int hashSetting_M2(const char * key); //new Murma2 hash -unsigned int hashSettingW_M2(const char * key); //new Murma2 hash - -#include "resource.h" -#include "version.h" -#include "../IconPacks/default/src/icons.h" -#include "../IconPacks/ice/src/icons.h" -#include "svc_constants.h" -#include "svc_avatar.h" -#include "svc_contactinfo.h" -#include "svc_email.h" -#include "svc_gender.h" -#include "svc_homepage.h" -#include "svc_phone.h" -#include "svc_refreshci.h" -#include "svc_reminder.h" -#include "svc_timezone.h" -#include "svc_timezone_old.h" -#include "mir_contactqueue.h" -#include "mir_db.h" -#include "mir_string.h" -#include "mir_icolib.h" -#include "mir_menuitems.h" -#include "classMTime.h" -#include "classMAnnivDate.h" -#include "ctrl_base.h" -#include "ctrl_button.h" -#include "ctrl_contact.h" -#include "ctrl_annivedit.h" -#include "ctrl_combo.h" -#include "ctrl_edit.h" -#include "ctrl_tzcombo.h" -#include "dlg_msgbox.h" -#include "dlg_propsheet.h" -#include "dlg_anniversarylist.h" -#include "psp_base.h" -#include "psp_options.h" -#include "ex_import\svc_ExImport.h" -#include "ex_import\tinystr.h" -#include "ex_import\tinyxml.h" -#include "ex_import\mir_rfcCodecs.h" -#include "ex_import\classExImContactBase.h" -#include "ex_import\dlg_ExImProgress.h" -#include "ex_import\svc_ExImXML.h" -#include "ex_import\classExImContactXML.h" -#include "ex_import\dlg_ExImModules.h" -#include "ex_import\dlg_ExImOpenSaveFile.h" -#include "ex_import\svc_ExImINI.h" -#include "ex_import\svc_ExImVCF.h" -#include "flags\svc_flags.h" -#include "Flags\svc_flagsicons.h" - -/*********************************************************************************************************** - * UserInfoEx global variables - ***********************************************************************************************************/ - -typedef struct _MGLOBAL -{ - DWORD mirandaVersion; // mirandaVersion - BYTE CanChangeDetails : 1; // is service to upload own contact information for icq present? - BYTE TzIndexExist : 1; // Win Reg has Timzone Index Info - BYTE PopupActionsExist : 1; // Popup++ or MS_POPUP_REGISTERACTIONS exist - BYTE ShowPropsheetColours : 1; // cached SET_PROPSHEET_SHOWCOLOURS database value - BYTE WantAeroAdaption : 1; // reserved for later use - BYTE UseDbxTree : 1; // use dbx_tree ? -} MGLOBAL, *LPMGLOBAL; - -extern HINSTANCE ghInst; -extern MGLOBAL myGlobals; -extern FI_INTERFACE* FIP; -extern int nCountriesCount; -extern struct CountryListEntry *countries; - -/*********************************************************************************************************** - * MIRANDA_CPP_PLUGIN_API - ***********************************************************************************************************/ - -/** - * These macros provide an interface for classes to use member - * function as services and event hooks. - * - * @note This requires Miranda Core 0.8+! - * - **/ -#define MIRANDA_CPP_PLUGIN_API(CCoreClass) \ - typedef int (__cdecl CCoreClass::*EVENTHOOK)(WPARAM, LPARAM); \ - typedef int (__cdecl CCoreClass::*EVENTHOOKPARAM)(WPARAM, LPARAM, LPARAM); \ - typedef int (__cdecl CCoreClass::*SERVICEFUNC)(WPARAM, LPARAM); \ - typedef int (__cdecl CCoreClass::*SERVICEFUNCPARAM)(WPARAM, LPARAM, LPARAM); \ - \ - HANDLE ThisHookEvent(const char* szEvent, EVENTHOOK pfnEvent) \ - { return (HANDLE) ::HookEventObj(szEvent, (MIRANDAHOOKOBJ) (*(PVOID*) &pfnEvent), (PVOID)this);} \ - HANDLE ThisHookEventParam(const char* szEvent, EVENTHOOKPARAM pfnEvent, LPARAM lParam) \ - { return (HANDLE) ::HookEventObjParam(szEvent, (MIRANDAHOOKOBJPARAM) (*(PVOID*) &pfnEvent), (PVOID)this, lParam); } \ - \ - HANDLE ThisCreateService(const char* szService, SERVICEFUNC pfnService) \ - { return (HANDLE) ::CreateServiceFunctionObj(szService, (MIRANDASERVICEOBJ) (*(PVOID*) &pfnService), (PVOID)this); } \ - HANDLE ThisCreateServiceParam(const char* szService, SERVICEFUNCPARAM pfnService, LPARAM lParam) \ - { return (HANDLE) ::CreateServiceFunctionObjParam(szService, (MIRANDASERVICEOBJPARAM) (*(PVOID*) &pfnService), (PVOID)this, lParam); } \ - -/*********************************************************************************************************** - * UserInfoEx common used functions - ***********************************************************************************************************/ - -DWORD hashSetting(LPCSTR szStr); //old miranda hash - -INT_PTR myDestroyServiceFunction(const char * key); - -static FORCEINLINE BOOL IsProtoOnline(LPSTR pszProto) -{ - return pszProto && pszProto[0] && CallProtoService(pszProto, PS_GETSTATUS, NULL, NULL) >= ID_STATUS_ONLINE; -} - -static FORCEINLINE BOOL IsProtoAccountEnabled(PROTOACCOUNT *pAcc) -{ - return (pAcc->bIsEnabled && Proto_GetAccount(pAcc->szModuleName)); -} - -typedef HRESULT (STDAPICALLTYPE *pfnDwmIsCompositionEnabled)(BOOL *); -extern pfnDwmIsCompositionEnabled dwmIsCompositionEnabled; -static FORCEINLINE BYTE IsAeroMode() -{ - BOOL result; - return myGlobals.WantAeroAdaption && dwmIsCompositionEnabled && (dwmIsCompositionEnabled(&result) == S_OK) && result; -} diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.cpp b/plugins/UserInfoEx/src/ctrl_annivedit.cpp index 25454e73c3..c13a17dbd6 100644 --- a/plugins/UserInfoEx/src/ctrl_annivedit.cpp +++ b/plugins/UserInfoEx/src/ctrl_annivedit.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" CBaseCtrl* CAnnivEditCtrl::CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting) { diff --git a/plugins/UserInfoEx/src/ctrl_base.cpp b/plugins/UserInfoEx/src/ctrl_base.cpp index 9c82d728ad..c226ec3134 100644 --- a/plugins/UserInfoEx/src/ctrl_base.cpp +++ b/plugins/UserInfoEx/src/ctrl_base.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /*********************************************************************************************************** * Old methods for setting text color of dialog controls diff --git a/plugins/UserInfoEx/src/ctrl_button.cpp b/plugins/UserInfoEx/src/ctrl_button.cpp index 38f34149d1..e2ec2b7292 100644 --- a/plugins/UserInfoEx/src/ctrl_button.cpp +++ b/plugins/UserInfoEx/src/ctrl_button.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" // Used for our own cheap TrackMouseEvent #define BUTTON_POLLID 100 diff --git a/plugins/UserInfoEx/src/ctrl_combo.cpp b/plugins/UserInfoEx/src/ctrl_combo.cpp index b32ea49ee0..12a84556ad 100644 --- a/plugins/UserInfoEx/src/ctrl_combo.cpp +++ b/plugins/UserInfoEx/src/ctrl_combo.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /** * This static method creates an object for the CCombo class and returns its pointer. diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index 372e830963..b89767a117 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" #define MAX_CAT 64 diff --git a/plugins/UserInfoEx/src/ctrl_edit.cpp b/plugins/UserInfoEx/src/ctrl_edit.cpp index 299aeb0663..e627eb5882 100644 --- a/plugins/UserInfoEx/src/ctrl_edit.cpp +++ b/plugins/UserInfoEx/src/ctrl_edit.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /** * This function creates a CEditCtrl object. diff --git a/plugins/UserInfoEx/src/ctrl_tzcombo.cpp b/plugins/UserInfoEx/src/ctrl_tzcombo.cpp index 52dd6b0d1b..5192cde19c 100644 --- a/plugins/UserInfoEx/src/ctrl_tzcombo.cpp +++ b/plugins/UserInfoEx/src/ctrl_tzcombo.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" static INT_PTR EnumNamesProc(CTimeZone *pTimeZone, int index, LPARAM lParam) { diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp index 9584657a6a..2d1d7761a5 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** * System Includes: **/ -#include "commonheaders.h" +#include "stdafx.h" #include "svc_gender.h" #include "svc_reminder.h" #include "dlg_anniversarylist.h" diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp index d2a8f9baec..dec690cae0 100644 --- a/plugins/UserInfoEx/src/dlg_msgbox.cpp +++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp @@ -20,7 +20,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" #include #include #include diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 3d9324da40..b0f9a2999e 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /** * System & local includes: **/ -#include "commonheaders.h" +#include "stdafx.h" #include "dlg_propsheet.h" #include "psp_base.h" #include "ex_import\svc_ExImport.h" diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp index 0951d07ace..22bb4cea5f 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "..\commonheaders.h" +#include "..\stdafx.h" /** * name: CExImContactBase diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index 50e52a490f..fcdd7b15c4 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "..\commonheaders.h" +#include "..\stdafx.h" /*********************************************************************************************************** * common stuff diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp index 7c3c94c116..a0cac027d1 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "..\commonheaders.h" +#include "..\stdafx.h" /*********************************************************************************************************** * typedefs diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp index c25ca2a7a3..449b84cace 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "..\commonheaders.h" +#include "..\stdafx.h" #define HKEY_MIRANDA_PLACESBAR _T("Software\\Miranda NG\\PlacesBar") #define HKEY_WINPOL_PLACESBAR _T("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\ComDlg32\\PlacesBar") diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp index f2d1f52d8d..5d242d12a5 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "..\commonheaders.h" +#include "..\stdafx.h" /*********************************************************************************************************** * windows procedure diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp index de7bfe646e..2491f58242 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * system & local includes: **/ -#include "..\commonheaders.h" +#include "..\stdafx.h" /*********************************************************************************************************** * exporting stuff diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp index 73322070da..2d9e69541f 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * system & local includes: **/ -#include "../commonheaders.h" +#include "../stdafx.h" #define BLOCKSIZE 260 diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp index d6cb697531..687e596e13 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "..\commonheaders.h" +#include "..\stdafx.h" #define XMLCARD_VERSION "1.1" diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp index e2dd3d4ee7..fa5139c530 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "..\commonheaders.h" +#include "..\stdafx.h" /*********************************************************************************************************** * internal functions diff --git a/plugins/UserInfoEx/src/ex_import/tinystr.cpp b/plugins/UserInfoEx/src/ex_import/tinystr.cpp index 1041e8f037..55da240e24 100644 --- a/plugins/UserInfoEx/src/ex_import/tinystr.cpp +++ b/plugins/UserInfoEx/src/ex_import/tinystr.cpp @@ -42,7 +42,7 @@ Copyright: =============================================================================== */ -#include "..\commonheaders.h" +#include "..\stdafx.h" #ifndef TIXML_USE_STL diff --git a/plugins/UserInfoEx/src/ex_import/tinyxml.cpp b/plugins/UserInfoEx/src/ex_import/tinyxml.cpp index b41bffa85e..e03c5150bd 100644 --- a/plugins/UserInfoEx/src/ex_import/tinyxml.cpp +++ b/plugins/UserInfoEx/src/ex_import/tinyxml.cpp @@ -30,7 +30,7 @@ Copyright: =============================================================================== */ -#include "..\commonheaders.h" +#include "..\stdafx.h" bool TiXmlBase::condenseWhiteSpace = true; diff --git a/plugins/UserInfoEx/src/ex_import/tinyxmlerror.cpp b/plugins/UserInfoEx/src/ex_import/tinyxmlerror.cpp index f227011d67..5832e115f0 100644 --- a/plugins/UserInfoEx/src/ex_import/tinyxmlerror.cpp +++ b/plugins/UserInfoEx/src/ex_import/tinyxmlerror.cpp @@ -30,7 +30,7 @@ Copyright: =============================================================================== */ -#include "..\commonheaders.h" +#include "..\stdafx.h" // The goal of the seperate error file is to make the first // step towards localization. tinyxml (currently) only supports diff --git a/plugins/UserInfoEx/src/ex_import/tinyxmlparser.cpp b/plugins/UserInfoEx/src/ex_import/tinyxmlparser.cpp index 40f271cb3e..8f38ee8ce7 100644 --- a/plugins/UserInfoEx/src/ex_import/tinyxmlparser.cpp +++ b/plugins/UserInfoEx/src/ex_import/tinyxmlparser.cpp @@ -30,7 +30,7 @@ Copyright: =============================================================================== */ -#include "..\commonheaders.h" +#include "..\stdafx.h" // Note tha "PutString" hardcodes the same list. This // is less flexible than it appears. Changing the entries diff --git a/plugins/UserInfoEx/src/init.cpp b/plugins/UserInfoEx/src/init.cpp index 77324e2eee..a674881ea7 100644 --- a/plugins/UserInfoEx/src/init.cpp +++ b/plugins/UserInfoEx/src/init.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" static PLUGININFOEX pluginInfo = { sizeof(PLUGININFOEX), diff --git a/plugins/UserInfoEx/src/mir_contactqueue.cpp b/plugins/UserInfoEx/src/mir_contactqueue.cpp index d07cc07213..f0d8c23a62 100644 --- a/plugins/UserInfoEx/src/mir_contactqueue.cpp +++ b/plugins/UserInfoEx/src/mir_contactqueue.cpp @@ -18,7 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" static int QueueSortItems(const CQueueItem *i1, const CQueueItem *i2) { diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp index 2574bf1e8a..689e364cc7 100644 --- a/plugins/UserInfoEx/src/mir_db.cpp +++ b/plugins/UserInfoEx/src/mir_db.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" namespace DB { diff --git a/plugins/UserInfoEx/src/mir_icolib.cpp b/plugins/UserInfoEx/src/mir_icolib.cpp index 5ab5e1cefc..448e67b7ec 100644 --- a/plugins/UserInfoEx/src/mir_icolib.cpp +++ b/plugins/UserInfoEx/src/mir_icolib.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" typedef struct _ICODESC { diff --git a/plugins/UserInfoEx/src/mir_menuitems.cpp b/plugins/UserInfoEx/src/mir_menuitems.cpp index 003a2c9a88..bf72501961 100644 --- a/plugins/UserInfoEx/src/mir_menuitems.cpp +++ b/plugins/UserInfoEx/src/mir_menuitems.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" enum ECascadeType { MCAS_DISABLED = 2, diff --git a/plugins/UserInfoEx/src/mir_string.cpp b/plugins/UserInfoEx/src/mir_string.cpp index 2f2dd7a62a..b483b0fdb9 100644 --- a/plugins/UserInfoEx/src/mir_string.cpp +++ b/plugins/UserInfoEx/src/mir_string.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" char* mir_strncat_c(char *pszDest, const char cSrc) { diff --git a/plugins/UserInfoEx/src/psp_about.cpp b/plugins/UserInfoEx/src/psp_about.cpp index 2ee8e1fc78..d097a200b6 100644 --- a/plugins/UserInfoEx/src/psp_about.cpp +++ b/plugins/UserInfoEx/src/psp_about.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /** * Dialog procedure for the about/nodes information propertysheetpage diff --git a/plugins/UserInfoEx/src/psp_anniversary.cpp b/plugins/UserInfoEx/src/psp_anniversary.cpp index 3c602c500c..e634756e2f 100644 --- a/plugins/UserInfoEx/src/psp_anniversary.cpp +++ b/plugins/UserInfoEx/src/psp_anniversary.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /** * Dialog procedure for the anniversary add/edit dialog diff --git a/plugins/UserInfoEx/src/psp_base.cpp b/plugins/UserInfoEx/src/psp_base.cpp index eda25cd133..9437f693f3 100644 --- a/plugins/UserInfoEx/src/psp_base.cpp +++ b/plugins/UserInfoEx/src/psp_base.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" void UpDate_CountryIcon(HWND hCtrl, int countryID) { diff --git a/plugins/UserInfoEx/src/psp_company.cpp b/plugins/UserInfoEx/src/psp_company.cpp index 924b69f1da..48797d60bd 100644 --- a/plugins/UserInfoEx/src/psp_company.cpp +++ b/plugins/UserInfoEx/src/psp_company.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /** * Dialog procedure for the company contact information propertysheetpage diff --git a/plugins/UserInfoEx/src/psp_contact.cpp b/plugins/UserInfoEx/src/psp_contact.cpp index 88f61ba4f9..eef460bcbc 100644 --- a/plugins/UserInfoEx/src/psp_contact.cpp +++ b/plugins/UserInfoEx/src/psp_contact.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /** * Dialog procedure for the home contact information propertysheetpage diff --git a/plugins/UserInfoEx/src/psp_general.cpp b/plugins/UserInfoEx/src/psp_general.cpp index 946cd6ceb5..e0e5e349b0 100644 --- a/plugins/UserInfoEx/src/psp_general.cpp +++ b/plugins/UserInfoEx/src/psp_general.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /** * Dialog procedure for the contact information propertysheetpage diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index a87e9ba81a..27df42185d 100644 --- a/plugins/UserInfoEx/src/psp_options.cpp +++ b/plugins/UserInfoEx/src/psp_options.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" #define PSM_ENABLE_TABITEM (WM_USER+106) diff --git a/plugins/UserInfoEx/src/psp_origin.cpp b/plugins/UserInfoEx/src/psp_origin.cpp index a3275fa436..7e104fc3d4 100644 --- a/plugins/UserInfoEx/src/psp_origin.cpp +++ b/plugins/UserInfoEx/src/psp_origin.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /** * This is the dialog procedure for the advanced contact information propertysheetpage. diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp index babaa68667..d359f18298 100644 --- a/plugins/UserInfoEx/src/psp_profile.cpp +++ b/plugins/UserInfoEx/src/psp_profile.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" #define LVF_EDITLABEL 8 diff --git a/plugins/UserInfoEx/src/stdafx.cpp b/plugins/UserInfoEx/src/stdafx.cpp deleted file mode 100644 index 048b14e9d2..0000000000 --- a/plugins/UserInfoEx/src/stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright (C) 2012-15 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 "commonheaders.h" \ No newline at end of file diff --git a/plugins/UserInfoEx/src/stdafx.cxx b/plugins/UserInfoEx/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/UserInfoEx/src/stdafx.cxx @@ -0,0 +1,18 @@ +/* +Copyright (C) 2012-15 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 "stdafx.h" \ No newline at end of file diff --git a/plugins/UserInfoEx/src/stdafx.h b/plugins/UserInfoEx/src/stdafx.h new file mode 100644 index 0000000000..43675c5b5d --- /dev/null +++ b/plugins/UserInfoEx/src/stdafx.h @@ -0,0 +1,232 @@ +/* +UserinfoEx plugin for Miranda IM + +Copyright: +� 2006-2010 DeathAxe, Yasnovidyashii, Merlin, K. Romanov, Kreol + +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; either version 2 +of the License, or (at your option) any later version. + +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, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#pragma once + +/*********************************************************************************************************** + * some compiler definitions + ***********************************************************************************************************/ + +#define _CRT_SECURE_NO_DEPRECATE 1 +#define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 0 + +/*********************************************************************************************************** + * standard windows includes + ***********************************************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + +/*********************************************************************************************************** + * Miranda NG SDK includes and macros + ***********************************************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/*********************************************************************************************************** + * Used Plugins SDK includes and macros + ***********************************************************************************************************/ + +#include +#include +#include +#include + +/*********************************************************************************************************** + * UserInfoEx plugin includes and macros + ***********************************************************************************************************/ + +#ifndef MIR_OK +#define MIR_OK 0 // success value of a miranda service function +#define MIR_FAIL 1 // general failure value of a miranda service function +#endif + +#define MIRSUCCEEDED(f) ((f)==MIR_OK) +#define MIRFAILED(f) ((f)!=MIR_OK) +#define MIREXISTS(f) ((INT_PTR)(f)!=CALLSERVICE_NOTFOUND) + +#define PtrIsValid(p) (((p)!=0)&&(((HANDLE)(p))!=INVALID_HANDLE_VALUE)) +#define FREE(p) {if (PtrIsValid(p)){free((void*)p);(p)=NULL;}} +#define MIR_DELETE(p) {if (PtrIsValid(p)){delete(p);(p)=NULL;}} +#define MIR_FREE(p) {if (PtrIsValid(p)){mir_free((void*)p);(p)=NULL;}} + +#define GetUserData(p) GetWindowLongPtr((p), GWLP_USERDATA) +#define SetUserData(p, l) SetWindowLongPtr((p), GWLP_USERDATA, (LONG_PTR) (l)) + +unsigned int hashSetting_M2(const wchar_t * key); //new Murma2 hash +unsigned int hashSetting_M2(const char * key); //new Murma2 hash +unsigned int hashSettingW_M2(const char * key); //new Murma2 hash + +#include "resource.h" +#include "version.h" +#include "../IconPacks/default/src/icons.h" +#include "../IconPacks/ice/src/icons.h" +#include "svc_constants.h" +#include "svc_avatar.h" +#include "svc_contactinfo.h" +#include "svc_email.h" +#include "svc_gender.h" +#include "svc_homepage.h" +#include "svc_phone.h" +#include "svc_refreshci.h" +#include "svc_reminder.h" +#include "svc_timezone.h" +#include "svc_timezone_old.h" +#include "mir_contactqueue.h" +#include "mir_db.h" +#include "mir_string.h" +#include "mir_icolib.h" +#include "mir_menuitems.h" +#include "classMTime.h" +#include "classMAnnivDate.h" +#include "ctrl_base.h" +#include "ctrl_button.h" +#include "ctrl_contact.h" +#include "ctrl_annivedit.h" +#include "ctrl_combo.h" +#include "ctrl_edit.h" +#include "ctrl_tzcombo.h" +#include "dlg_msgbox.h" +#include "dlg_propsheet.h" +#include "dlg_anniversarylist.h" +#include "psp_base.h" +#include "psp_options.h" +#include "ex_import\svc_ExImport.h" +#include "ex_import\tinystr.h" +#include "ex_import\tinyxml.h" +#include "ex_import\mir_rfcCodecs.h" +#include "ex_import\classExImContactBase.h" +#include "ex_import\dlg_ExImProgress.h" +#include "ex_import\svc_ExImXML.h" +#include "ex_import\classExImContactXML.h" +#include "ex_import\dlg_ExImModules.h" +#include "ex_import\dlg_ExImOpenSaveFile.h" +#include "ex_import\svc_ExImINI.h" +#include "ex_import\svc_ExImVCF.h" +#include "flags\svc_flags.h" +#include "Flags\svc_flagsicons.h" + +/*********************************************************************************************************** + * UserInfoEx global variables + ***********************************************************************************************************/ + +typedef struct _MGLOBAL +{ + DWORD mirandaVersion; // mirandaVersion + BYTE CanChangeDetails : 1; // is service to upload own contact information for icq present? + BYTE TzIndexExist : 1; // Win Reg has Timzone Index Info + BYTE PopupActionsExist : 1; // Popup++ or MS_POPUP_REGISTERACTIONS exist + BYTE ShowPropsheetColours : 1; // cached SET_PROPSHEET_SHOWCOLOURS database value + BYTE WantAeroAdaption : 1; // reserved for later use + BYTE UseDbxTree : 1; // use dbx_tree ? +} MGLOBAL, *LPMGLOBAL; + +extern HINSTANCE ghInst; +extern MGLOBAL myGlobals; +extern FI_INTERFACE* FIP; +extern int nCountriesCount; +extern struct CountryListEntry *countries; + +/*********************************************************************************************************** + * MIRANDA_CPP_PLUGIN_API + ***********************************************************************************************************/ + +/** + * These macros provide an interface for classes to use member + * function as services and event hooks. + * + * @note This requires Miranda Core 0.8+! + * + **/ +#define MIRANDA_CPP_PLUGIN_API(CCoreClass) \ + typedef int (__cdecl CCoreClass::*EVENTHOOK)(WPARAM, LPARAM); \ + typedef int (__cdecl CCoreClass::*EVENTHOOKPARAM)(WPARAM, LPARAM, LPARAM); \ + typedef int (__cdecl CCoreClass::*SERVICEFUNC)(WPARAM, LPARAM); \ + typedef int (__cdecl CCoreClass::*SERVICEFUNCPARAM)(WPARAM, LPARAM, LPARAM); \ + \ + HANDLE ThisHookEvent(const char* szEvent, EVENTHOOK pfnEvent) \ + { return (HANDLE) ::HookEventObj(szEvent, (MIRANDAHOOKOBJ) (*(PVOID*) &pfnEvent), (PVOID)this);} \ + HANDLE ThisHookEventParam(const char* szEvent, EVENTHOOKPARAM pfnEvent, LPARAM lParam) \ + { return (HANDLE) ::HookEventObjParam(szEvent, (MIRANDAHOOKOBJPARAM) (*(PVOID*) &pfnEvent), (PVOID)this, lParam); } \ + \ + HANDLE ThisCreateService(const char* szService, SERVICEFUNC pfnService) \ + { return (HANDLE) ::CreateServiceFunctionObj(szService, (MIRANDASERVICEOBJ) (*(PVOID*) &pfnService), (PVOID)this); } \ + HANDLE ThisCreateServiceParam(const char* szService, SERVICEFUNCPARAM pfnService, LPARAM lParam) \ + { return (HANDLE) ::CreateServiceFunctionObjParam(szService, (MIRANDASERVICEOBJPARAM) (*(PVOID*) &pfnService), (PVOID)this, lParam); } \ + +/*********************************************************************************************************** + * UserInfoEx common used functions + ***********************************************************************************************************/ + +DWORD hashSetting(LPCSTR szStr); //old miranda hash + +INT_PTR myDestroyServiceFunction(const char * key); + +static FORCEINLINE BOOL IsProtoOnline(LPSTR pszProto) +{ + return pszProto && pszProto[0] && CallProtoService(pszProto, PS_GETSTATUS, NULL, NULL) >= ID_STATUS_ONLINE; +} + +static FORCEINLINE BOOL IsProtoAccountEnabled(PROTOACCOUNT *pAcc) +{ + return (pAcc->bIsEnabled && Proto_GetAccount(pAcc->szModuleName)); +} + +typedef HRESULT (STDAPICALLTYPE *pfnDwmIsCompositionEnabled)(BOOL *); +extern pfnDwmIsCompositionEnabled dwmIsCompositionEnabled; +static FORCEINLINE BYTE IsAeroMode() +{ + BOOL result; + return myGlobals.WantAeroAdaption && dwmIsCompositionEnabled && (dwmIsCompositionEnabled(&result) == S_OK) && result; +} diff --git a/plugins/UserInfoEx/src/svc_avatar.cpp b/plugins/UserInfoEx/src/svc_avatar.cpp index 3dde09a036..9f26ba8a6a 100644 --- a/plugins/UserInfoEx/src/svc_avatar.cpp +++ b/plugins/UserInfoEx/src/svc_avatar.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" namespace NServices { diff --git a/plugins/UserInfoEx/src/svc_constants.cpp b/plugins/UserInfoEx/src/svc_constants.cpp index 0abc59b0fd..21621fe2ce 100644 --- a/plugins/UserInfoEx/src/svc_constants.cpp +++ b/plugins/UserInfoEx/src/svc_constants.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" static IDSTRLIST TmplLanguages[] = { { 0, LPGEN("Unspecified"), 0}, diff --git a/plugins/UserInfoEx/src/svc_contactinfo.cpp b/plugins/UserInfoEx/src/svc_contactinfo.cpp index 627d3c2794..aaaf2d0a1b 100644 --- a/plugins/UserInfoEx/src/svc_contactinfo.cpp +++ b/plugins/UserInfoEx/src/svc_contactinfo.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * System Includes: **/ -#include "commonheaders.h" +#include "stdafx.h" #define CI_TCHAR(ci) (((ci)->dwFlag & CNF_UNICODE) ? DBVT_WCHAR : DBVT_ASCIIZ) diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp index 825416ad0e..5b1ffd38a4 100644 --- a/plugins/UserInfoEx/src/svc_email.cpp +++ b/plugins/UserInfoEx/src/svc_email.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" static HGENMENU ghMenuItem = NULL; static HANDLE ghExtraIconDef = INVALID_HANDLE_VALUE; diff --git a/plugins/UserInfoEx/src/svc_gender.cpp b/plugins/UserInfoEx/src/svc_gender.cpp index 409dca888c..50c400fa0c 100644 --- a/plugins/UserInfoEx/src/svc_gender.cpp +++ b/plugins/UserInfoEx/src/svc_gender.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" static HANDLE ghExtraIconF = INVALID_HANDLE_VALUE; static HANDLE ghExtraIconM = INVALID_HANDLE_VALUE; diff --git a/plugins/UserInfoEx/src/svc_homepage.cpp b/plugins/UserInfoEx/src/svc_homepage.cpp index 773846657e..1afc7c46ab 100644 --- a/plugins/UserInfoEx/src/svc_homepage.cpp +++ b/plugins/UserInfoEx/src/svc_homepage.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" static HGENMENU ghMenuItem = NULL; static HANDLE ghExtraIconDef = INVALID_HANDLE_VALUE; diff --git a/plugins/UserInfoEx/src/svc_phone.cpp b/plugins/UserInfoEx/src/svc_phone.cpp index 9246ff87a0..587ddc483d 100644 --- a/plugins/UserInfoEx/src/svc_phone.cpp +++ b/plugins/UserInfoEx/src/svc_phone.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" enum EPhoneType { diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index f30db6a40b..9d430eaf48 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" #define HM_PROTOACK (WM_USER+100) diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index aacdf1e6c1..b0b9f6e23d 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * System Includes: **/ -#include "commonheaders.h" +#include "stdafx.h" /** * The CEvent structure describes the next anniversary to remind of. diff --git a/plugins/UserInfoEx/src/svc_timezone.cpp b/plugins/UserInfoEx/src/svc_timezone.cpp index 29605c9c1d..76954c6d17 100644 --- a/plugins/UserInfoEx/src/svc_timezone.cpp +++ b/plugins/UserInfoEx/src/svc_timezone.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" /*********************************************************************************************************** * services diff --git a/plugins/UserInfoEx/src/svc_timezone_old.cpp b/plugins/UserInfoEx/src/svc_timezone_old.cpp index 18da6a4739..0ad0da33b8 100644 --- a/plugins/UserInfoEx/src/svc_timezone_old.cpp +++ b/plugins/UserInfoEx/src/svc_timezone_old.cpp @@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "commonheaders.h" +#include "stdafx.h" #define TZREG "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones" #define TZREG_9X "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Time Zones" -- cgit v1.2.3