diff options
author | George Hazan <george.hazan@gmail.com> | 2024-03-02 12:34:22 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2024-03-02 12:34:22 +0300 |
commit | 91cea8d160d44ac4574c981dfe0fc9cf195d7c6a (patch) | |
tree | 4c9912d9959fddeb84ae9acac935567515bd0662 /protocols | |
parent | 93d4fb72168a48d7c6120a2ae31c7964b8631afa (diff) |
fixes #4259 (IRC: при закрытии окна настроек канала задаётся вопрос о сохранении настроек, даже если они не менялись)
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/IRCG/res/IRC.rc | 4 | ||||
-rw-r--r-- | protocols/IRCG/src/windows.cpp | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/protocols/IRCG/res/IRC.rc b/protocols/IRCG/res/IRC.rc index 12bb071fb0..ee01f5d93a 100644 --- a/protocols/IRCG/res/IRC.rc +++ b/protocols/IRCG/res/IRC.rc @@ -241,7 +241,7 @@ CAPTION "Channel manager" FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
COMBOBOX IDC_TOPIC,13,56,192,103,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
- CONTROL "&Set",IDC_APPLYTOPIC,"MButtonClass",WS_DISABLED | WS_TABSTOP,226,54,28,14,WS_EX_NOACTIVATE | 0x10000000L
+ CONTROL "&Set",IDC_APPLYTOPIC,"MButtonClass",WS_TABSTOP,226,54,28,14,WS_EX_NOACTIVATE | 0x10000000L
CONTROL "Bans",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON | WS_DISABLED | WS_GROUP | WS_TABSTOP,16,87,69,10
CONTROL "Invites",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,90,87,74,10
CONTROL "Excepts",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON | WS_DISABLED,166,87,86,10
@@ -259,7 +259,7 @@ BEGIN EDITTEXT IDC_LIMIT,183,223,25,12,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
CONTROL "Private",IDC_CHECK7,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,134,237,73,10
CONTROL "Secret",IDC_CHECK8,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,134,250,80,10
- CONTROL "&Set",IDC_APPLYMODES,"MButtonClass",WS_DISABLED | WS_TABSTOP,226,257,28,14,WS_EX_NOACTIVATE | 0x10000000L
+ CONTROL "&Set",IDC_APPLYMODES,"MButtonClass",WS_TABSTOP,226,257,28,14,WS_EX_NOACTIVATE | 0x10000000L
DEFPUSHBUTTON "&Close",IDOK,212,284,50,14
GROUPBOX "Topic",IDC_STATIC,6,45,256,28
GROUPBOX "User modes",IDC_STATIC,6,73,256,118
diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp index 18e8149a72..cc91f77a00 100644 --- a/protocols/IRCG/src/windows.cpp +++ b/protocols/IRCG/src/windows.cpp @@ -478,6 +478,9 @@ bool CManagerDlg::OnInitDialog() m_list.SendMsg(LB_SETHORIZONTALEXTENT, 750, NULL);
m_radio1.SetState(true);
+ m_applyModes.Disable();
+ m_applyTopic.Disable();
+
const char* modes = m_proto->sChannelModes;
if (!strchr(modes, 't')) m_check1.Disable();
if (!strchr(modes, 'n')) m_check2.Disable();
@@ -820,19 +823,22 @@ void CManagerDlg::OnApplyTopic(CCtrlButton*) void CManagerDlg::OnCheck(CCtrlData*)
{
- m_applyModes.Enable();
+ if (m_bInitialized)
+ m_applyModes.Enable();
}
void CManagerDlg::OnCheck5(CCtrlData*)
{
m_key.Enable(m_check5.GetState());
- m_applyModes.Enable();
+ if (m_bInitialized)
+ m_applyModes.Enable();
}
void CManagerDlg::OnCheck6(CCtrlData*)
{
m_limit.Enable(m_check6.GetState());
- m_applyModes.Enable();
+ if (m_bInitialized)
+ m_applyModes.Enable();
}
void CManagerDlg::OnRadio(CCtrlData*)
|