summaryrefslogtreecommitdiff
path: root/plugins/ZeroNotification/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ZeroNotification/src')
-rw-r--r--plugins/ZeroNotification/src/common.h7
-rw-r--r--plugins/ZeroNotification/src/main.cpp49
-rw-r--r--plugins/ZeroNotification/src/stdafx.cpp18
-rw-r--r--plugins/ZeroNotification/src/version.h22
4 files changed, 60 insertions, 36 deletions
diff --git a/plugins/ZeroNotification/src/common.h b/plugins/ZeroNotification/src/common.h
index f40e68afb7..f881395cb5 100644
--- a/plugins/ZeroNotification/src/common.h
+++ b/plugins/ZeroNotification/src/common.h
@@ -1,5 +1,4 @@
#include <windows.h>
-#include <shlwapi.h>
#include <commctrl.h>
#include <newpluginapi.h>
@@ -7,9 +6,13 @@
#include <m_database.h>
#include <m_langpack.h>
#include <m_clist.h>
-#include <statusmodes.h>
#include <m_protosvc.h>
+#include "version.h"
+#include "resource.h"
+
+#define MODNAME "ZeroNotify"
+
#define DEFAULT_NOSOUND 0x00000000
#define DEFAULT_NOBLINK 0x00000000
#define DEFAULT_NOCLCBLINK 0x00000000
diff --git a/plugins/ZeroNotification/src/main.cpp b/plugins/ZeroNotification/src/main.cpp
index 0262d6e885..ce1c802618 100644
--- a/plugins/ZeroNotification/src/main.cpp
+++ b/plugins/ZeroNotification/src/main.cpp
@@ -9,9 +9,7 @@ Miranda can be found here:
http://miranda-ng.org/
*/
-#include "version.h"
#include "common.h"
-#include "resource.h"
HINSTANCE hInst;
@@ -38,15 +36,16 @@ static const struct CheckBoxValues_t statusValues[]={
PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
- PLUGINNAME,
- PLUGIN_MAKE_VERSION(VER_MAJOR, VER_MINOR, VER_RELEASE, VER_BUILD),
- DESCRIPTION,
- AUTHOR,
- "",
- COPYRIGHT,
- "http://miranda-ng.org/",
+ __PLUGIN_NAME,
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESCRIPTION,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
UNICODE_AWARE,
- { 0x47d489d3, 0x310d, 0x4ef6, { 0xbd, 0x5, 0x69, 0x9f, 0xff, 0xd5, 0xa4, 0xaa } } // {47D489D3-310D-4ef6-BD05-699FFFD5A4AA}
+ // {47D489D3-310D-4EF6-BD05-699FFFD5A4AA}
+ {0x47d489d3, 0x310d, 0x4ef6, {0xbd, 0x5, 0x69, 0x9f, 0xff, 0xd5, 0xa4, 0xaa}}
};
extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD mirandaVersion)
@@ -117,9 +116,9 @@ static int SoundSettingChanged(WPARAM wParam,LPARAM lParam)
static int SetNotify(const long status)
{
- DBWriteContactSettingByte(NULL,"Skin","UseSound", (BYTE) !(DBGetContactSettingDword(NULL,PLUGINNAME_SHORT,"NoSound",DEFAULT_NOSOUND) & status));
- DBWriteContactSettingByte(NULL,"CList","DisableTrayFlash", (BYTE) (DBGetContactSettingDword(NULL,PLUGINNAME_SHORT,"NoBlink",DEFAULT_NOBLINK) & status));
- DBWriteContactSettingByte(NULL,"CList","NoIconBlink", (BYTE) (DBGetContactSettingDword(NULL,PLUGINNAME_SHORT,"NoCLCBlink",DEFAULT_NOCLCBLINK) & status));
+ DBWriteContactSettingByte(NULL,"Skin","UseSound", (BYTE) !(DBGetContactSettingDword(NULL, MODNAME, "NoSound",DEFAULT_NOSOUND) & status));
+ DBWriteContactSettingByte(NULL,"CList","DisableTrayFlash", (BYTE) (DBGetContactSettingDword(NULL, MODNAME, "NoBlink",DEFAULT_NOBLINK) & status));
+ DBWriteContactSettingByte(NULL,"CList","NoIconBlink", (BYTE) (DBGetContactSettingDword(NULL, MODNAME, "NoCLCBlink",DEFAULT_NOCLCBLINK) & status));
UpdateMenuItem();
return 0;
@@ -156,11 +155,11 @@ static INT_PTR CALLBACK DlgProcNoSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam
SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_NOSOUND),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_NOSOUND),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_NOBLINK),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_NOBLINK),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
SetWindowLongPtr(GetDlgItem(hwndDlg,IDC_NOCLCBLINK),GWL_STYLE,GetWindowLongPtr(GetDlgItem(hwndDlg,IDC_NOCLCBLINK),GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
- CheckDlgButton(hwndDlg, IDC_HIDEMENU, DBGetContactSettingByte(NULL,PLUGINNAME_SHORT,"HideMenu",1) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_HIDEMENU, DBGetContactSettingByte(NULL, MODNAME, "HideMenu",1) ? BST_CHECKED : BST_UNCHECKED);
- FillCheckBoxTree(GetDlgItem(hwndDlg,IDC_NOSOUND),statusValues,sizeof(statusValues)/sizeof(statusValues[0]),DBGetContactSettingDword(NULL,PLUGINNAME_SHORT,"NoSound",DEFAULT_NOSOUND));
- FillCheckBoxTree(GetDlgItem(hwndDlg,IDC_NOBLINK),statusValues,sizeof(statusValues)/sizeof(statusValues[0]),DBGetContactSettingDword(NULL,PLUGINNAME_SHORT,"NoBlink",DEFAULT_NOBLINK));
- FillCheckBoxTree(GetDlgItem(hwndDlg,IDC_NOCLCBLINK),statusValues,sizeof(statusValues)/sizeof(statusValues[0]),DBGetContactSettingDword(NULL,PLUGINNAME_SHORT,"NoCLCBlink",DEFAULT_NOCLCBLINK));
+ FillCheckBoxTree(GetDlgItem(hwndDlg,IDC_NOSOUND),statusValues,sizeof(statusValues)/sizeof(statusValues[0]),DBGetContactSettingDword(NULL, MODNAME, "NoSound",DEFAULT_NOSOUND));
+ FillCheckBoxTree(GetDlgItem(hwndDlg,IDC_NOBLINK),statusValues,sizeof(statusValues)/sizeof(statusValues[0]),DBGetContactSettingDword(NULL, MODNAME, "NoBlink",DEFAULT_NOBLINK));
+ FillCheckBoxTree(GetDlgItem(hwndDlg,IDC_NOCLCBLINK),statusValues,sizeof(statusValues)/sizeof(statusValues[0]),DBGetContactSettingDword(NULL, MODNAME, "NoCLCBlink",DEFAULT_NOCLCBLINK));
return TRUE;
case WM_COMMAND:
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
@@ -191,11 +190,11 @@ static INT_PTR CALLBACK DlgProcNoSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- DBWriteContactSettingByte(NULL,PLUGINNAME_SHORT,"HideMenu",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_HIDEMENU));
+ DBWriteContactSettingByte(NULL, MODNAME, "HideMenu",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_HIDEMENU));
- DBWriteContactSettingDword(NULL,PLUGINNAME_SHORT,"NoSound",MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_NOSOUND)));
- DBWriteContactSettingDword(NULL,PLUGINNAME_SHORT,"NoBlink",MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_NOBLINK)));
- DBWriteContactSettingDword(NULL,PLUGINNAME_SHORT,"NoCLCBlink",MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_NOCLCBLINK)));
+ DBWriteContactSettingDword(NULL, MODNAME, "NoSound",MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_NOSOUND)));
+ DBWriteContactSettingDword(NULL, MODNAME, "NoBlink",MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_NOBLINK)));
+ DBWriteContactSettingDword(NULL, MODNAME, "NoCLCBlink",MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_NOCLCBLINK)));
test = DBGetContactSettingWord(NULL,"CList","Status",0);
SetNotify(Proto_Status2Flag(DBGetContactSettingWord(NULL,"CList","Status",0)));
@@ -239,15 +238,15 @@ extern "C" __declspec(dllexport) int Load(void)
mir_getLP(&pluginInfoEx);
//The menu item - begin
- if (!DBGetContactSettingByte(NULL, PLUGINNAME_SHORT, "HideMenu", 1)) {
- hSoundMenu = CreateServiceFunction(PLUGINNAME_SHORT "/MenuCommand", NoSoundMenuCommand);
+ if (!DBGetContactSettingByte(NULL, MODNAME, "HideMenu", 1)) {
+ hSoundMenu = CreateServiceFunction(MODNAME "/MenuCommand", NoSoundMenuCommand);
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_TCHAR;
UpdateMenuItem();
- mi.pszService = PLUGINNAME_SHORT "/MenuCommand";
+ mi.pszService = MODNAME "/MenuCommand";
noSoundMenu = Menu_AddMainMenuItem(&mi);
}
//The menu item - end
@@ -258,7 +257,7 @@ extern "C" __declspec(dllexport) int Load(void)
hEventOptionsInitialize = HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
//Uninstall info
- DBWriteContactSettingString(NULL, "Uninstall", PLUGINNAME_SHORT, PLUGINNAME_SHORT);
+ DBWriteContactSettingString(NULL, "Uninstall", MODNAME, MODNAME);
return 0;
}
diff --git a/plugins/ZeroNotification/src/stdafx.cpp b/plugins/ZeroNotification/src/stdafx.cpp
new file mode 100644
index 0000000000..1976d867da
--- /dev/null
+++ b/plugins/ZeroNotification/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 "common.h" \ No newline at end of file
diff --git a/plugins/ZeroNotification/src/version.h b/plugins/ZeroNotification/src/version.h
index 4678228b05..cb392b4f2f 100644
--- a/plugins/ZeroNotification/src/version.h
+++ b/plugins/ZeroNotification/src/version.h
@@ -1,10 +1,14 @@
-#define VER_MAJOR 0
-#define VER_MINOR 0
-#define VER_RELEASE 0
-#define VER_BUILD 5
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 0
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 5
-#define PLUGINNAME_SHORT "ZeroNotify"
-#define PLUGINNAME "Zero Notifications"
-#define DESCRIPTION "Adds options to automatically disable notifications when a protocol is in a certain status."
-#define AUTHOR "bidyut (<0.0.0.5), Maat"
-#define COPYRIGHT "© 2005 bidyut, © 2009 Maat"
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+
+#define __PLUGIN_NAME "Zero notifications"
+#define __FILENAME "ZeroNotify.dll"
+#define __DESCRIPTION "Adds options to automatically disable notifications when a protocol is in a certain status."
+#define __AUTHOR "bidyut, Maat"
+#define __AUTHOREMAIL ""
+#define __AUTHORWEB "http://miranda-ng.org/"
+#define __COPYRIGHT "© 2005 bidyut, 2009 Maat"