summaryrefslogtreecommitdiff
path: root/plugins/NewEventNotify
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-01-16 16:10:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-01-16 16:10:56 +0300
commit621085cc9a294c7c69b3bfab4125d6b8ff094524 (patch)
treea285165cf8dccb098247ad0ca36e156cd6644168 /plugins/NewEventNotify
parent4d91b4add55be0f9633bedb0893c63bcc0601555 (diff)
fixes #3299 (NewEventNotify: добавить опцию "Use Windows colors")
Diffstat (limited to 'plugins/NewEventNotify')
-rw-r--r--plugins/NewEventNotify/res/resource.rc35
-rw-r--r--plugins/NewEventNotify/src/options.cpp72
-rw-r--r--plugins/NewEventNotify/src/popup.cpp16
-rw-r--r--plugins/NewEventNotify/src/resource.h4
-rw-r--r--plugins/NewEventNotify/src/stdafx.h99
-rw-r--r--plugins/NewEventNotify/src/version.h2
6 files changed, 143 insertions, 85 deletions
diff --git a/plugins/NewEventNotify/res/resource.rc b/plugins/NewEventNotify/res/resource.rc
index 4e306c3060..5e18bde825 100644
--- a/plugins/NewEventNotify/res/resource.rc
+++ b/plugins/NewEventNotify/res/resource.rc
@@ -45,32 +45,37 @@ BEGIN
LTEXT "File",IDC_STATIC,139,17,39,8
LTEXT "Errors",IDC_STATIC,184,17,39,8
LTEXT "Others",IDC_STATIC,232,17,39,8
- LTEXT "Text",IDC_STATIC,9,35,70,8
+ LTEXT "Text",IDC_STATIC,10,35,70,8
CONTROL "",IDC_COLTEXT_MESSAGE,"ColourPicker",WS_TABSTOP,87,34,39,10
CONTROL "",IDC_COLTEXT_FILE,"ColourPicker",WS_TABSTOP,136,34,39,10
CONTROL "",IDC_COLTEXT_ERR,"ColourPicker",WS_TABSTOP,184,34,39,10
CONTROL "",IDC_COLTEXT_OTHERS,"ColourPicker",WS_TABSTOP,231,34,39,10
- LTEXT "Background",IDC_STATIC,9,51,70,8
+ LTEXT "Background",IDC_STATIC,10,51,70,8
CONTROL "",IDC_COLBACK_MESSAGE,"ColourPicker",WS_TABSTOP,87,50,39,10
CONTROL "",IDC_COLBACK_FILE,"ColourPicker",WS_TABSTOP,136,50,39,10
CONTROL "",IDC_COLBACK_ERR,"ColourPicker",WS_TABSTOP,184,50,39,10
CONTROL "",IDC_COLBACK_OTHERS,"ColourPicker",WS_TABSTOP,231,50,39,10
- LTEXT "Use default colors",IDC_STATIC,9,67,70,8
- CONTROL "",IDC_CHKDEFAULTCOL_MESSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,103,65,11,10
+ LTEXT "Use default colors",IDC_STATIC,10,67,70,8
+ CONTROL "",IDC_CHKDEFAULTCOL_MESSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,104,65,11,10
CONTROL "",IDC_CHKDEFAULTCOL_FILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,65,11,10
CONTROL "",IDC_CHKDEFAULTCOL_ERR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,199,65,11,10
CONTROL "",IDC_CHKDEFAULTCOL_OTHERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,244,65,11,10
- LTEXT "Timeout, secs",IDC_STATIC,9,83,70,8
- EDITTEXT IDC_DELAY_MESSAGE,87,81,39,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "",IDC_SPIN_MESSAGE,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,122,82,11,12
- EDITTEXT IDC_DELAY_FILE,136,81,39,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "",IDC_SPIN_FILE,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,168,80,11,12
- EDITTEXT IDC_DELAY_ERR,184,81,39,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "",IDC_SPIN_ERR,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,216,79,11,12
- EDITTEXT IDC_DELAY_OTHERS,231,81,39,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "",IDC_SPIN_OTHERS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,254,77,11,12
- PUSHBUTTON "Preview",IDC_PREVIEW,218,121,60,13
- LTEXT "(timeout -1 means forever, 0 - default)",IDC_STATIC,75,102,227,8
+ LTEXT "Use Windows colors",IDC_STATIC,10,82,70,8
+ CONTROL "",IDC_CHKWINCOL_MESSAGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,104,80,11,10
+ CONTROL "",IDC_CHKWINCOL_FILE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,150,80,11,10
+ CONTROL "",IDC_CHKWINCOL_ERR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,199,80,11,10
+ CONTROL "",IDC_CHKWINCOL_OTHERS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,244,80,11,10
+ LTEXT "Timeout, secs",IDC_STATIC,10,98,70,8
+ EDITTEXT IDC_DELAY_MESSAGE,87,96,39,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
+ CONTROL "",IDC_SPIN_MESSAGE,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,118,96,11,12
+ EDITTEXT IDC_DELAY_FILE,136,96,39,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
+ CONTROL "",IDC_SPIN_FILE,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,165,96,11,12
+ EDITTEXT IDC_DELAY_ERR,184,96,39,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
+ CONTROL "",IDC_SPIN_ERR,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,212,96,11,12
+ EDITTEXT IDC_DELAY_OTHERS,231,96,39,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
+ CONTROL "",IDC_SPIN_OTHERS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,259,96,11,12
+ PUSHBUTTON "Preview",IDC_PREVIEW,218,136,60,13
+ LTEXT "(timeout -1 means forever, 0 - default)",IDC_STATIC,75,117,227,8
END
IDD_OPT_MESSAGE DIALOGEX 0, 0, 302, 148
diff --git a/plugins/NewEventNotify/src/options.cpp b/plugins/NewEventNotify/src/options.cpp
index 84f25493d7..5507a230f9 100644
--- a/plugins/NewEventNotify/src/options.cpp
+++ b/plugins/NewEventNotify/src/options.cpp
@@ -32,21 +32,25 @@ void CMPlugin::OptionsRead(void)
bMsgReplyWindow = getBool(OPT_MSGREPLYWINDOW, false);
msg.bDefault = getBool(OPT_COLDEFAULT_MESSAGE, false);
+ msg.bWindows = getBool(OPT_COLWIN_MESSAGE, false);
msg.backColor = getDword(OPT_COLBACK_MESSAGE, DEFAULT_COLBACK);
msg.textColor = getDword(OPT_COLTEXT_MESSAGE, DEFAULT_COLTEXT);
msg.iDelay = getDword(OPT_DELAY_MESSAGE, DEFAULT_DELAY);
file.bDefault = getBool(OPT_COLDEFAULT_FILE, false);
+ file.bWindows = getBool(OPT_COLWIN_FILE, false);
file.backColor = getDword(OPT_COLBACK_FILE, DEFAULT_COLBACK);
file.textColor = getDword(OPT_COLTEXT_FILE, DEFAULT_COLTEXT);
file.iDelay = getDword(OPT_DELAY_FILE, DEFAULT_DELAY);
err.bDefault = getBool(OPT_COLDEFAULT_ERR, false);
+ err.bWindows = getBool(OPT_COLWIN_ERR, false);
err.backColor = getDword(OPT_COLBACK_ERR, DEFAULT_COLBACK);
err.textColor = getDword(OPT_COLTEXT_ERR, DEFAULT_COLTEXT);
err.iDelay = getDword(OPT_DELAY_ERR, DEFAULT_DELAY);
other.bDefault = getBool(OPT_COLDEFAULT_OTHERS, false);
+ other.bWindows = getBool(OPT_COLWIN_OTHERS, false);
other.backColor = getDword(OPT_COLBACK_OTHERS, DEFAULT_COLBACK);
other.textColor = getDword(OPT_COLTEXT_OTHERS, DEFAULT_COLTEXT);
other.iDelay = getDword(OPT_DELAY_OTHERS, DEFAULT_DELAY);
@@ -75,21 +79,25 @@ void CMPlugin::OptionsWrite(void)
setByte(OPT_MSGWINDOWCHECK, bMsgWindowCheck);
setByte(OPT_MSGREPLYWINDOW, bMsgReplyWindow);
+ setByte(OPT_COLWIN_MESSAGE, msg.bWindows);
setByte(OPT_COLDEFAULT_MESSAGE, msg.bDefault);
setDword(OPT_COLBACK_MESSAGE, msg.backColor);
setDword(OPT_COLTEXT_MESSAGE, msg.textColor);
setDword(OPT_DELAY_MESSAGE, msg.iDelay);
+ setByte(OPT_COLWIN_FILE, file.bWindows);
setByte(OPT_COLDEFAULT_FILE, file.bDefault);
setDword(OPT_COLBACK_FILE, file.backColor);
setDword(OPT_COLTEXT_FILE, file.textColor);
setDword(OPT_DELAY_FILE, file.iDelay);
+ setByte(OPT_COLWIN_ERR, err.bWindows);
setByte(OPT_COLDEFAULT_ERR, err.bDefault);
setDword(OPT_COLBACK_ERR, err.backColor);
setDword(OPT_COLTEXT_ERR, err.textColor);
setDword(OPT_DELAY_ERR, err.iDelay);
+ setByte(OPT_COLWIN_OTHERS, other.bWindows);
setByte(OPT_COLDEFAULT_OTHERS, other.bDefault);
setDword(OPT_COLBACK_OTHERS, other.backColor);
setDword(OPT_COLTEXT_OTHERS, other.textColor);
@@ -214,6 +222,7 @@ public:
class COptionsEventsDlg : public COptionsBaseDlg
{
CCtrlSpin spinMessage, spinFile, spinErr, spinOther;
+ CCtrlCheck chkWinColorMsg, chkWinColorFile, chkWinColorErr, chkWinColorOthers;
CCtrlCheck chkDefaultColorMsg, chkDefaultColorFile, chkDefaultColorErr, chkDefaultColorOthers;
CCtrlColor clrBackMessage, clrTextMessage, clrBackFile, clrTextFile, clrBackErr, clrTextErr, clrBackOther, clrTextOther;
CCtrlButton btnPreview;
@@ -221,22 +230,26 @@ class COptionsEventsDlg : public COptionsBaseDlg
void GrabData()
{
// update options
- g_plugin.msg.bDefault = IsDlgButtonChecked(m_hwnd, IDC_CHKDEFAULTCOL_MESSAGE);
+ g_plugin.msg.bWindows = chkWinColorMsg.IsChecked();
+ g_plugin.msg.bDefault = chkDefaultColorMsg.IsChecked();
g_plugin.msg.backColor = clrBackMessage.GetColor();
g_plugin.msg.textColor = clrTextMessage.GetColor();
g_plugin.msg.iDelay = spinMessage.GetPosition();
- g_plugin.file.bDefault = IsDlgButtonChecked(m_hwnd, IDC_CHKDEFAULTCOL_FILE);
+ g_plugin.file.bWindows = chkWinColorFile.IsChecked();
+ g_plugin.file.bDefault = chkDefaultColorFile.IsChecked();
g_plugin.file.backColor = clrBackFile.GetColor();
g_plugin.file.textColor = clrTextFile.GetColor();
g_plugin.file.iDelay = spinFile.GetPosition();
- g_plugin.err.bDefault = IsDlgButtonChecked(m_hwnd, IDC_CHKDEFAULTCOL_ERR);
+ g_plugin.err.bWindows = chkWinColorErr.IsChecked();
+ g_plugin.err.bDefault = chkDefaultColorErr.IsChecked();
g_plugin.err.backColor = clrBackErr.GetColor();
g_plugin.err.textColor = clrTextErr.GetColor();
g_plugin.err.iDelay = spinErr.GetPosition();
- g_plugin.other.bDefault = IsDlgButtonChecked(m_hwnd, IDC_CHKDEFAULTCOL_OTHERS);
+ g_plugin.other.bWindows = chkWinColorOthers.IsChecked();
+ g_plugin.other.bDefault = chkDefaultColorOthers.IsChecked();
g_plugin.other.backColor = clrBackOther.GetColor();
g_plugin.other.textColor = clrTextOther.GetColor();
g_plugin.other.iDelay = spinOther.GetPosition();
@@ -254,6 +267,10 @@ public:
clrTextErr(this, IDC_COLTEXT_ERR),
clrBackOther(this, IDC_COLBACK_OTHERS),
clrTextOther(this, IDC_COLTEXT_OTHERS),
+ chkWinColorMsg(this, IDC_CHKWINCOL_MESSAGE),
+ chkWinColorFile(this, IDC_CHKWINCOL_FILE),
+ chkWinColorErr(this, IDC_CHKWINCOL_ERR),
+ chkWinColorOthers(this, IDC_CHKWINCOL_OTHERS),
chkDefaultColorMsg(this, IDC_CHKDEFAULTCOL_MESSAGE),
chkDefaultColorFile(this, IDC_CHKDEFAULTCOL_FILE),
chkDefaultColorErr(this, IDC_CHKDEFAULTCOL_ERR),
@@ -264,11 +281,11 @@ public:
spinMessage(this, IDC_SPIN_MESSAGE, 1000, -1)
{
btnPreview.OnClick = Callback(this, &COptionsEventsDlg::onClick_Preview);
-
- chkDefaultColorMsg.OnChange = Callback(this, &COptionsEventsDlg::onChange_DefaultMsg);
- chkDefaultColorFile.OnChange = Callback(this, &COptionsEventsDlg::onChange_DefaultFile);
- chkDefaultColorErr.OnChange = Callback(this, &COptionsEventsDlg::onChange_DefaultErr);
- chkDefaultColorOthers.OnChange = Callback(this, &COptionsEventsDlg::onChange_DefaultOther);
+
+ chkDefaultColorMsg.OnChange = chkWinColorMsg.OnChange = Callback(this, &COptionsEventsDlg::onChange_DefaultMsg);
+ chkDefaultColorFile.OnChange = chkWinColorFile.OnChange = Callback(this, &COptionsEventsDlg::onChange_DefaultFile);
+ chkDefaultColorErr.OnChange = chkWinColorErr.OnChange = Callback(this, &COptionsEventsDlg::onChange_DefaultErr);
+ chkDefaultColorOthers.OnChange = chkWinColorOthers.OnChange = Callback(this, &COptionsEventsDlg::onChange_DefaultOther);
}
bool OnInitDialog() override
@@ -289,6 +306,11 @@ public:
chkDefaultColorErr.SetState(g_plugin.err.bDefault);
chkDefaultColorOthers.SetState(g_plugin.other.bDefault);
+ chkWinColorMsg.SetState(g_plugin.msg.bWindows);
+ chkWinColorFile.SetState(g_plugin.file.bWindows);
+ chkWinColorErr.SetState(g_plugin.err.bWindows);
+ chkWinColorOthers.SetState(g_plugin.other.bWindows);
+
spinMessage.SetPosition(g_plugin.msg.iDelay);
spinFile.SetPosition(g_plugin.file.iDelay);
spinErr.SetPosition(g_plugin.err.iDelay);
@@ -315,30 +337,38 @@ public:
void onChange_DefaultMsg(CCtrlCheck *)
{
- bool bEnabled = chkDefaultColorMsg.GetState();
- clrBackMessage.Enable(!bEnabled);
- clrTextMessage.Enable(!bEnabled);
+ bool b1 = !chkDefaultColorMsg.IsChecked(), b2 = !chkWinColorMsg.IsChecked();
+ chkWinColorMsg.Enable(b1);
+ chkDefaultColorMsg.Enable(b2);
+ clrBackMessage.Enable(b1 && b2);
+ clrTextMessage.Enable(b1 && b2);
}
void onChange_DefaultFile(CCtrlCheck *)
{
- bool bEnabled = chkDefaultColorFile.GetState();
- clrBackFile.Enable(!bEnabled);
- clrTextFile.Enable(!bEnabled);
+ bool b1 = !chkDefaultColorFile.IsChecked(), b2 = !chkWinColorFile.IsChecked();
+ chkWinColorFile.Enable(b1);
+ chkDefaultColorFile.Enable(b2);
+ clrBackFile.Enable(b1 && b2);
+ clrTextFile.Enable(b1 && b2);
}
void onChange_DefaultErr(CCtrlCheck *)
{
- bool bEnabled = chkDefaultColorErr.GetState();
- clrBackErr.Enable(!bEnabled);
- clrTextErr.Enable(!bEnabled);
+ bool b1 = !chkDefaultColorErr.IsChecked(), b2 = !chkWinColorErr.IsChecked();
+ chkWinColorErr.Enable(b1);
+ chkDefaultColorErr.Enable(b2);
+ clrBackErr.Enable(b1 && b2);
+ clrTextErr.Enable(b1 && b2);
}
void onChange_DefaultOther(CCtrlCheck *)
{
- bool bEnabled = chkDefaultColorOthers.GetState();
- clrBackOther.Enable(!bEnabled);
- clrTextOther.Enable(!bEnabled);
+ bool b1 = !chkDefaultColorOthers.IsChecked(), b2 = !chkWinColorOthers.IsChecked();
+ chkWinColorOthers.Enable(b1);
+ chkDefaultColorOthers.Enable(b2);
+ clrBackOther.Enable(b1 && b2);
+ clrTextOther.Enable(b1 && b2);
}
};
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp
index dca446fb4f..4da66331b7 100644
--- a/plugins/NewEventNotify/src/popup.cpp
+++ b/plugins/NewEventNotify/src/popup.cpp
@@ -323,8 +323,8 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType)
case EVENTTYPE_MESSAGE:
if (!(g_plugin.maskNotify & MASK_MESSAGE)) return 1;
pudw.lchIcon = Skin_LoadIcon(SKINICON_EVENT_MESSAGE);
- pudw.colorBack = g_plugin.msg.bDefault ? 0 : g_plugin.msg.backColor;
- pudw.colorText = g_plugin.msg.bDefault ? 0 : g_plugin.msg.textColor;
+ pudw.colorBack = g_plugin.msg.getBackColor();
+ pudw.colorText = g_plugin.msg.getTextColor();
iSeconds = g_plugin.msg.iDelay;
sampleEvent = TranslateT("This is a sample message event :-)");
break;
@@ -332,8 +332,8 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType)
case EVENTTYPE_FILE:
if (!(g_plugin.maskNotify & MASK_FILE)) return 1;
pudw.lchIcon = Skin_LoadIcon(SKINICON_EVENT_FILE);
- pudw.colorBack = g_plugin.file.bDefault ? 0 : g_plugin.file.backColor;
- pudw.colorText = g_plugin.file.bDefault ? 0 : g_plugin.file.textColor;
+ pudw.colorBack = g_plugin.file.getBackColor();
+ pudw.colorText = g_plugin.file.getTextColor();
iSeconds = g_plugin.file.iDelay;
sampleEvent = TranslateT("This is a sample file event :-D");
break;
@@ -341,8 +341,8 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType)
case EVENTTYPE_ERRMSG:
if (!(g_plugin.maskNotify & MASK_ERROR)) return 1;
pudw.lchIcon = Skin_LoadIcon(SKINICON_OTHER_DELETE);
- pudw.colorBack = g_plugin.err.bDefault ? 0 : g_plugin.err.backColor;
- pudw.colorText = g_plugin.err.bDefault ? 0 : g_plugin.err.textColor;
+ pudw.colorBack = g_plugin.err.getBackColor();
+ pudw.colorText = g_plugin.err.getTextColor();
iSeconds = g_plugin.err.iDelay;
sampleEvent = TranslateT("This is a sample error event :-D");
break;
@@ -350,8 +350,8 @@ int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType)
default:
if (!(g_plugin.maskNotify & MASK_OTHER)) return 1;
pudw.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- pudw.colorBack = g_plugin.other.bDefault ? 0 : g_plugin.other.backColor;
- pudw.colorText = g_plugin.other.bDefault ? 0 : g_plugin.other.textColor;
+ pudw.colorBack = g_plugin.other.getBackColor();
+ pudw.colorText = g_plugin.other.getTextColor();
iSeconds = g_plugin.other.iDelay;
sampleEvent = TranslateT("This is a sample other event ;-D");
break;
diff --git a/plugins/NewEventNotify/src/resource.h b/plugins/NewEventNotify/src/resource.h
index 9cfe804873..6f6d911e00 100644
--- a/plugins/NewEventNotify/src/resource.h
+++ b/plugins/NewEventNotify/src/resource.h
@@ -45,6 +45,10 @@
#define IDC_TESTFORREAD 1038
#define IDC_OPT_TREE 1040
#define IDC_SPIN_MSGNUMBER 1041
+#define IDC_CHKWINCOL_MESSAGE 1042
+#define IDC_CHKWINCOL_FILE 1043
+#define IDC_CHKWINCOL_ERR 1044
+#define IDC_CHKWINCOL_OTHERS 1045
// Next default values for new objects
//
diff --git a/plugins/NewEventNotify/src/stdafx.h b/plugins/NewEventNotify/src/stdafx.h
index 66f3e00283..c6d4e596a3 100644
--- a/plugins/NewEventNotify/src/stdafx.h
+++ b/plugins/NewEventNotify/src/stdafx.h
@@ -82,47 +82,52 @@
#define TIMER_TO_ACTION 50685
//Entries in the database, don't translate
-#define OPT_DISABLE "Disabled"
-#define OPT_MUCDISABLE "MUCDisabled"
-#define OPT_PREVIEW "Preview"
-#define OPT_MENUITEM "MenuItem"
-#define OPT_LIMITPREVIEW "LimitPreview"
+#define OPT_DISABLE "Disabled"
+#define OPT_MUCDISABLE "MUCDisabled"
+#define OPT_PREVIEW "Preview"
+#define OPT_MENUITEM "MenuItem"
+#define OPT_LIMITPREVIEW "LimitPreview"
+#define OPT_COLWIN_MESSAGE "WinColorMsg"
#define OPT_COLDEFAULT_MESSAGE "DefaultColorMsg"
-#define OPT_COLBACK_MESSAGE "ColorBackMsg"
-#define OPT_COLTEXT_MESSAGE "ColorTextMsg"
-#define OPT_DELAY_MESSAGE "DelayMessage"
-
-#define OPT_COLDEFAULT_FILE "DefaultColorFile"
-#define OPT_COLBACK_FILE "ColorBackFile"
-#define OPT_COLTEXT_FILE "ColorTextFile"
-#define OPT_DELAY_FILE "DelayFile"
-
-#define OPT_COLDEFAULT_ERR "DefaultColorErr"
-#define OPT_COLBACK_ERR "ColorBackErr"
-#define OPT_COLTEXT_ERR "ColorTextErr"
-#define OPT_DELAY_ERR "DelayErr"
-
-#define OPT_COLDEFAULT_OTHERS "DefaultColorOthers"
-#define OPT_COLBACK_OTHERS "ColorBackOthers"
-#define OPT_COLTEXT_OTHERS "ColorTextOthers"
-#define OPT_DELAY_OTHERS "DelayOthers"
-
-#define OPT_MASKNOTIFY "Notify"
-#define OPT_MASKACTL "ActionLeft"
-#define OPT_MASKACTR "ActionRight"
-#define OPT_MASKACTTE "ActionTimeExpires"
-#define OPT_MSGWINDOWCHECK "WindowCheck"
-#define OPT_MSGREPLYWINDOW "ReplyWindow"
-#define OPT_MERGEPOPUP "MergePopup"
-#define OPT_SHOW_DATE "ShowDate"
-#define OPT_SHOW_TIME "ShowTime"
-#define OPT_SHOW_HEADERS "ShowHeaders"
-#define OPT_NUMBER_MSG "NumberMsg"
-#define OPT_SHOW_ON "ShowOldOrNew"
-#define OPT_HIDESEND "HideSend"
-#define OPT_NORSS "NoRSSAnnounces"
-#define OPT_READCHECK "ReadCheck"
+#define OPT_COLBACK_MESSAGE "ColorBackMsg"
+#define OPT_COLTEXT_MESSAGE "ColorTextMsg"
+#define OPT_DELAY_MESSAGE "DelayMessage"
+
+#define OPT_COLWIN_FILE "WinColorFile"
+#define OPT_COLDEFAULT_FILE "DefaultColorFile"
+#define OPT_COLBACK_FILE "ColorBackFile"
+#define OPT_COLTEXT_FILE "ColorTextFile"
+#define OPT_DELAY_FILE "DelayFile"
+
+#define OPT_COLWIN_ERR "WinColorErr"
+#define OPT_COLDEFAULT_ERR "DefaultColorErr"
+#define OPT_COLBACK_ERR "ColorBackErr"
+#define OPT_COLTEXT_ERR "ColorTextErr"
+#define OPT_DELAY_ERR "DelayErr"
+
+#define OPT_COLWIN_OTHERS "WinColorOthers"
+#define OPT_COLDEFAULT_OTHERS "DefaultColorOthers"
+#define OPT_COLBACK_OTHERS "ColorBackOthers"
+#define OPT_COLTEXT_OTHERS "ColorTextOthers"
+#define OPT_DELAY_OTHERS "DelayOthers"
+
+#define OPT_MASKNOTIFY "Notify"
+#define OPT_MASKACTL "ActionLeft"
+#define OPT_MASKACTR "ActionRight"
+#define OPT_MASKACTTE "ActionTimeExpires"
+#define OPT_MSGWINDOWCHECK "WindowCheck"
+#define OPT_MSGREPLYWINDOW "ReplyWindow"
+#define OPT_MERGEPOPUP "MergePopup"
+#define OPT_SHOW_DATE "ShowDate"
+#define OPT_SHOW_TIME "ShowTime"
+#define OPT_SHOW_HEADERS "ShowHeaders"
+#define OPT_NUMBER_MSG "NumberMsg"
+#define OPT_SHOW_ON "ShowOldOrNew"
+#define OPT_HIDESEND "HideSend"
+#define OPT_NORSS "NoRSSAnnounces"
+#define OPT_READCHECK "ReadCheck"
+
//---------------------------
//---Translateable Strings
@@ -169,7 +174,21 @@ struct CMPlugin : public PLUGIN<CMPlugin>
{
COLORREF backColor, textColor;
int iDelay;
- bool bDefault;
+ bool bDefault, bWindows;
+
+ COLORREF getBackColor() const
+ {
+ if (bDefault) return 0;
+ if (bWindows) return GetSysColor(COLOR_BTNFACE);
+ return backColor;
+ }
+
+ COLORREF getTextColor() const
+ {
+ if (bDefault) return 0;
+ if (bWindows) return GetSysColor(COLOR_WINDOWTEXT);
+ return textColor;
+ }
} msg, file, err, other;
diff --git a/plugins/NewEventNotify/src/version.h b/plugins/NewEventNotify/src/version.h
index f01c9e64d9..d7e4d28ddc 100644
--- a/plugins/NewEventNotify/src/version.h
+++ b/plugins/NewEventNotify/src/version.h
@@ -1,7 +1,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 2
#define __RELEASE_NUM 2
-#define __BUILD_NUM 6
+#define __BUILD_NUM 7
#include <stdver.h>