aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/actioneditor/ActionEditor.cpp
diff options
context:
space:
mode:
authorGravatar IceN9ne2016-08-08 03:28:11 -0400
committerGravatar un1versal2016-08-08 08:28:11 +0100
commit2a497c62586a5e427a0055f18dbb1d9d55c5ee2d (patch)
tree46795b752909f6dc67788de33a0873545de390e1 /src/modules/actioneditor/ActionEditor.cpp
parentAdd forgotten calls to clear() (diff)
downloadKVIrc-2a497c62586a5e427a0055f18dbb1d9d55c5ee2d.tar.gz
KVIrc-2a497c62586a5e427a0055f18dbb1d9d55c5ee2d.tar.bz2
KVIrc-2a497c62586a5e427a0055f18dbb1d9d55c5ee2d.zip
Fixes Issue #2088 (#2091)
Diffstat (limited to 'src/modules/actioneditor/ActionEditor.cpp')
-rw-r--r--src/modules/actioneditor/ActionEditor.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/modules/actioneditor/ActionEditor.cpp b/src/modules/actioneditor/ActionEditor.cpp
index d1347b698..3cfdd9c07 100644
--- a/src/modules/actioneditor/ActionEditor.cpp
+++ b/src/modules/actioneditor/ActionEditor.cpp
@@ -229,7 +229,7 @@ SingleActionEditor::SingleActionEditor(QWidget * par, ActionEditor * ed)
m_pWindowConsoleCheck->setToolTip(__tr2qs_ctx("Check this option if this action should be enabled only when "
"the active window is a console", "editor"));
- connect(m_pWindowConsoleCheck, SIGNAL(toggled(bool)), this, SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
+ connect(m_pWindowConsoleCheck, SIGNAL(toggled(bool)), this, SLOT(consoleWindowsCheckToggled(bool)));
gl->addWidget(m_pWindowConsoleCheck, 4, 1, 1, 4);
m_pConsoleOnlyIfUsersSelectedCheck = new QCheckBox(__tr2qs_ctx("Only if there are selected users", "editor"), tab);
@@ -242,7 +242,7 @@ SingleActionEditor::SingleActionEditor(QWidget * par, ActionEditor * ed)
m_pWindowChannelCheck->setToolTip(__tr2qs_ctx("Check this option if this action should be enabled only when "
"the active window is a channel", "editor"));
- connect(m_pWindowChannelCheck, SIGNAL(toggled(bool)), this, SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
+ connect(m_pWindowChannelCheck, SIGNAL(toggled(bool)), this, SLOT(channelWindowsCheckToggled(bool)));
gl->addWidget(m_pWindowChannelCheck, 6, 1, 1, 4);
m_pChannelOnlyIfUsersSelectedCheck = new QCheckBox(__tr2qs_ctx("Only if there are selected users", "editor"), tab);
@@ -255,7 +255,7 @@ SingleActionEditor::SingleActionEditor(QWidget * par, ActionEditor * ed)
m_pWindowQueryCheck->setToolTip(__tr2qs_ctx("Check this option if this action should be enabled only when "
"the active window is a query", "editor"));
- connect(m_pWindowQueryCheck, SIGNAL(toggled(bool)), this, SLOT(channelQueryOrConsoleWindowCheckToggled(bool)));
+ connect(m_pWindowQueryCheck, SIGNAL(toggled(bool)), this, SLOT(queryWindowsCheckToggled(bool)));
gl->addWidget(m_pWindowQueryCheck, 8, 1, 1, 4);
m_pQueryOnlyIfUsersSelectedCheck = new QCheckBox(__tr2qs_ctx("Only if there are selected users", "editor"), tab);
@@ -292,16 +292,24 @@ SingleActionEditor::SingleActionEditor(QWidget * par, ActionEditor * ed)
SingleActionEditor::~SingleActionEditor()
= default;
-void SingleActionEditor::channelQueryOrConsoleWindowCheckToggled(bool)
+void SingleActionEditor::channelWindowsCheckToggled(bool)
{
m_pChannelOnlyIfUsersSelectedCheck->setEnabled(m_pWindowChannelCheck->isChecked());
m_pChannelOnlyIfUsersSelectedCheck->setChecked(false);
- m_pQueryOnlyIfUsersSelectedCheck->setEnabled(m_pWindowQueryCheck->isChecked());
- m_pQueryOnlyIfUsersSelectedCheck->setChecked(false);
+}
+
+void SingleActionEditor::consoleWindowsCheckToggled(bool)
+{
m_pConsoleOnlyIfUsersSelectedCheck->setEnabled(m_pWindowConsoleCheck->isChecked());
m_pConsoleOnlyIfUsersSelectedCheck->setChecked(false);
}
+void SingleActionEditor::queryWindowsCheckToggled(bool)
+{
+ m_pQueryOnlyIfUsersSelectedCheck->setEnabled(m_pWindowQueryCheck->isChecked());
+ m_pQueryOnlyIfUsersSelectedCheck->setChecked(false);
+}
+
void SingleActionEditor::needsContextCheckToggled(bool)
{
m_pEnableAtLoginCheck->setChecked(false);