From d6963825060493cd956b9ab758169438328c5f12 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Sat, 25 Apr 2015 11:54:43 +0000 Subject: BuddyPounce - common project git-svn-id: http://svn.miranda-ng.org/main/trunk@13133 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BuddyPounce/buddypounce.vcxproj | 28 +++ plugins/BuddyPounce/buddypounce.vcxproj.filters | 4 + plugins/BuddyPounce/buddypounce_10.vcxproj | 200 -------------------- plugins/BuddyPounce/buddypounce_10.vcxproj.filters | 47 ----- plugins/BuddyPounce/buddypounce_12.vcxproj | 205 --------------------- plugins/BuddyPounce/buddypounce_12.vcxproj.filters | 47 ----- plugins/BuddyPounce/src/dialog.cpp | 3 +- plugins/BuddyPounce/src/headers.h | 79 -------- plugins/BuddyPounce/src/main.cpp | 15 +- plugins/BuddyPounce/src/stdafx.cpp | 18 -- plugins/BuddyPounce/src/stdafx.cxx | 18 ++ plugins/BuddyPounce/src/stdafx.h | 78 ++++++++ 12 files changed, 136 insertions(+), 606 deletions(-) create mode 100644 plugins/BuddyPounce/buddypounce.vcxproj create mode 100644 plugins/BuddyPounce/buddypounce.vcxproj.filters delete mode 100644 plugins/BuddyPounce/buddypounce_10.vcxproj delete mode 100644 plugins/BuddyPounce/buddypounce_10.vcxproj.filters delete mode 100644 plugins/BuddyPounce/buddypounce_12.vcxproj delete mode 100644 plugins/BuddyPounce/buddypounce_12.vcxproj.filters delete mode 100644 plugins/BuddyPounce/src/headers.h delete mode 100644 plugins/BuddyPounce/src/stdafx.cpp create mode 100644 plugins/BuddyPounce/src/stdafx.cxx create mode 100644 plugins/BuddyPounce/src/stdafx.h (limited to 'plugins/BuddyPounce') diff --git a/plugins/BuddyPounce/buddypounce.vcxproj b/plugins/BuddyPounce/buddypounce.vcxproj new file mode 100644 index 0000000000..e36f438bbd --- /dev/null +++ b/plugins/BuddyPounce/buddypounce.vcxproj @@ -0,0 +1,28 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + BuddyPounce + {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1} + + + + + \ No newline at end of file diff --git a/plugins/BuddyPounce/buddypounce.vcxproj.filters b/plugins/BuddyPounce/buddypounce.vcxproj.filters new file mode 100644 index 0000000000..de5ad9f66c --- /dev/null +++ b/plugins/BuddyPounce/buddypounce.vcxproj.filters @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/plugins/BuddyPounce/buddypounce_10.vcxproj b/plugins/BuddyPounce/buddypounce_10.vcxproj deleted file mode 100644 index a1517d6c20..0000000000 --- a/plugins/BuddyPounce/buddypounce_10.vcxproj +++ /dev/null @@ -1,200 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1} - BuddyPounce - - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - true - - - DynamicLibrary - Unicode - - - DynamicLibrary - Unicode - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - MultiThreadedDebugDLL - false - Disabled - Level3 - true - EditAndContinue - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - ..\..\include;%(AdditionalIncludeDirectories) - Use - headers.h - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - true - Windows - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin10\lib - false - - - - - MultiThreadedDebugDLL - false - Disabled - Level3 - ProgramDatabase - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - ..\..\include;%(AdditionalIncludeDirectories) - Use - headers.h - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - true - Windows - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin10\lib - false - - - - - true - true - Full - Level3 - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - ..\..\include;%(AdditionalIncludeDirectories) - Size - Use - headers.h - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - Windows - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin10\lib - false - true - true - true - /PDBALTPATH:%_PDB% %(AdditionalOptions) - - - - - true - true - Full - Level3 - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - ..\..\include;%(AdditionalIncludeDirectories) - Size - Use - headers.h - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - Windows - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin10\lib - false - true - true - true - /PDBALTPATH:%_PDB% %(AdditionalOptions) - - - - - - - - - - - - - - - - Create - - - - - - \ No newline at end of file diff --git a/plugins/BuddyPounce/buddypounce_10.vcxproj.filters b/plugins/BuddyPounce/buddypounce_10.vcxproj.filters deleted file mode 100644 index 846127ea91..0000000000 --- a/plugins/BuddyPounce/buddypounce_10.vcxproj.filters +++ /dev/null @@ -1,47 +0,0 @@ - - - - - {9d298f22-5cf4-4333-9011-7cd415d11096} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {a7418599-649b-40fe-bbe3-34ce8bca379a} - h;hpp;hxx;hm;inl - - - {70e5c422-62f9-4d76-ad7a-c888446ece4d} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Resource Files - - - Resource Files - - - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/plugins/BuddyPounce/buddypounce_12.vcxproj b/plugins/BuddyPounce/buddypounce_12.vcxproj deleted file mode 100644 index 1a4bf8b6a6..0000000000 --- a/plugins/BuddyPounce/buddypounce_12.vcxproj +++ /dev/null @@ -1,205 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {FBC473A7-6383-4C9F-A8FD-282A3CC44FD1} - BuddyPounce - - - - DynamicLibrary - v120_xp - Unicode - true - - - DynamicLibrary - v120_xp - Unicode - true - - - DynamicLibrary - v120_xp - Unicode - - - DynamicLibrary - v120_xp - Unicode - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)\Plugins\ - $(SolutionDir)$(Configuration)64\Plugins\ - $(SolutionDir)$(Configuration)\Obj\$(ProjectName)\ - $(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\ - true - - - - MultiThreadedDebugDLL - false - Disabled - Level3 - true - EditAndContinue - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - ..\..\include;%(AdditionalIncludeDirectories) - Use - headers.h - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - true - Windows - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin12\lib - false - false - - - - - MultiThreadedDebugDLL - false - Disabled - Level3 - ProgramDatabase - _DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - EnableFastChecks - ..\..\include;%(AdditionalIncludeDirectories) - Use - headers.h - - - _DEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - true - Windows - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin12\lib - false - - - - - true - true - Full - Level3 - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - ..\..\include;%(AdditionalIncludeDirectories) - Size - Use - headers.h - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - Windows - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin12\lib - false - true - true - true - /PDBALTPATH:%_PDB% %(AdditionalOptions) - - - - - true - true - Full - Level3 - NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - ..\..\include;%(AdditionalIncludeDirectories) - Size - Use - headers.h - - - NDEBUG;%(PreprocessorDefinitions) - ..\..\include\msapi - - - true - Windows - $(IntDir)$(TargetName).lib - $(ProfileDir)..\..\bin12\lib - false - true - true - true - /PDBALTPATH:%_PDB% %(AdditionalOptions) - - - - - - - - - - - - - - - - Create - - - - - - \ No newline at end of file diff --git a/plugins/BuddyPounce/buddypounce_12.vcxproj.filters b/plugins/BuddyPounce/buddypounce_12.vcxproj.filters deleted file mode 100644 index 846127ea91..0000000000 --- a/plugins/BuddyPounce/buddypounce_12.vcxproj.filters +++ /dev/null @@ -1,47 +0,0 @@ - - - - - {9d298f22-5cf4-4333-9011-7cd415d11096} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {a7418599-649b-40fe-bbe3-34ce8bca379a} - h;hpp;hxx;hm;inl - - - {70e5c422-62f9-4d76-ad7a-c888446ece4d} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - - - Resource Files - - - Resource Files - - - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp index 64f3400f94..df0e873783 100644 --- a/plugins/BuddyPounce/src/dialog.cpp +++ b/plugins/BuddyPounce/src/dialog.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" void populateSettingsList(HWND hwnd2List) { @@ -44,7 +44,6 @@ void saveLastSetting(MCONTACT hContact, HWND hwnd) GetDlgItemText(hwnd, IDC_SETTINGNUMBER, number, SIZEOF(number)); db_set_b(hContact, modname, "GiveUpDays", (BYTE)_ttoi(number)); { - time_t today = time(NULL); db_set_dw(hContact, modname, "GiveUpDate", (DWORD)(_ttoi(number)*SECONDSINADAY)); } break; diff --git a/plugins/BuddyPounce/src/headers.h b/plugins/BuddyPounce/src/headers.h deleted file mode 100644 index c9157088d4..0000000000 --- a/plugins/BuddyPounce/src/headers.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef _COMMONHEADERS_H -#define _COMMONHEADERS_H - -#define _CRT_SECURE_NO_WARNINGS -#define WIN32_LEAN_AND_MEAN - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "resource.h" -#include "Version.h" - -//======================================================= -// Definitions -//======================================================= -#define modname "buddypounce" -#define modFullname "Buddy Pounce" -#define msg(a,b) MessageBox(0,a,b,MB_OK) - -#define SECONDSINADAY 86400 - -/* flags for the sending and recieving.... */ -#define ANY 1 -#define ONLINE 2 -#define AWAY 4 -#define NA 8 -#define OCCUPIED 16 -#define DND 32 -#define FFC 64 -#define INVISIBLE 128 -#define PHONE 256 -#define LUNCH 512 - -//======================================================= -// Variables -//======================================================= - -struct windowInfo -{ - MCONTACT hContact; - HWND SendIfMy; - HWND SendWhenThey; -}; - -struct SendPounceDlgProcStruct -{ - MCONTACT hContact; - int timer; - TCHAR *message; -}; - -extern HINSTANCE hInst; - -//======================================================= -// Functions -//======================================================= - -// main.c -void SendPounce(TCHAR* text, MCONTACT hContact); - -//dialog.c -INT_PTR CALLBACK BuddyPounceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); -INT_PTR CALLBACK BuddyPounceSimpleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -INT_PTR CALLBACK BuddyPounceOptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -INT_PTR CALLBACK SendPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); -void CreateMessageAcknowlegedWindow(MCONTACT hContact, int SentSuccess); - -#endif //_COMMONHEADERS_H \ No newline at end of file diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 7a58be7869..843ee1d2ca 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" int hLangpack; HINSTANCE hInst; @@ -22,7 +22,7 @@ PLUGININFOEX pluginInfo={ // WINAPI DllMain //======================== -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) { hInst = hinstDLL; return TRUE; @@ -32,7 +32,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) //======================== -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { return &pluginInfo; } @@ -41,7 +41,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda // MainInit //=================== -int MainInit(WPARAM wParam, LPARAM lParam) +int MainInit(WPARAM, LPARAM) { CLISTMENUITEM mi = { sizeof(mi) }; mi.position=10; @@ -55,7 +55,7 @@ int MainInit(WPARAM wParam, LPARAM lParam) return 0; } -int MsgAck(WPARAM wParam, LPARAM lParam) +int MsgAck(WPARAM, LPARAM lParam) { ACKDATA *ack=(ACKDATA*)lParam; @@ -93,7 +93,7 @@ int MsgAck(WPARAM wParam, LPARAM lParam) return 0; } -int BuddyPounceOptInit(WPARAM wParam, LPARAM lParam) +int BuddyPounceOptInit(WPARAM wParam, LPARAM) { OPTIONSDIALOGPAGE odp = { 0 }; odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR; @@ -188,7 +188,7 @@ int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam) return 0; } -INT_PTR BuddyPounceMenuCommand(WPARAM hContact, LPARAM lParam) +INT_PTR BuddyPounceMenuCommand(WPARAM hContact, LPARAM) { if (db_get_b(NULL, modname, "UseAdvanced", 0) || db_get_b(hContact, modname, "UseAdvanced", 0)) CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_POUNCE),0,BuddyPounceDlgProc, hContact); @@ -201,7 +201,6 @@ INT_PTR AddSimpleMessage(WPARAM wParam, LPARAM lParam) { MCONTACT hContact = wParam; TCHAR* message = (TCHAR*)lParam; - time_t today = time(NULL); db_set_ws(hContact, modname, "PounceMsg", message); db_set_w(hContact, modname, "SendIfMyStatusIsFLAG", (WORD)db_get_w(NULL, modname, "SendIfMyStatusIsFLAG",1)); db_set_w(hContact, modname, "SendIfTheirStatusIsFLAG", (WORD)db_get_w(NULL, modname, "SendIfTheirStatusIsFLAG",1)); diff --git a/plugins/BuddyPounce/src/stdafx.cpp b/plugins/BuddyPounce/src/stdafx.cpp deleted file mode 100644 index 7e0216078c..0000000000 --- a/plugins/BuddyPounce/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 "headers.h" \ No newline at end of file diff --git a/plugins/BuddyPounce/src/stdafx.cxx b/plugins/BuddyPounce/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/BuddyPounce/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/BuddyPounce/src/stdafx.h b/plugins/BuddyPounce/src/stdafx.h new file mode 100644 index 0000000000..9cbaf66a71 --- /dev/null +++ b/plugins/BuddyPounce/src/stdafx.h @@ -0,0 +1,78 @@ +#ifndef _COMMONHEADERS_H +#define _COMMONHEADERS_H + +#define WIN32_LEAN_AND_MEAN + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "resource.h" +#include "Version.h" + +//======================================================= +// Definitions +//======================================================= +#define modname "buddypounce" +#define modFullname "Buddy Pounce" +#define msg(a,b) MessageBox(0,a,b,MB_OK) + +#define SECONDSINADAY 86400 + +/* flags for the sending and recieving.... */ +#define ANY 1 +#define ONLINE 2 +#define AWAY 4 +#define NA 8 +#define OCCUPIED 16 +#define DND 32 +#define FFC 64 +#define INVISIBLE 128 +#define PHONE 256 +#define LUNCH 512 + +//======================================================= +// Variables +//======================================================= + +struct windowInfo +{ + MCONTACT hContact; + HWND SendIfMy; + HWND SendWhenThey; +}; + +struct SendPounceDlgProcStruct +{ + MCONTACT hContact; + int timer; + TCHAR *message; +}; + +extern HINSTANCE hInst; + +//======================================================= +// Functions +//======================================================= + +// main.c +void SendPounce(TCHAR* text, MCONTACT hContact); + +//dialog.c +INT_PTR CALLBACK BuddyPounceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK BuddyPounceSimpleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK BuddyPounceOptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); +INT_PTR CALLBACK SendPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); +void CreateMessageAcknowlegedWindow(MCONTACT hContact, int SentSuccess); + +#endif //_COMMONHEADERS_H \ No newline at end of file -- cgit v1.2.3