summaryrefslogtreecommitdiff
path: root/plugins/NewEventNotify/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-02-10 22:35:38 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-02-10 22:35:38 +0300
commitf34f0f4c72dd6238904f715e1c4c6025559e8821 (patch)
treeb7dde70cd1e2611f935a9bf2a12f10b937ee8a11 /plugins/NewEventNotify/src
parent68827c97e131401e97ff772167acf9ab80fe8ef4 (diff)
some fixes for #3027
Diffstat (limited to 'plugins/NewEventNotify/src')
-rw-r--r--plugins/NewEventNotify/src/options.cpp507
-rw-r--r--plugins/NewEventNotify/src/popup.cpp26
-rw-r--r--plugins/NewEventNotify/src/resource.h34
-rw-r--r--plugins/NewEventNotify/src/stdafx.h47
4 files changed, 363 insertions, 251 deletions
diff --git a/plugins/NewEventNotify/src/options.cpp b/plugins/NewEventNotify/src/options.cpp
index d004a1cfb7..3b0d19c98f 100644
--- a/plugins/NewEventNotify/src/options.cpp
+++ b/plugins/NewEventNotify/src/options.cpp
@@ -24,8 +24,6 @@
#include "stdafx.h"
-BOOL bWmNotify;
-
void CMPlugin::OptionsRead(void)
{
bDisable = getBool(OPT_DISABLE, false);
@@ -36,25 +34,32 @@ void CMPlugin::OptionsRead(void)
bMergePopup = getBool(OPT_MERGEPOPUP, true);
bMsgWindowCheck = getBool(OPT_MSGWINDOWCHECK, true);
bMsgReplyWindow = getBool(OPT_MSGREPLYWINDOW, false);
- bDefaultColorMsg = getBool(OPT_COLDEFAULT_MESSAGE, false);
- bDefaultColorFile = getBool(OPT_COLDEFAULT_FILE, false);
- bDefaultColorOthers = getBool(OPT_COLDEFAULT_OTHERS, false);
-
- colBackMsg = getDword(OPT_COLBACK_MESSAGE, DEFAULT_COLBACK);
- colTextMsg = getDword(OPT_COLTEXT_MESSAGE, DEFAULT_COLTEXT);
- colBackFile = getDword(OPT_COLBACK_FILE, DEFAULT_COLBACK);
- colTextFile = getDword(OPT_COLTEXT_FILE, DEFAULT_COLTEXT);
- colBackOthers = getDword(OPT_COLBACK_OTHERS, DEFAULT_COLBACK);
- colTextOthers = getDword(OPT_COLTEXT_OTHERS, DEFAULT_COLTEXT);
-
+
+ msg.bDefault = getBool(OPT_COLDEFAULT_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.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.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.backColor = getDword(OPT_COLBACK_OTHERS, DEFAULT_COLBACK);
+ other.textColor = getDword(OPT_COLTEXT_OTHERS, DEFAULT_COLTEXT);
+ other.iDelay = getDword(OPT_DELAY_OTHERS, DEFAULT_DELAY);
+
maskNotify = getByte(OPT_MASKNOTIFY, DEFAULT_MASKNOTIFY);
maskActL = getByte(OPT_MASKACTL, DEFAULT_MASKACTL);
maskActR = getByte(OPT_MASKACTR, DEFAULT_MASKACTR);
maskActTE = getByte(OPT_MASKACTTE, DEFAULT_MASKACTE);
- iDelayMsg = getDword(OPT_DELAY_MESSAGE, DEFAULT_DELAY);
- iDelayFile = getDword(OPT_DELAY_FILE, DEFAULT_DELAY);
- iDelayOthers = getDword(OPT_DELAY_OTHERS, DEFAULT_DELAY);
iDelayDefault = DBGetContactSettingRangedWord(NULL, "Popup", "Seconds", SETTING_LIFETIME_DEFAULT, SETTING_LIFETIME_MIN, SETTING_LIFETIME_MAX);
bShowDate = getBool(OPT_SHOW_DATE, true);
@@ -71,28 +76,40 @@ void CMPlugin::OptionsWrite(void)
{
setByte(OPT_DISABLE, bDisable);
setByte(OPT_MUCDISABLE, bMUCDisable);
+
setByte(OPT_PREVIEW, bPreview);
setByte(OPT_MENUITEM, bMenuitem);
- setByte(OPT_COLDEFAULT_MESSAGE, bDefaultColorMsg);
- setByte(OPT_COLDEFAULT_FILE, bDefaultColorFile);
- setByte(OPT_COLDEFAULT_OTHERS, bDefaultColorOthers);
- setDword(OPT_COLBACK_MESSAGE, colBackMsg);
- setDword(OPT_COLTEXT_MESSAGE, colTextMsg);
- setDword(OPT_COLBACK_FILE, colBackFile);
- setDword(OPT_COLTEXT_FILE, colTextFile);
- setDword(OPT_COLBACK_OTHERS, colBackOthers);
- setDword(OPT_COLTEXT_OTHERS, colTextOthers);
+ setByte(OPT_MERGEPOPUP, bMergePopup);
+ setByte(OPT_MSGWINDOWCHECK, bMsgWindowCheck);
+ setByte(OPT_MSGREPLYWINDOW, bMsgReplyWindow);
+
+ 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_COLDEFAULT_FILE, file.bDefault);
+ setDword(OPT_COLBACK_FILE, file.backColor);
+ setDword(OPT_COLTEXT_FILE, file.textColor);
+ setDword(OPT_DELAY_FILE, file.iDelay);
+
+ 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_COLDEFAULT_OTHERS, other.bDefault);
+ setDword(OPT_COLBACK_OTHERS, other.backColor);
+ setDword(OPT_COLTEXT_OTHERS, other.textColor);
+ setDword(OPT_DELAY_OTHERS, other.iDelay);
+
setDword(OPT_LIMITPREVIEW, iLimitPreview);
+
setByte(OPT_MASKNOTIFY, (uint8_t)maskNotify);
setByte(OPT_MASKACTL, (uint8_t)maskActL);
setByte(OPT_MASKACTR, (uint8_t)maskActR);
setByte(OPT_MASKACTTE, (uint8_t)maskActTE);
- setByte(OPT_MSGWINDOWCHECK, bMsgWindowCheck);
- setByte(OPT_MSGREPLYWINDOW, bMsgReplyWindow);
- setByte(OPT_MERGEPOPUP, bMergePopup);
- setDword(OPT_DELAY_MESSAGE, iDelayMsg);
- setDword(OPT_DELAY_FILE, iDelayFile);
- setDword(OPT_DELAY_OTHERS, iDelayOthers);
+
setByte(OPT_SHOW_DATE, bShowDate);
setByte(OPT_SHOW_TIME, bShowTime);
setByte(OPT_SHOW_HEADERS, bShowHeaders);
@@ -103,180 +120,290 @@ void CMPlugin::OptionsWrite(void)
setByte(OPT_READCHECK, bReadCheck);
}
-static void SetCheckBoxState(HWND hWnd, int iCtrl, BOOL bState)
-{
- CheckDlgButton(hWnd, iCtrl, bState ? BST_CHECKED : BST_UNCHECKED);
-}
-
static void EnableDlgItem(HWND hWnd, int iCtrl, BOOL bEnable)
{
EnableWindow(GetDlgItem(hWnd, iCtrl), bEnable);
}
-static void UpdateOptionsDlgItemsState(HWND hWnd)
+/////////////////////////////////////////////////////////////////////////////////////////
+
+class COptionsBaseDlg : public CDlgBase
{
- //disable color picker when using default colors
- EnableDlgItem(hWnd, IDC_COLBACK_MESSAGE, !g_plugin.bDefaultColorMsg);
- EnableDlgItem(hWnd, IDC_COLTEXT_MESSAGE, !g_plugin.bDefaultColorMsg);
- EnableDlgItem(hWnd, IDC_COLBACK_FILE, !g_plugin.bDefaultColorFile);
- EnableDlgItem(hWnd, IDC_COLTEXT_FILE, !g_plugin.bDefaultColorFile);
- EnableDlgItem(hWnd, IDC_COLBACK_OTHERS, !g_plugin.bDefaultColorOthers);
- EnableDlgItem(hWnd, IDC_COLTEXT_OTHERS, !g_plugin.bDefaultColorOthers);
- //disable merge messages options when is not using
- EnableDlgItem(hWnd, IDC_CHKSHOWDATE, g_plugin.bMergePopup);
- EnableDlgItem(hWnd, IDC_CHKSHOWTIME, g_plugin.bMergePopup);
- EnableDlgItem(hWnd, IDC_CHKSHOWHEADERS, g_plugin.bMergePopup);
- EnableDlgItem(hWnd, IDC_CMDEDITHEADERS, g_plugin.bMergePopup && g_plugin.bShowHeaders);
- EnableDlgItem(hWnd, IDC_NUMBERMSG, g_plugin.bMergePopup);
- EnableDlgItem(hWnd, IDC_LBNUMBERMSG, g_plugin.bMergePopup);
- EnableDlgItem(hWnd, IDC_RDNEW, g_plugin.bMergePopup && g_plugin.iNumberMsg);
- EnableDlgItem(hWnd, IDC_RDOLD, g_plugin.bMergePopup && g_plugin.iNumberMsg);
- //disable delay textbox when infinite is checked
- EnableDlgItem(hWnd, IDC_DELAY_MESSAGE, g_plugin.iDelayMsg != -1);
- EnableDlgItem(hWnd, IDC_DELAY_FILE, g_plugin.iDelayFile != -1);
- EnableDlgItem(hWnd, IDC_DELAY_OTHERS, g_plugin.iDelayOthers != -1);
-}
+ void OnFinish(CDlgBase *)
+ {
+ g_plugin.OptionsWrite();
+ MenuitemUpdate(!g_plugin.bDisable);
+ }
+
+public:
+ COptionsBaseDlg(int iDlg) :
+ CDlgBase(g_plugin, iDlg)
+ {
+ m_OnFinishWizard = Callback(this, &COptionsBaseDlg::OnFinish);
+ }
+
+ void OnReset() override
+ {
+ g_plugin.OptionsRead();
+
+ // maybe something changed with the mi
+ MenuitemUpdate(!g_plugin.bDisable);
+ }
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
-static INT_PTR CALLBACK OptionsDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
+class COptionsMainDlg : public COptionsBaseDlg
{
- switch (message) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hWnd);
- //make dialog represent the current options
- bWmNotify = TRUE;
- SendDlgItemMessage(hWnd, IDC_COLBACK_MESSAGE, CPM_SETCOLOUR, 0, g_plugin.colBackMsg);
- SendDlgItemMessage(hWnd, IDC_COLTEXT_MESSAGE, CPM_SETCOLOUR, 0, g_plugin.colTextMsg);
- SendDlgItemMessage(hWnd, IDC_COLBACK_FILE, CPM_SETCOLOUR, 0, g_plugin.colBackFile);
- SendDlgItemMessage(hWnd, IDC_COLTEXT_FILE, CPM_SETCOLOUR, 0, g_plugin.colTextFile);
- SendDlgItemMessage(hWnd, IDC_COLBACK_OTHERS, CPM_SETCOLOUR, 0, g_plugin.colBackOthers);
- SendDlgItemMessage(hWnd, IDC_COLTEXT_OTHERS, CPM_SETCOLOUR, 0, g_plugin.colTextOthers);
- SetCheckBoxState(hWnd, IDC_CHKDEFAULTCOL_MESSAGE, g_plugin.bDefaultColorMsg);
- SetCheckBoxState(hWnd, IDC_CHKDEFAULTCOL_FILE, g_plugin.bDefaultColorFile);
- SetCheckBoxState(hWnd, IDC_CHKDEFAULTCOL_OTHERS, g_plugin.bDefaultColorOthers);
- SetCheckBoxState(hWnd, IDC_CHKMENUITEM, g_plugin.bMenuitem);
- SetCheckBoxState(hWnd, IDC_CHKDISABLE, g_plugin.bDisable);
- SetCheckBoxState(hWnd, IDC_CHKPREVIEW, g_plugin.bPreview);
- SetCheckBoxState(hWnd, IDC_CHKMERGEPOPUP, g_plugin.bMergePopup);
- SetCheckBoxState(hWnd, IDC_CHKNOTIFY_MESSAGE, g_plugin.maskNotify & MASK_MESSAGE);
- SetCheckBoxState(hWnd, IDC_CHKNOTIFY_FILE, g_plugin.maskNotify & MASK_FILE);
- SetCheckBoxState(hWnd, IDC_CHKNOTIFY_OTHER, g_plugin.maskNotify & MASK_OTHER);
- SetCheckBoxState(hWnd, IDC_CHKACTL_DISMISS, g_plugin.maskActL & MASK_DISMISS);
- SetCheckBoxState(hWnd, IDC_CHKACTL_OPEN, g_plugin.maskActL & MASK_OPEN);
- SetCheckBoxState(hWnd, IDC_CHKACTL_REMOVE, g_plugin.maskActL & MASK_REMOVE);
- SetCheckBoxState(hWnd, IDC_CHKACTR_DISMISS, g_plugin.maskActR & MASK_DISMISS);
- SetCheckBoxState(hWnd, IDC_CHKACTR_OPEN, g_plugin.maskActR & MASK_OPEN);
- SetCheckBoxState(hWnd, IDC_CHKACTR_REMOVE, g_plugin.maskActR & MASK_REMOVE);
- SetCheckBoxState(hWnd, IDC_CHKACTTE_DISMISS, g_plugin.maskActTE & MASK_DISMISS);
- SetCheckBoxState(hWnd, IDC_CHKACTTE_OPEN, g_plugin.maskActTE & MASK_OPEN);
- SetCheckBoxState(hWnd, IDC_CHKACTTE_REMOVE, g_plugin.maskActTE & MASK_REMOVE);
- SetCheckBoxState(hWnd, IDC_CHKWINDOWCHECK, g_plugin.bMsgWindowCheck);
- SetCheckBoxState(hWnd, IDC_CHKREPLYWINDOW, g_plugin.bMsgReplyWindow);
- SetCheckBoxState(hWnd, IDC_CHKSHOWDATE, g_plugin.bShowDate);
- SetCheckBoxState(hWnd, IDC_CHKSHOWTIME, g_plugin.bShowTime);
- SetCheckBoxState(hWnd, IDC_CHKSHOWHEADERS, g_plugin.bShowHeaders);
- SetCheckBoxState(hWnd, IDC_RDNEW, !g_plugin.bShowON);
- SetCheckBoxState(hWnd, IDC_RDOLD, g_plugin.bShowON);
- SetCheckBoxState(hWnd, IDC_CHKHIDESEND, g_plugin.bHideSend);
- SetCheckBoxState(hWnd, IDC_SUPRESSRSS, g_plugin.bNoRSS);
- SetCheckBoxState(hWnd, IDC_READCHECK, g_plugin.bReadCheck);
- SetCheckBoxState(hWnd, IDC_CHKINFINITE_MESSAGE, g_plugin.iDelayMsg == -1);
- SetCheckBoxState(hWnd, IDC_CHKINFINITE_FILE, g_plugin.iDelayFile == -1);
- SetCheckBoxState(hWnd, IDC_CHKINFINITE_OTHERS, g_plugin.iDelayOthers == -1);
- SetDlgItemInt(hWnd, IDC_DELAY_MESSAGE, g_plugin.iDelayMsg != -1 ? g_plugin.iDelayMsg : 0, TRUE);
- SetDlgItemInt(hWnd, IDC_DELAY_FILE, g_plugin.iDelayFile != -1 ? g_plugin.iDelayFile : 0, TRUE);
- SetDlgItemInt(hWnd, IDC_DELAY_OTHERS, g_plugin.iDelayOthers != -1 ? g_plugin.iDelayOthers : 0, TRUE);
- SetDlgItemInt(hWnd, IDC_NUMBERMSG, g_plugin.iNumberMsg, FALSE);
- //update items' states
- UpdateOptionsDlgItemsState(hWnd);
- bWmNotify = FALSE;
- return TRUE;
-
- case WM_COMMAND:
- if (!bWmNotify) {
- switch (LOWORD(wParam)) {
- case IDC_PREVIEW:
- PopupPreview();
- break;
- default:
- //update options
- g_plugin.maskNotify = (IsDlgButtonChecked(hWnd, IDC_CHKNOTIFY_MESSAGE) ? MASK_MESSAGE : 0) |
- (IsDlgButtonChecked(hWnd, IDC_CHKNOTIFY_FILE) ? MASK_FILE : 0) |
- (IsDlgButtonChecked(hWnd, IDC_CHKNOTIFY_OTHER) ? MASK_OTHER : 0);
- g_plugin.maskActL = (IsDlgButtonChecked(hWnd, IDC_CHKACTL_DISMISS) ? MASK_DISMISS : 0) |
- (IsDlgButtonChecked(hWnd, IDC_CHKACTL_OPEN) ? MASK_OPEN : 0) |
- (IsDlgButtonChecked(hWnd, IDC_CHKACTL_REMOVE) ? MASK_REMOVE : 0);
- g_plugin.maskActR = (IsDlgButtonChecked(hWnd, IDC_CHKACTR_DISMISS) ? MASK_DISMISS : 0) |
- (IsDlgButtonChecked(hWnd, IDC_CHKACTR_OPEN) ? MASK_OPEN : 0) |
- (IsDlgButtonChecked(hWnd, IDC_CHKACTR_REMOVE) ? MASK_REMOVE : 0);
- g_plugin.maskActTE = (IsDlgButtonChecked(hWnd, IDC_CHKACTTE_DISMISS) ? MASK_DISMISS : 0) |
- (IsDlgButtonChecked(hWnd, IDC_CHKACTTE_OPEN) ? MASK_OPEN : 0) |
- (IsDlgButtonChecked(hWnd, IDC_CHKACTTE_REMOVE) ? MASK_REMOVE : 0);
- g_plugin.bDefaultColorMsg = IsDlgButtonChecked(hWnd, IDC_CHKDEFAULTCOL_MESSAGE);
- g_plugin.bDefaultColorFile = IsDlgButtonChecked(hWnd, IDC_CHKDEFAULTCOL_FILE);
- g_plugin.bDefaultColorOthers = IsDlgButtonChecked(hWnd, IDC_CHKDEFAULTCOL_OTHERS);
- g_plugin.bMenuitem = IsDlgButtonChecked(hWnd, IDC_CHKMENUITEM);
- g_plugin.bDisable = IsDlgButtonChecked(hWnd, IDC_CHKDISABLE);
- g_plugin.bPreview = IsDlgButtonChecked(hWnd, IDC_CHKPREVIEW);
- g_plugin.iDelayMsg = IsDlgButtonChecked(hWnd, IDC_CHKINFINITE_MESSAGE) ? -1 : (uint32_t)GetDlgItemInt(hWnd, IDC_DELAY_MESSAGE, nullptr, FALSE);
- g_plugin.iDelayFile = IsDlgButtonChecked(hWnd, IDC_CHKINFINITE_FILE) ? -1 : (uint32_t)GetDlgItemInt(hWnd, IDC_DELAY_FILE, nullptr, FALSE);
- g_plugin.iDelayOthers = IsDlgButtonChecked(hWnd, IDC_CHKINFINITE_OTHERS) ? -1 : (uint32_t)GetDlgItemInt(hWnd, IDC_DELAY_OTHERS, nullptr, FALSE);
- g_plugin.bMergePopup = IsDlgButtonChecked(hWnd, IDC_CHKMERGEPOPUP);
- g_plugin.bMsgWindowCheck = IsDlgButtonChecked(hWnd, IDC_CHKWINDOWCHECK);
- g_plugin.bMsgReplyWindow = IsDlgButtonChecked(hWnd, IDC_CHKREPLYWINDOW);
- g_plugin.bShowDate = IsDlgButtonChecked(hWnd, IDC_CHKSHOWDATE);
- g_plugin.bShowTime = IsDlgButtonChecked(hWnd, IDC_CHKSHOWTIME);
- g_plugin.bShowHeaders = IsDlgButtonChecked(hWnd, IDC_CHKSHOWHEADERS);
- g_plugin.bShowON = IsDlgButtonChecked(hWnd, IDC_RDOLD);
- g_plugin.bShowON = BST_UNCHECKED == IsDlgButtonChecked(hWnd, IDC_RDNEW);
- g_plugin.bHideSend = IsDlgButtonChecked(hWnd, IDC_CHKHIDESEND);
- g_plugin.iNumberMsg = GetDlgItemInt(hWnd, IDC_NUMBERMSG, nullptr, FALSE);
- g_plugin.bNoRSS = IsDlgButtonChecked(hWnd, IDC_SUPRESSRSS);
- g_plugin.bReadCheck = IsDlgButtonChecked(hWnd, IDC_READCHECK);
- //update items' states
- UpdateOptionsDlgItemsState(hWnd);
- if (HIWORD(wParam) == CPN_COLOURCHANGED) {
- g_plugin.colBackMsg = SendDlgItemMessage(hWnd, IDC_COLBACK_MESSAGE, CPM_GETCOLOUR, 0, 0);
- g_plugin.colTextMsg = SendDlgItemMessage(hWnd, IDC_COLTEXT_MESSAGE, CPM_GETCOLOUR, 0, 0);
- g_plugin.colBackFile = SendDlgItemMessage(hWnd, IDC_COLBACK_FILE, CPM_GETCOLOUR, 0, 0);
- g_plugin.colTextFile = SendDlgItemMessage(hWnd, IDC_COLTEXT_FILE, CPM_GETCOLOUR, 0, 0);
- g_plugin.colBackOthers = SendDlgItemMessage(hWnd, IDC_COLBACK_OTHERS, CPM_GETCOLOUR, 0, 0);
- g_plugin.colTextOthers = SendDlgItemMessage(hWnd, IDC_COLTEXT_OTHERS, CPM_GETCOLOUR, 0, 0);
- }
- //send changes to mi
- MenuitemUpdate(!g_plugin.bDisable);
- //enable "Apply" button
- SendMessage(GetParent(hWnd), PSM_CHANGED, 0, 0);
- break;
- }
- }
- break;
-
- case WM_NOTIFY:
- switch (((LPNMHDR)lParam)->code) {
- case PSN_APPLY:
- g_plugin.OptionsWrite();
- break;
-
- case PSN_RESET:
- g_plugin.OptionsRead();
-
- //maybe something changed with the mi
- MenuitemUpdate(!g_plugin.bDisable);
- break;
- }
- break;
+ CCtrlCheck chkDefaultColorMsg, chkDefaultColorFile, chkDefaultColorErr, chkDefaultColorOthers;
+ CCtrlColor clrBackMessage, clrTextMessage, clrBackFile, clrTextFile, clrBackErr, clrTextErr, clrBackOther, clrTextOther;
+ CCtrlButton btnPreview;
+ CCtrlTreeOpts m_opts;
+
+ void GrabData()
+ {
+ m_opts.OnApply();
+
+ // update options
+ g_plugin.msg.bDefault = IsDlgButtonChecked(m_hwnd, IDC_CHKDEFAULTCOL_MESSAGE);
+ g_plugin.msg.backColor = clrBackMessage.GetColor();
+ g_plugin.msg.textColor = clrTextMessage.GetColor();
+ g_plugin.msg.iDelay = IsDlgButtonChecked(m_hwnd, IDC_CHKINFINITE_MESSAGE) ? -1 : (uint32_t)GetDlgItemInt(m_hwnd, IDC_DELAY_MESSAGE, nullptr, FALSE);
+
+ g_plugin.file.bDefault = IsDlgButtonChecked(m_hwnd, IDC_CHKDEFAULTCOL_FILE);
+ g_plugin.file.backColor = clrBackFile.GetColor();
+ g_plugin.file.textColor = clrBackFile.GetColor();
+ g_plugin.file.iDelay = IsDlgButtonChecked(m_hwnd, IDC_CHKINFINITE_FILE) ? -1 : (uint32_t)GetDlgItemInt(m_hwnd, IDC_DELAY_FILE, nullptr, FALSE);
+
+ g_plugin.err.bDefault = IsDlgButtonChecked(m_hwnd, IDC_CHKDEFAULTCOL_ERR);
+ g_plugin.err.backColor = clrBackErr.GetColor();
+ g_plugin.err.textColor = clrTextErr.GetColor();
+ g_plugin.err.iDelay = IsDlgButtonChecked(m_hwnd, IDC_CHKINFINITE_ERR) ? -1 : (uint32_t)GetDlgItemInt(m_hwnd, IDC_DELAY_ERR, nullptr, FALSE);
+
+ g_plugin.other.bDefault = IsDlgButtonChecked(m_hwnd, IDC_CHKDEFAULTCOL_OTHERS);
+ g_plugin.other.backColor = clrBackOther.GetColor();
+ g_plugin.other.textColor = clrTextOther.GetColor();
+ g_plugin.other.iDelay = IsDlgButtonChecked(m_hwnd, IDC_CHKINFINITE_OTHERS) ? -1 : (uint32_t)GetDlgItemInt(m_hwnd, IDC_DELAY_OTHERS, nullptr, FALSE);
}
- return FALSE;
-}
+
+public:
+ COptionsMainDlg() :
+ COptionsBaseDlg(IDD_OPT_MAIN),
+ m_opts(this, IDC_OPT_TREE),
+ btnPreview(this, IDC_PREVIEW),
+ clrBackMessage(this, IDC_COLBACK_MESSAGE),
+ clrTextMessage(this, IDC_COLTEXT_MESSAGE),
+ clrBackFile(this, IDC_COLBACK_FILE),
+ clrTextFile(this, IDC_COLTEXT_FILE),
+ clrBackErr(this, IDC_COLBACK_ERR),
+ clrTextErr(this, IDC_COLTEXT_ERR),
+ clrBackOther(this, IDC_COLBACK_OTHERS),
+ clrTextOther(this, IDC_COLTEXT_OTHERS),
+ chkDefaultColorMsg(this, IDC_CHKDEFAULTCOL_MESSAGE),
+ chkDefaultColorFile(this, IDC_CHKDEFAULTCOL_FILE),
+ chkDefaultColorErr(this, IDC_CHKDEFAULTCOL_ERR),
+ chkDefaultColorOthers(this, IDC_CHKDEFAULTCOL_OTHERS)
+ {
+ auto *pwszSection = TranslateT("General options");
+ m_opts.AddOption(pwszSection, TranslateT("Show entry in the Popups menu"), g_plugin.bMenuitem);
+ m_opts.AddOption(pwszSection, TranslateT("Temporarily disable event popups"), g_plugin.bDisable);
+ m_opts.AddOption(pwszSection, TranslateT("Show preview of event in popup"), g_plugin.bPreview);
+
+ pwszSection = TranslateT("Notify me of...");
+ m_opts.AddOption(pwszSection, TranslateT("Message"), g_plugin.maskNotify, MASK_MESSAGE);
+ m_opts.AddOption(pwszSection, TranslateT("File"), g_plugin.maskNotify, MASK_FILE);
+ m_opts.AddOption(pwszSection, TranslateT("Others"), g_plugin.maskNotify, MASK_OTHER);
+
+ pwszSection = TranslateT("Left click actions");
+ m_opts.AddOption(pwszSection, TranslateT("Dismiss popup"), g_plugin.maskActL, MASK_DISMISS);
+ m_opts.AddOption(pwszSection, TranslateT("Open event"), g_plugin.maskActL, MASK_OPEN);
+ m_opts.AddOption(pwszSection, TranslateT("Dismiss event"), g_plugin.maskActL, MASK_REMOVE);
+
+ pwszSection = TranslateT("Right click actions");
+ m_opts.AddOption(pwszSection, TranslateT("Dismiss popup"), g_plugin.maskActL, MASK_DISMISS);
+ m_opts.AddOption(pwszSection, TranslateT("Open event"), g_plugin.maskActL, MASK_OPEN);
+ m_opts.AddOption(pwszSection, TranslateT("Dismiss event"), g_plugin.maskActL, MASK_REMOVE);
+
+ pwszSection = TranslateT("Timeout actions");
+ m_opts.AddOption(pwszSection, TranslateT("Dismiss popup"), g_plugin.maskActTE, MASK_DISMISS);
+ m_opts.AddOption(pwszSection, TranslateT("Open event"), g_plugin.maskActTE, MASK_OPEN);
+ m_opts.AddOption(pwszSection, TranslateT("Dismiss event"), g_plugin.maskActTE, MASK_REMOVE);
+
+ pwszSection = TranslateT("Misc options");
+ m_opts.AddOption(pwszSection, TranslateT("No popups for RSS contacts"), g_plugin.bNoRSS);
+ m_opts.AddOption(pwszSection, TranslateT("No popups for read messages"), g_plugin.bReadCheck);
+
+ btnPreview.OnClick = Callback(this, &COptionsMainDlg::onClick_Preview);
+
+ chkDefaultColorMsg.OnChange = Callback(this, &COptionsMainDlg::onChange_DefaultMsg);
+ chkDefaultColorFile.OnChange = Callback(this, &COptionsMainDlg::onChange_DefaultFile);
+ chkDefaultColorErr.OnChange = Callback(this, &COptionsMainDlg::onChange_DefaultErr);
+ chkDefaultColorOthers.OnChange = Callback(this, &COptionsMainDlg::onChange_DefaultOther);
+ }
+
+ bool OnInitDialog() override
+ {
+ // make dialog represent the current options
+ clrBackMessage.SetColor(g_plugin.msg.backColor);
+ clrTextMessage.SetColor(g_plugin.msg.textColor);
+ clrBackFile.SetColor(g_plugin.file.backColor);
+ clrTextFile.SetColor(g_plugin.file.textColor);
+ clrBackErr.SetColor(g_plugin.err.backColor);
+ clrTextErr.SetColor(g_plugin.err.textColor);
+ clrBackOther.SetColor(g_plugin.other.backColor);
+ clrTextOther.SetColor(g_plugin.other.textColor);
+
+ chkDefaultColorMsg.SetState(g_plugin.msg.bDefault);
+ chkDefaultColorFile.SetState(g_plugin.file.bDefault);
+ chkDefaultColorErr.SetState(g_plugin.err.bDefault);
+ chkDefaultColorOthers.SetState(g_plugin.other.bDefault);
+
+ CheckDlgButton(m_hwnd, IDC_CHKINFINITE_MESSAGE, g_plugin.msg.iDelay == -1);
+ CheckDlgButton(m_hwnd, IDC_CHKINFINITE_FILE, g_plugin.file.iDelay == -1);
+ CheckDlgButton(m_hwnd, IDC_CHKINFINITE_ERR, g_plugin.err.iDelay == -1);
+ CheckDlgButton(m_hwnd, IDC_CHKINFINITE_OTHERS, g_plugin.other.iDelay == -1);
+
+ SetDlgItemInt(m_hwnd, IDC_DELAY_MESSAGE, g_plugin.msg.iDelay != -1 ? g_plugin.msg.iDelay : 0, TRUE);
+ SetDlgItemInt(m_hwnd, IDC_DELAY_FILE, g_plugin.file.iDelay != -1 ? g_plugin.file.iDelay : 0, TRUE);
+ SetDlgItemInt(m_hwnd, IDC_DELAY_ERR, g_plugin.err.iDelay != -1 ? g_plugin.err.iDelay : 0, TRUE);
+ SetDlgItemInt(m_hwnd, IDC_DELAY_OTHERS, g_plugin.other.iDelay != -1 ? g_plugin.other.iDelay : 0, TRUE);
+
+ OnChange();
+ return true;
+ }
+
+ bool OnApply() override
+ {
+ GrabData();
+ return true;
+ }
+
+ void OnChange() override
+ {
+ GrabData();
+
+ // disable delay textbox when infinite is checked
+ EnableDlgItem(m_hwnd, IDC_DELAY_MESSAGE, g_plugin.msg.iDelay != -1);
+ EnableDlgItem(m_hwnd, IDC_DELAY_FILE, g_plugin.file.iDelay != -1);
+ EnableDlgItem(m_hwnd, IDC_DELAY_ERR, g_plugin.err.iDelay != -1);
+ EnableDlgItem(m_hwnd, IDC_DELAY_OTHERS, g_plugin.other.iDelay != -1);
+ }
+
+ void onClick_Preview(CCtrlButton *)
+ {
+ GrabData();
+ PopupShow(0, 0, EVENTTYPE_MESSAGE);
+ PopupShow(0, 0, EVENTTYPE_FILE);
+ PopupShow(0, 0, -1);
+ }
+
+ void onChange_DefaultMsg(CCtrlCheck *)
+ {
+ bool bEnabled = chkDefaultColorMsg.GetState();
+ clrBackMessage.Enable(!bEnabled);
+ clrTextMessage.Enable(!bEnabled);
+ }
+
+ void onChange_DefaultFile(CCtrlCheck *)
+ {
+ bool bEnabled = chkDefaultColorFile.GetState();
+ clrBackFile.Enable(!bEnabled);
+ clrTextFile.Enable(!bEnabled);
+ }
+
+ void onChange_DefaultErr(CCtrlCheck *)
+ {
+ bool bEnabled = chkDefaultColorErr.GetState();
+ clrBackErr.Enable(!bEnabled);
+ clrTextErr.Enable(!bEnabled);
+ }
+
+ void onChange_DefaultOther(CCtrlCheck *)
+ {
+ bool bEnabled = chkDefaultColorOthers.GetState();
+ clrBackOther.Enable(!bEnabled);
+ clrTextOther.Enable(!bEnabled);
+ }
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
+class COptionsMessageDlg : public COptionsBaseDlg
+{
+ void GrabData()
+ {
+ g_plugin.bMergePopup = IsDlgButtonChecked(m_hwnd, IDC_CHKMERGEPOPUP);
+ g_plugin.bMsgWindowCheck = IsDlgButtonChecked(m_hwnd, IDC_CHKWINDOWCHECK);
+ g_plugin.bMsgReplyWindow = IsDlgButtonChecked(m_hwnd, IDC_CHKREPLYWINDOW);
+ g_plugin.bShowDate = IsDlgButtonChecked(m_hwnd, IDC_CHKSHOWDATE);
+ g_plugin.bShowTime = IsDlgButtonChecked(m_hwnd, IDC_CHKSHOWTIME);
+ g_plugin.bShowHeaders = IsDlgButtonChecked(m_hwnd, IDC_CHKSHOWHEADERS);
+ g_plugin.bShowON = IsDlgButtonChecked(m_hwnd, IDC_RDOLD);
+ g_plugin.bShowON = BST_UNCHECKED == IsDlgButtonChecked(m_hwnd, IDC_RDNEW);
+ g_plugin.bHideSend = IsDlgButtonChecked(m_hwnd, IDC_CHKHIDESEND);
+ g_plugin.iNumberMsg = GetDlgItemInt(m_hwnd, IDC_NUMBERMSG, nullptr, FALSE);
+ }
+
+public:
+ COptionsMessageDlg() :
+ COptionsBaseDlg(IDD_OPT_MESSAGE)
+ {}
+
+ bool OnInitDialog() override
+ {
+ CheckDlgButton(m_hwnd, IDC_CHKMERGEPOPUP, g_plugin.bMergePopup);
+ CheckDlgButton(m_hwnd, IDC_CHKWINDOWCHECK, g_plugin.bMsgWindowCheck);
+ CheckDlgButton(m_hwnd, IDC_CHKREPLYWINDOW, g_plugin.bMsgReplyWindow);
+ CheckDlgButton(m_hwnd, IDC_CHKSHOWDATE, g_plugin.bShowDate);
+ CheckDlgButton(m_hwnd, IDC_CHKSHOWTIME, g_plugin.bShowTime);
+ CheckDlgButton(m_hwnd, IDC_CHKSHOWHEADERS, g_plugin.bShowHeaders);
+ CheckDlgButton(m_hwnd, IDC_RDNEW, !g_plugin.bShowON);
+ CheckDlgButton(m_hwnd, IDC_RDOLD, g_plugin.bShowON);
+ CheckDlgButton(m_hwnd, IDC_CHKHIDESEND, g_plugin.bHideSend);
+ SetDlgItemInt(m_hwnd, IDC_NUMBERMSG, g_plugin.iNumberMsg, FALSE);
+
+ OnChange();
+ return true;
+ }
+
+ void OnChange() override
+ {
+ GrabData();
+
+ // disable merge messages options when is not using
+ EnableDlgItem(m_hwnd, IDC_CHKSHOWDATE, g_plugin.bMergePopup);
+ EnableDlgItem(m_hwnd, IDC_CHKSHOWTIME, g_plugin.bMergePopup);
+ EnableDlgItem(m_hwnd, IDC_CHKSHOWHEADERS, g_plugin.bMergePopup);
+ EnableDlgItem(m_hwnd, IDC_CMDEDITHEADERS, g_plugin.bMergePopup && g_plugin.bShowHeaders);
+ EnableDlgItem(m_hwnd, IDC_NUMBERMSG, g_plugin.bMergePopup);
+ EnableDlgItem(m_hwnd, IDC_LBNUMBERMSG, g_plugin.bMergePopup);
+ EnableDlgItem(m_hwnd, IDC_RDNEW, g_plugin.bMergePopup && g_plugin.iNumberMsg);
+ EnableDlgItem(m_hwnd, IDC_RDOLD, g_plugin.bMergePopup && g_plugin.iNumberMsg);
+ }
+
+ bool OnApply() override
+ {
+ GrabData();
+ return true;
+ }
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Module entry point
int OptionsAdd(WPARAM addInfo, LPARAM)
{
OPTIONSDIALOGPAGE odp = {};
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT);
+ odp.flags = ODPF_BOLDGROUPS;
odp.szTitle.a = LPGEN("Event Notify");
odp.szGroup.a = LPGEN("Popups");
- odp.flags = ODPF_BOLDGROUPS;
- odp.pfnDlgProc = OptionsDlgProc;
+
+ odp.szTab.a = LPGEN("Main");
+ odp.pDialog = new COptionsMainDlg();
+ g_plugin.addOptions(addInfo, &odp);
+
+ odp.szTab.a = LPGEN("Message events");
+ odp.pDialog = new COptionsMessageDlg();
g_plugin.addOptions(addInfo, &odp);
return 0;
}
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp
index 71bb4a55f5..f5724dfc44 100644
--- a/plugins/NewEventNotify/src/popup.cpp
+++ b/plugins/NewEventNotify/src/popup.cpp
@@ -359,27 +359,27 @@ 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.bDefaultColorMsg ? 0 : g_plugin.colBackMsg;
- pudw.colorText = g_plugin.bDefaultColorMsg ? 0 : g_plugin.colTextMsg;
- iSeconds = g_plugin.iDelayMsg;
+ pudw.colorBack = g_plugin.msg.bDefault ? 0 : g_plugin.msg.backColor;
+ pudw.colorText = g_plugin.msg.bDefault ? 0 : g_plugin.msg.textColor;
+ iSeconds = g_plugin.msg.iDelay;
sampleEvent = TranslateT("This is a sample message event :-)");
break;
case EVENTTYPE_FILE:
if (!(g_plugin.maskNotify & MASK_FILE)) return 1;
pudw.lchIcon = Skin_LoadIcon(SKINICON_EVENT_FILE);
- pudw.colorBack = g_plugin.bDefaultColorFile ? 0 : g_plugin.colBackFile;
- pudw.colorText = g_plugin.bDefaultColorFile ? 0 : g_plugin.colTextFile;
- iSeconds = g_plugin.iDelayFile;
+ pudw.colorBack = g_plugin.file.bDefault ? 0 : g_plugin.file.backColor;
+ pudw.colorText = g_plugin.file.bDefault ? 0 : g_plugin.file.textColor;
+ iSeconds = g_plugin.file.iDelay;
sampleEvent = TranslateT("This is a sample file event :-D");
break;
default:
if (!(g_plugin.maskNotify & MASK_OTHER)) return 1;
pudw.lchIcon = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
- pudw.colorBack = g_plugin.bDefaultColorOthers ? 0 : g_plugin.colBackOthers;
- pudw.colorText = g_plugin.bDefaultColorOthers ? 0 : g_plugin.colTextOthers;
- iSeconds = g_plugin.iDelayOthers;
+ pudw.colorBack = g_plugin.other.bDefault ? 0 : g_plugin.other.backColor;
+ pudw.colorText = g_plugin.other.bDefault ? 0 : g_plugin.other.textColor;
+ iSeconds = g_plugin.other.iDelay;
sampleEvent = TranslateT("This is a sample other event ;-D");
break;
}
@@ -518,11 +518,3 @@ int PopupUpdate(MCONTACT hContact, MEVENT hEvent)
PUChangeTextW(pdata->hWnd, lpzText);
return 0;
}
-
-int PopupPreview()
-{
- PopupShow(0, 0, EVENTTYPE_MESSAGE);
- PopupShow(0, 0, EVENTTYPE_FILE);
- PopupShow(0, 0, -1);
- return 0;
-}
diff --git a/plugins/NewEventNotify/src/resource.h b/plugins/NewEventNotify/src/resource.h
index 07feaa4615..de868af136 100644
--- a/plugins/NewEventNotify/src/resource.h
+++ b/plugins/NewEventNotify/src/resource.h
@@ -1,28 +1,21 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
-// Used by ..\res\resource.rc
+// Used by C:\Users\georg\DiskW\miranda-ng\plugins\NewEventNotify\res\resource.rc
//
-#define IDD_OPT 101
+#define IDD_OPT_MAIN 101
+#define IDD_OPT_MESSAGE 102
#define IDC_PREVIEW 1000
-#define IDC_CHKNOTIFY_MESSAGE 1001
-#define IDC_CHKNOTIFY_FILE 1003
-#define IDC_CHKNOTIFY_OTHER 1004
-#define IDC_CHKMENUITEM 1005
-#define IDC_CHKDISABLE 1006
-#define IDC_CHKACTL_DISMISS 1007
-#define IDC_CHKACTL_OPEN 1008
-#define IDC_CHKACTL_REMOVE 1009
-#define IDC_CHKACTR_DISMISS 1010
-#define IDC_CHKACTR_OPEN 1011
-#define IDC_CHKACTR_REMOVE 1012
#define IDC_CHKWINDOWCHECK 1013
#define IDC_CHKREPLYWINDOW 1014
-#define IDC_CHKPREVIEW 1015
+#define IDC_DELAY_ERR 1015
#define IDC_CHKINFINITE 1016
#define IDC_CHKHIDESEND 1016
#define IDC_CHKDEFAULTCOL_MESSAGE 1017
#define IDC_COLBACK_MESSAGE 1018
#define IDC_COLTEXT_MESSAGE 1019
+#define IDC_COLBACK_ERR 1020
+#define IDC_COLTEXT_ERR 1021
+#define IDC_CHKDEFAULTCOL_ERR 1022
#define IDC_CHKDEFAULTCOL_FILE 1023
#define IDC_COLBACK_FILE 1024
#define IDC_COLTEXT_FILE 1025
@@ -32,7 +25,9 @@
#define IDC_MERGEPOPUP 1029
#define IDC_CHKINFINITE_MESSAGE 1029
#define IDC_CHKMERGEPOPUP 1030
+#define IDC_COLTEXT_MESSAGE2 1030
#define IDC_DELAY_MESSAGE 1031
+#define IDC_CHKINFINITE_ERR 1032
#define IDC_DELAY_FILE 1033
#define IDC_DELAY_OTHERS 1034
#define IDC_NUMBERMSG 1035
@@ -44,22 +39,17 @@
#define IDC_LBNUMBERMSG 1041
#define IDC_CHKINFINITE_FILE 1043
#define IDC_CHKINFINITE_OTHERS 1044
-#define IDC_CHKMERGEPOPUP2 1045
-#define IDC_SUPRESSRSS 1045
#define IDC_TESTFORREAD 1046
-#define IDC_READCHECK 1046
#define IDC_CMDEDITHEADERS 1047
-#define IDC_CHKACTTE_DISMISS 1049
-#define IDC_CHKACTTE_OPEN 1050
-#define IDC_CHKACTTE_REMOVE 1051
+#define IDC_OPT_TREE 1048
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 108
+#define _APS_NEXT_RESOURCE_VALUE 110
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1048
+#define _APS_NEXT_CONTROL_VALUE 1049
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/plugins/NewEventNotify/src/stdafx.h b/plugins/NewEventNotify/src/stdafx.h
index 9ef71031b2..6c1a0e4527 100644
--- a/plugins/NewEventNotify/src/stdafx.h
+++ b/plugins/NewEventNotify/src/stdafx.h
@@ -90,15 +90,27 @@
#define OPT_PREVIEW "Preview"
#define OPT_MENUITEM "MenuItem"
#define OPT_LIMITPREVIEW "LimitPreview"
+
#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"
@@ -106,9 +118,6 @@
#define OPT_MSGWINDOWCHECK "WindowCheck"
#define OPT_MSGREPLYWINDOW "ReplyWindow"
#define OPT_MERGEPOPUP "MergePopup"
-#define OPT_DELAY_MESSAGE "DelayMessage"
-#define OPT_DELAY_FILE "DelayFile"
-#define OPT_DELAY_OTHERS "DelayOthers"
#define OPT_SHOW_DATE "ShowDate"
#define OPT_SHOW_TIME "ShowTime"
#define OPT_SHOW_HEADERS "ShowHeaders"
@@ -149,9 +158,6 @@ struct CMPlugin : public PLUGIN<CMPlugin>
bool bMUCDisable;
bool bPreview;
bool bMenuitem;
- bool bDefaultColorMsg;
- bool bDefaultColorFile;
- bool bDefaultColorOthers;
bool bDisableNonMessage;
bool bMsgWindowCheck;
bool bMsgReplyWindow;
@@ -166,21 +172,19 @@ struct CMPlugin : public PLUGIN<CMPlugin>
bool bReadCheck;
bool bWindowCheck;
- COLORREF colBackMsg;
- COLORREF colTextMsg;
- COLORREF colBackFile;
- COLORREF colTextFile;
- COLORREF colBackOthers;
- COLORREF colTextOthers;
-
- UINT maskNotify;
- UINT maskActL;
- UINT maskActR;
- UINT maskActTE;
-
- int iDelayMsg;
- int iDelayFile;
- int iDelayOthers;
+ struct
+ {
+ COLORREF backColor, textColor;
+ int iDelay;
+ bool bDefault;
+
+ } msg, file, err, other;
+
+ uint32_t maskNotify;
+ uint32_t maskActL;
+ uint32_t maskActR;
+ uint32_t maskActTE;
+
int iDelayDefault;
int iLimitPreview;
@@ -212,7 +216,6 @@ struct PLUGIN_DATA
int PopupShow(MCONTACT hContact, MEVENT hEvent, UINT eventType);
int PopupUpdate(MCONTACT hContact, MEVENT hEvent);
-int PopupPreview();
int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATA *pdata);
int OptionsAdd(WPARAM addInfo, LPARAM);
int Opt_DisableNEN(BOOL Status);