summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-03-27 15:10:42 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-03-27 15:10:52 +0300
commit42c98b0aec627beb51d50942ef1d1720b3860e8e (patch)
treee40a6bcc16d1d1fb7b68d914add73a925383974e
parente093a01e61e5de615fc11a1785244d12a434da4e (diff)
fixes #3058 (Group chats' popup options dialog moved from StdMsg to the core, its copy in Scriver removed)
-rw-r--r--plugins/Scriver/res/resource.rc30
-rw-r--r--plugins/Scriver/src/chat_options.cpp84
-rw-r--r--plugins/Scriver/src/resource.h8
-rw-r--r--src/core/stdmsg/res/resource.rc30
-rw-r--r--src/core/stdmsg/src/chat_options.cpp74
-rw-r--r--src/mir_app/res/resource.rc18
-rw-r--r--src/mir_app/src/chat.h2
-rw-r--r--src/mir_app/src/chat_ui.cpp74
-rw-r--r--src/mir_app/src/resource.h5
9 files changed, 98 insertions, 227 deletions
diff --git a/plugins/Scriver/res/resource.rc b/plugins/Scriver/res/resource.rc
index 24af2de9b0..bd96a8ca63 100644
--- a/plugins/Scriver/res/resource.rc
+++ b/plugins/Scriver/res/resource.rc
@@ -290,27 +290,6 @@ BEGIN
LTEXT "KB",IDC_CHAT_LIMITTEXT2,290,214,10,8
END
-IDD_OPTIONSPOPUP DIALOGEX 0, 0, 304, 95
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- GROUPBOX "Group chat",IDC_STATIC,0,0,304,91
- CONTROL "Use same style as in the message log",IDC_CHAT_RADIO1,
- "Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,8,11,225,10
- CONTROL "Use default colors",IDC_CHAT_RADIO2,"Button",BS_AUTORADIOBUTTON,8,22,200,10
- CONTROL "Use custom colors",IDC_CHAT_RADIO3,"Button",BS_AUTORADIOBUTTON,8,33,200,10
- LTEXT "Text",IDC_STATIC,20,44,200,8
- CONTROL "Custom1",IDC_CHAT_TEXT,"ColourPicker",WS_TABSTOP,120,44,40,11,WS_EX_NOACTIVATE | 0x10000000L
- LTEXT "Background",IDC_STATIC,20,56,67,8
- CONTROL "Custom2",IDC_CHAT_BKG,"ColourPicker",WS_TABSTOP,120,56,40,11,WS_EX_NOACTIVATE | 0x10000000L
- LTEXT "Timeout (s)",IDC_STATIC,8,75,92,8
- EDITTEXT IDC_CHAT_TIMEOUT,125,71,30,12,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "Spin1",IDC_CHAT_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,155,72,11,12
- LTEXT "(0 means default setting, -1 means indefinite time)",IDC_STATIC,170,70,130,19
-END
-
-
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
@@ -393,10 +372,6 @@ BEGIN
IDD_OPTIONS2, DIALOG
BEGIN
END
-
- IDD_OPTIONSPOPUP, DIALOG
- BEGIN
- END
END
#endif // APSTUDIO_INVOKED
@@ -578,11 +553,6 @@ BEGIN
0
END
-IDD_OPTIONSPOPUP AFX_DIALOG_LAYOUT
-BEGIN
- 0
-END
-
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Scriver/src/chat_options.cpp b/plugins/Scriver/src/chat_options.cpp
index adc391c014..6fef88c896 100644
--- a/plugins/Scriver/src/chat_options.cpp
+++ b/plugins/Scriver/src/chat_options.cpp
@@ -554,82 +554,6 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam,
return FALSE;
}
-static INT_PTR CALLBACK DlgProcOptionsPopup(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
- switch (uMsg) {
- case WM_INITDIALOG:
- TranslateDialogDefault(hwndDlg);
-
- SendDlgItemMessage(hwndDlg, IDC_CHAT_BKG, CPM_SETCOLOUR, 0, g_Settings.crPUBkgColour);
- SendDlgItemMessage(hwndDlg, IDC_CHAT_TEXT, CPM_SETCOLOUR, 0, g_Settings.crPUTextColour);
-
- if (g_Settings.iPopupStyle == 2)
- CheckDlgButton(hwndDlg, IDC_CHAT_RADIO2, BST_CHECKED);
- else if (g_Settings.iPopupStyle == 3)
- CheckDlgButton(hwndDlg, IDC_CHAT_RADIO3, BST_CHECKED);
- else
- CheckDlgButton(hwndDlg, IDC_CHAT_RADIO1, BST_CHECKED);
-
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_BKG), IsDlgButtonChecked(hwndDlg, IDC_CHAT_RADIO3) == BST_CHECKED ? TRUE : FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_TEXT), IsDlgButtonChecked(hwndDlg, IDC_CHAT_RADIO3) == BST_CHECKED ? TRUE : FALSE);
-
- SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN1, UDM_SETRANGE, 0, MAKELONG(100, -1));
- SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN1, UDM_SETPOS, 0, MAKELONG(g_Settings.iPopupTimeout, 0));
- break;
-
- case WM_COMMAND:
- if ((LOWORD(wParam) == IDC_CHAT_TIMEOUT) && (HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
- return 0;
-
- if (lParam)
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
-
- switch (LOWORD(wParam)) {
- case IDC_CHAT_RADIO1:
- case IDC_CHAT_RADIO2:
- case IDC_CHAT_RADIO3:
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_BKG), IsDlgButtonChecked(hwndDlg, IDC_CHAT_RADIO3) == BST_CHECKED ? TRUE : FALSE);
- EnableWindow(GetDlgItem(hwndDlg, IDC_CHAT_TEXT), IsDlgButtonChecked(hwndDlg, IDC_CHAT_RADIO3) == BST_CHECKED ? TRUE : FALSE);
- }
- break;
-
- case WM_NOTIFY:
- switch (((LPNMHDR)lParam)->idFrom) {
- case 0:
- switch (((LPNMHDR)lParam)->code) {
- case PSN_APPLY:
- int iLen;
- if (IsDlgButtonChecked(hwndDlg, IDC_CHAT_RADIO2) == BST_CHECKED)
- iLen = 2;
- else if (IsDlgButtonChecked(hwndDlg, IDC_CHAT_RADIO3) == BST_CHECKED)
- iLen = 3;
- else
- iLen = 1;
-
- g_Settings.iPopupStyle = iLen;
- db_set_b(0, CHAT_MODULE, "PopupStyle", (uint8_t)iLen);
-
- iLen = SendDlgItemMessage(hwndDlg, IDC_CHAT_SPIN1, UDM_GETPOS, 0, 0);
- g_Settings.iPopupTimeout = iLen;
- db_set_w(0, CHAT_MODULE, "PopupTimeout", (uint16_t)iLen);
-
- g_Settings.crPUBkgColour = SendDlgItemMessage(hwndDlg, IDC_CHAT_BKG, CPM_GETCOLOUR, 0, 0);
- db_set_dw(0, CHAT_MODULE, "PopupColorBG", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_CHAT_BKG, CPM_GETCOLOUR, 0, 0));
- g_Settings.crPUTextColour = SendDlgItemMessage(hwndDlg, IDC_CHAT_TEXT, CPM_GETCOLOUR, 0, 0);
- db_set_dw(0, CHAT_MODULE, "PopupColorText", (uint32_t)SendDlgItemMessage(hwndDlg, IDC_CHAT_TEXT, CPM_GETCOLOUR, 0, 0));
- }
- return TRUE;
- }
- break;
-
- case UM_CHECKSTATECHANGE:
- PostMessage(hwndDlg, OPT_FIXHEADINGS, 0, 0);
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- break;
- }
- return FALSE;
-}
-
void ChatOptInitialize(WPARAM wParam)
{
OPTIONSDIALOGPAGE odp = {};
@@ -647,12 +571,4 @@ void ChatOptInitialize(WPARAM wParam)
odp.pfnDlgProc = DlgProcOptions2;
odp.szTab.a = LPGEN("Log formatting");
g_plugin.addOptions(wParam, &odp);
-
- ////////////////////////////////////////////////////////////////////////////////////////
- odp.position = 910000002;
- odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONSPOPUP);
- odp.szGroup.a = LPGEN("Popups");
- odp.szTitle.a = LPGEN("Messaging");
- odp.pfnDlgProc = DlgProcOptionsPopup;
- g_plugin.addOptions(wParam, &odp);
}
diff --git a/plugins/Scriver/src/resource.h b/plugins/Scriver/src/resource.h
index acb675f715..683af1cf41 100644
--- a/plugins/Scriver/src/resource.h
+++ b/plugins/Scriver/src/resource.h
@@ -38,7 +38,6 @@
#define IDD_OPTIONS1 402
#define IDD_OPTIONS2 403
#define IDD_FILTER 405
-#define IDD_OPTIONSPOPUP 406
#define IDI_BUNDERLINE 420
#define IDI_BBOLD 421
#define IDI_BITALICS 422
@@ -173,7 +172,6 @@
#define IDC_CHAT_CHECKBOXES 5021
#define IDC_CHAT_NICKROW 5024
#define IDC_CHAT_LOGLIMIT 5024
-#define IDC_CHAT_SPIN1 5028
#define IDC_CHAT_SPIN2 5029
#define IDC_CHAT_SPIN3 5030
#define IDC_CHAT_HIGHLIGHTWORDS 5040
@@ -185,12 +183,6 @@
#define IDC_CHAT_LIMIT 5050
#define IDC_CHAT_LOGTIMESTAMP 5051
#define IDC_CHAT_GROUP 5057
-#define IDC_CHAT_RADIO1 5061
-#define IDC_CHAT_RADIO2 5062
-#define IDC_CHAT_RADIO3 5063
-#define IDC_CHAT_TEXT 5064
-#define IDC_CHAT_BKG 5065
-#define IDC_CHAT_TIMEOUT 5067
#define IDC_CHAT_HIGHLIGHT 5068
#define IDC_CHAT_TEXTO 5069
#define IDC_CHAT_LOGGING 5069
diff --git a/src/core/stdmsg/res/resource.rc b/src/core/stdmsg/res/resource.rc
index 44b399894c..6f0083624d 100644
--- a/src/core/stdmsg/res/resource.rc
+++ b/src/core/stdmsg/res/resource.rc
@@ -217,26 +217,6 @@ BEGIN
CONTROL "",IDC_SPIN4,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,183,178,11,14
END
-IDD_OPTIONSPOPUP DIALOGEX 0, 0, 277, 177
-STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
-EXSTYLE WS_EX_CONTROLPARENT
-FONT 8, "MS Shell Dlg", 0, 0, 0x1
-BEGIN
- CONTROL "Use same style as in the message log",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,33,29,225,10
- CONTROL "Use default colors",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,33,62,217,10
- CONTROL "Use custom colors",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,33,95,105,10
- CONTROL "Custom1",IDC_TEXT,"ColourPicker",WS_TABSTOP,141,93,50,14,WS_EX_NOACTIVATE | 0x10000000L
- CONTROL "Custom2",IDC_BKG,"ColourPicker",WS_TABSTOP,201,93,50,14,WS_EX_NOACTIVATE | 0x10000000L
- EDITTEXT IDC_TIMEOUT,132,134,38,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
- CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,169,135,11,14
- GROUPBOX "Popups for the StdMsg plugin",IDC_STATIC,0,0,277,174
- LTEXT "Timeout (s)",IDC_STATIC,33,138,92,8
- LTEXT "Text",IDC_STATIC,141,83,49,8
- LTEXT "Background",IDC_STATIC,201,83,67,8
- LTEXT "(Setting timeout to 0 means default setting and -1 means indefinite time)",IDC_STATIC,33,151,207,17
-END
-
-
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
@@ -347,16 +327,6 @@ BEGIN
HORZGUIDE, 158
HORZGUIDE, 174
END
-
- IDD_OPTIONSPOPUP, DIALOG
- BEGIN
- VERTGUIDE, 33
- VERTGUIDE, 157
- VERTGUIDE, 201
- HORZGUIDE, 49
- HORZGUIDE, 81
- HORZGUIDE, 174
- END
END
#endif // APSTUDIO_INVOKED
diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp
index cd1be53735..9a2514c51d 100644
--- a/src/core/stdmsg/src/chat_options.cpp
+++ b/src/core/stdmsg/src/chat_options.cpp
@@ -478,73 +478,6 @@ public:
};
/////////////////////////////////////////////////////////////////////////////////////////
-// Popup options
-
-class COptPopupDlg : public CDlgBase
-{
- CCtrlCheck chkRadio1, chkRadio2, chkRadio3;
- CCtrlColor clrBack, clrText;
-
-public:
- COptPopupDlg() :
- CDlgBase(g_plugin, IDD_OPTIONSPOPUP),
- clrBack(this, IDC_BKG),
- clrText(this, IDC_TEXT),
- chkRadio1(this, IDC_RADIO1),
- chkRadio2(this, IDC_RADIO2),
- chkRadio3(this, IDC_RADIO3)
- {
- chkRadio1.OnChange = chkRadio2.OnChange = chkRadio3.OnChange = Callback(this, &COptPopupDlg::onChange_Radio);
- }
-
- bool OnInitDialog() override
- {
- clrBack.SetColor(g_Settings.crPUBkgColour);
- clrText.SetColor(g_Settings.crPUTextColour);
-
- if (g_Settings.iPopupStyle == 2)
- CheckDlgButton(m_hwnd, IDC_RADIO2, BST_CHECKED);
- else if (g_Settings.iPopupStyle == 3)
- CheckDlgButton(m_hwnd, IDC_RADIO3, BST_CHECKED);
- else
- CheckDlgButton(m_hwnd, IDC_RADIO1, BST_CHECKED);
- onChange_Radio(0);
-
- SendDlgItemMessage(m_hwnd, IDC_SPIN1, UDM_SETRANGE, 0, MAKELONG(100, -1));
- SendDlgItemMessage(m_hwnd, IDC_SPIN1, UDM_SETPOS, 0, MAKELONG(g_Settings.iPopupTimeout, 0));
- return true;
- }
-
- bool OnApply() override
- {
- int iLen;
- if (IsDlgButtonChecked(m_hwnd, IDC_RADIO2) == BST_CHECKED)
- iLen = 2;
- else if (IsDlgButtonChecked(m_hwnd, IDC_RADIO3) == BST_CHECKED)
- iLen = 3;
- else
- iLen = 1;
- g_Settings.iPopupStyle = iLen;
- db_set_b(0, CHAT_MODULE, "PopupStyle", (uint8_t)iLen);
-
- iLen = SendDlgItemMessage(m_hwnd, IDC_SPIN1, UDM_GETPOS, 0, 0);
- g_Settings.iPopupTimeout = iLen;
- db_set_w(0, CHAT_MODULE, "PopupTimeout", (uint16_t)iLen);
-
- db_set_dw(0, CHAT_MODULE, "PopupColorBG", g_Settings.crPUBkgColour = clrBack.GetColor());
- db_set_dw(0, CHAT_MODULE, "PopupColorText", g_Settings.crPUTextColour = clrText.GetColor());
- return true;
- }
-
- void onChange_Radio(CCtrlCheck*)
- {
- bool bStatus = chkRadio3.GetState();
- clrBack.Enable(bStatus);
- clrText.Enable(bStatus);
- }
-};
-
-/////////////////////////////////////////////////////////////////////////////////////////
// Module init procedure
int ChatOptionsInitialize(WPARAM wParam)
@@ -563,12 +496,5 @@ int ChatOptionsInitialize(WPARAM wParam)
odp.szTab.a = LPGEN("Chat log");
odp.pDialog = new COptLogDlg();
g_plugin.addOptions(wParam, &odp);
-
- odp.position = 910000002;
- odp.szTitle.a = LPGEN("Chat");
- odp.szGroup.a = LPGEN("Popups");
- odp.szTab.a = nullptr;
- odp.pDialog = new COptPopupDlg();
- g_plugin.addOptions(wParam, &odp);
return 0;
}
diff --git a/src/mir_app/res/resource.rc b/src/mir_app/res/resource.rc
index 423dbc7941..900613ed3b 100644
--- a/src/mir_app/res/resource.rc
+++ b/src/mir_app/res/resource.rc
@@ -963,6 +963,24 @@ BEGIN
PUSHBUTTON "Set password",IDC_USERPASS1,200,153,111,17
END
+IDD_OPTIONSPOPUP DIALOGEX 0, 0, 277, 177
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
+EXSTYLE WS_EX_CONTROLPARENT
+FONT 8, "MS Shell Dlg", 0, 0, 0x1
+BEGIN
+ GROUPBOX "Group chats",IDC_STATIC,0,0,277,174
+ CONTROL "Use same style as in the message log",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,33,29,225,10
+ CONTROL "Use default colors",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,33,62,217,10
+ CONTROL "Use custom colors",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,33,95,105,10
+ CONTROL "",IDC_TEXT,"ColourPicker",WS_TABSTOP,141,93,50,14,WS_EX_NOACTIVATE | 0x10000000L
+ CONTROL "",IDC_BKG,"ColourPicker",WS_TABSTOP,201,93,50,14,WS_EX_NOACTIVATE | 0x10000000L
+ EDITTEXT IDC_TIMEOUT,132,134,38,14,ES_RIGHT | ES_AUTOHSCROLL | ES_NUMBER
+ CONTROL "",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS | UDS_HOTTRACK,169,135,11,14
+ LTEXT "Timeout (s)",IDC_STATIC,33,138,92,8
+ LTEXT "Text",IDC_STATIC,141,83,49,8
+ LTEXT "Background",IDC_STATIC,201,83,67,8
+ LTEXT "(Setting timeout to 0 means default setting and -1 means indefinite time)",IDC_STATIC,33,151,207,17
+END
/////////////////////////////////////////////////////////////////////////////
//
diff --git a/src/mir_app/src/chat.h b/src/mir_app/src/chat.h
index 8be9224d3d..ed4e28aa22 100644
--- a/src/mir_app/src/chat.h
+++ b/src/mir_app/src/chat.h
@@ -36,7 +36,7 @@ extern wchar_t *g_szFontGroup;
extern mir_cs csChat;
extern HICON g_hChatIcons[20];
-extern uint32_t g_dwDiskLogFlags;
+extern uint32_t g_dwDiskLogFlags;
extern HCURSOR g_hCurHyperlinkHand;
extern char* pLogIconBmpBits[14];
extern HANDLE hevSendEvent, hevBuildMenuEvent;
diff --git a/src/mir_app/src/chat_ui.cpp b/src/mir_app/src/chat_ui.cpp
index 551444f323..789f6fd075 100644
--- a/src/mir_app/src/chat_ui.cpp
+++ b/src/mir_app/src/chat_ui.cpp
@@ -133,6 +133,73 @@ public:
void onClick_Log(CCtrlButton *) { InvertColumn(IDC_L1); }
};
+/////////////////////////////////////////////////////////////////////////////////////////
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// Popup options
+
+class COptPopupDlg : public CDlgBase
+{
+ CCtrlSpin spinTimeout;
+ CCtrlCheck chkRadio1, chkRadio2, chkRadio3;
+ CCtrlColor clrBack, clrText;
+
+public:
+ COptPopupDlg() :
+ CDlgBase(g_plugin, IDD_OPTIONSPOPUP),
+ clrBack(this, IDC_BKG),
+ clrText(this, IDC_TEXT),
+ chkRadio1(this, IDC_RADIO1),
+ chkRadio2(this, IDC_RADIO2),
+ chkRadio3(this, IDC_RADIO3),
+ spinTimeout(this, IDC_SPIN1, 100, -1)
+ {
+ chkRadio1.OnChange = chkRadio2.OnChange = chkRadio3.OnChange = Callback(this, &COptPopupDlg::onChange_Radio);
+ }
+
+ bool OnInitDialog() override
+ {
+ clrBack.SetColor(g_Settings->crPUBkgColour);
+ clrText.SetColor(g_Settings->crPUTextColour);
+
+ if (g_Settings->iPopupStyle == 2)
+ CheckDlgButton(m_hwnd, IDC_RADIO2, BST_CHECKED);
+ else if (g_Settings->iPopupStyle == 3)
+ CheckDlgButton(m_hwnd, IDC_RADIO3, BST_CHECKED);
+ else
+ CheckDlgButton(m_hwnd, IDC_RADIO1, BST_CHECKED);
+ onChange_Radio(0);
+
+ spinTimeout.SetPosition(g_Settings->iPopupTimeout);
+ return true;
+ }
+
+ bool OnApply() override
+ {
+ if (IsDlgButtonChecked(m_hwnd, IDC_RADIO2) == BST_CHECKED)
+ g_Settings->iPopupStyle = 2;
+ else if (IsDlgButtonChecked(m_hwnd, IDC_RADIO3) == BST_CHECKED)
+ g_Settings->iPopupStyle = 3;
+ else
+ g_Settings->iPopupStyle = 1;
+ db_set_b(0, CHAT_MODULE, "PopupStyle", g_Settings->iPopupStyle);
+
+ db_set_w(0, CHAT_MODULE, "PopupTimeout", g_Settings->iPopupTimeout = spinTimeout.GetPosition());
+ db_set_dw(0, CHAT_MODULE, "PopupColorBG", g_Settings->crPUBkgColour = clrBack.GetColor());
+ db_set_dw(0, CHAT_MODULE, "PopupColorText", g_Settings->crPUTextColour = clrText.GetColor());
+ return true;
+ }
+
+ void onChange_Radio(CCtrlCheck *)
+ {
+ bool bStatus = chkRadio3.GetState();
+ clrBack.Enable(bStatus);
+ clrText.Enable(bStatus);
+ }
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
void ChatOptionsInit(WPARAM wParam)
{
OPTIONSDIALOGPAGE odp = {};
@@ -143,4 +210,11 @@ void ChatOptionsInit(WPARAM wParam)
odp.szTab.a = LPGEN("Events and filters");
odp.pDialog = new CChatEventOptionDlg();
g_plugin.addOptions(wParam, &odp);
+
+ odp.position = 910000002;
+ odp.szTitle.a = LPGEN("Group chats");
+ odp.szGroup.a = LPGEN("Popups");
+ odp.szTab.a = nullptr;
+ odp.pDialog = new COptPopupDlg();
+ g_plugin.addOptions(wParam, &odp);
}
diff --git a/src/mir_app/src/resource.h b/src/mir_app/src/resource.h
index 8fda4efe5c..880bc69078 100644
--- a/src/mir_app/src/resource.h
+++ b/src/mir_app/src/resource.h
@@ -43,6 +43,7 @@
#define IDD_OPT_SOUND 134
#define IDR_LOGMENU 135
#define IDI_RECVMSG 136
+#define IDD_OPTIONSPOPUP 137
#define IDI_URL 138
#define IDI_MCMENUOFF 144
#define IDI_MCMENU 145
@@ -232,6 +233,7 @@
#define IDC_MYNOTES 1033
#define IDC_TRAYONLYFORINACTIVE 1034
#define IDC_POPUPONLYFORINACTIVE 1035
+#define IDC_TIMEOUT 1036
#define IDC_URLS 1037
#define IDC_COLORTEXT 1038
#define IDC_REPLY 1039
@@ -591,9 +593,12 @@
#define IDC_LANGUAGES 1747
#define IDC_GENMENU_MODULE 1748
#define IDC_LOGROTATE 1749
+#define IDC_RADIO3 1750
#define IDC_RIGHTCLICK 1751
#define IDC_FILTER_SEARCH 1752
#define IDC_TREE 1753
+#define IDC_BKG 1754
+#define IDC_TEXT 1755
#define IDC_EFFECT_COLOUR_TEXT1 1853
#define IDC_EFFECT_COLOUR_SPIN1 1854
#define IDC_EXTRAORDER 1889