From b51c00fa7ee7a159b71186d818da4da1e5b34450 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Sun, 26 Jul 2015 10:29:35 +0000 Subject: Nudge: common project git-svn-id: http://svn.miranda-ng.org/main/trunk@14712 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Nudge/src/headers.h | 84 ------------------------------------------- plugins/Nudge/src/main.cpp | 10 +++--- plugins/Nudge/src/nudge.cpp | 2 +- plugins/Nudge/src/options.cpp | 6 ++-- plugins/Nudge/src/shake.cpp | 6 ++-- plugins/Nudge/src/stdafx.cpp | 18 ---------- plugins/Nudge/src/stdafx.cxx | 18 ++++++++++ plugins/Nudge/src/stdafx.h | 82 ++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 111 insertions(+), 115 deletions(-) delete mode 100644 plugins/Nudge/src/headers.h delete mode 100644 plugins/Nudge/src/stdafx.cpp create mode 100644 plugins/Nudge/src/stdafx.cxx create mode 100644 plugins/Nudge/src/stdafx.h (limited to 'plugins/Nudge/src') diff --git a/plugins/Nudge/src/headers.h b/plugins/Nudge/src/headers.h deleted file mode 100644 index 5a1fa0e324..0000000000 --- a/plugins/Nudge/src/headers.h +++ /dev/null @@ -1,84 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#define _CRT_SECURE_NO_WARNINGS - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "resource.h" -#include "shake.h" -#include "Version.h" -#include "nudge.h" - -/* -* -****************************/ -int NudgeOptInit(WPARAM wParam,LPARAM lParam); - -/* -* -****************************/ -int Preview(); - -/* -* -****************************/ -void Nudge_ShowPopup(CNudgeElement*, MCONTACT, TCHAR *); - -/* -* -****************************/ -void Nudge_ShowStatus(CNudgeElement*, MCONTACT, DWORD timestamp); - -/* -* -****************************/ -void Nudge_SentStatus(CNudgeElement*, MCONTACT); - -/* -* -****************************/ -void Nudge_AddAccount(PROTOACCOUNT *proto); - -/* -* -****************************/ -void LoadPopupClass(); - -/* -* -****************************/ -void AutoResendNudge(void *wParam) ; - -/////////////////////////////////////////////////////////////////////////////// -// external variables - -extern HINSTANCE hInst; -extern int nProtocol; -extern CShake shake; -extern CNudge GlobalNudge; - -extern CNudgeElement DefaultNudge; -extern OBJLIST arNudges; \ No newline at end of file diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index 614da4686b..53fc784290 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" int nProtocol = 0; static HANDLE hPopupClass; @@ -194,13 +194,13 @@ int NudgeReceived(WPARAM hContact, LPARAM lParam) return 0; } -extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) { hInst = hinstDLL; return TRUE; } -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) { return &pluginInfo; } @@ -246,7 +246,7 @@ static int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam) return 0; } -static int TabsrmmButtonInit(WPARAM wParam, LPARAM lParam) +static int TabsrmmButtonInit(WPARAM, LPARAM) { BBButton bbd = { sizeof(bbd) }; bbd.pszModuleName = "Nudge"; @@ -441,7 +441,7 @@ int Preview() return 0; } -void Nudge_ShowPopup(CNudgeElement *n, MCONTACT hContact, TCHAR * Message) +void Nudge_ShowPopup(CNudgeElement*, MCONTACT hContact, TCHAR * Message) { hContact = db_mc_tryMeta(hContact); TCHAR *lpzContactName = (TCHAR*)pcli->pfnGetContactDisplayName(hContact, 0); diff --git a/plugins/Nudge/src/nudge.cpp b/plugins/Nudge/src/nudge.cpp index f2817152ef..65b56df049 100644 --- a/plugins/Nudge/src/nudge.cpp +++ b/plugins/Nudge/src/nudge.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" void CNudge::Save(void) { diff --git a/plugins/Nudge/src/options.cpp b/plugins/Nudge/src/options.cpp index 4d428e92b7..959fafd6bd 100644 --- a/plugins/Nudge/src/options.cpp +++ b/plugins/Nudge/src/options.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" CNudgeElement* ActualNudge = NULL; @@ -170,8 +170,6 @@ static INT_PTR CALLBACK DlgProcShakeOpt(HWND hwnd,UINT msg,WPARAM wParam,LPARAM static void PopulateProtocolList(HWND hWnd) { - bool useOne = IsDlgButtonChecked(hWnd, IDC_USEBYPROTOCOL) == BST_UNCHECKED; - HWND hLstView = GetDlgItem(hWnd, IDC_PROTOLIST); TreeView_DeleteAllItems(hLstView); @@ -377,7 +375,7 @@ static INT_PTR CALLBACK DlgProcNudgeOpt(HWND hwnd, UINT msg, WPARAM wParam, LPAR ///////////////////////////////////////////////////////////////////////////////////////// -int NudgeOptInit(WPARAM wParam, LPARAM lParam) +int NudgeOptInit(WPARAM wParam, LPARAM) { OPTIONSDIALOGPAGE odp = { 0 }; odp.position = -790000000; diff --git a/plugins/Nudge/src/shake.cpp b/plugins/Nudge/src/shake.cpp index cf3e7c24f2..7ecb6d0463 100644 --- a/plugins/Nudge/src/shake.cpp +++ b/plugins/Nudge/src/shake.cpp @@ -1,4 +1,4 @@ -#include "headers.h" +#include "stdafx.h" void CShake::Load(void) { @@ -29,13 +29,13 @@ void __cdecl ShakeClistWindow(void *Param) shake.ShakeClist(hWnd); } -INT_PTR ShakeClist(WPARAM wParam, LPARAM lParam) +INT_PTR ShakeClist(WPARAM, LPARAM) { mir_forkthread(ShakeClistWindow, (void*)pcli->hwndContactList); return 0; } -INT_PTR ShakeChat(WPARAM wParam, LPARAM lParam) +INT_PTR ShakeChat(WPARAM wParam, LPARAM) { if (((HANDLE)wParam) == NULL) return -1; diff --git a/plugins/Nudge/src/stdafx.cpp b/plugins/Nudge/src/stdafx.cpp deleted file mode 100644 index 7e0216078c..0000000000 --- a/plugins/Nudge/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/Nudge/src/stdafx.cxx b/plugins/Nudge/src/stdafx.cxx new file mode 100644 index 0000000000..6fb37564b7 --- /dev/null +++ b/plugins/Nudge/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/Nudge/src/stdafx.h b/plugins/Nudge/src/stdafx.h new file mode 100644 index 0000000000..f12cc9839b --- /dev/null +++ b/plugins/Nudge/src/stdafx.h @@ -0,0 +1,82 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "resource.h" +#include "shake.h" +#include "Version.h" +#include "nudge.h" + +/* +* +****************************/ +int NudgeOptInit(WPARAM wParam,LPARAM lParam); + +/* +* +****************************/ +int Preview(); + +/* +* +****************************/ +void Nudge_ShowPopup(CNudgeElement*, MCONTACT, TCHAR *); + +/* +* +****************************/ +void Nudge_ShowStatus(CNudgeElement*, MCONTACT, DWORD timestamp); + +/* +* +****************************/ +void Nudge_SentStatus(CNudgeElement*, MCONTACT); + +/* +* +****************************/ +void Nudge_AddAccount(PROTOACCOUNT *proto); + +/* +* +****************************/ +void LoadPopupClass(); + +/* +* +****************************/ +void AutoResendNudge(void *wParam) ; + +/////////////////////////////////////////////////////////////////////////////// +// external variables + +extern HINSTANCE hInst; +extern int nProtocol; +extern CShake shake; +extern CNudge GlobalNudge; + +extern CNudgeElement DefaultNudge; +extern OBJLIST arNudges; \ No newline at end of file -- cgit v1.2.3