diff options
| author | 2016-08-08 03:28:11 -0400 | |
|---|---|---|
| committer | 2016-08-08 08:28:11 +0100 | |
| commit | 2a497c62586a5e427a0055f18dbb1d9d55c5ee2d (patch) | |
| tree | 46795b752909f6dc67788de33a0873545de390e1 /src/modules/actioneditor | |
| parent | Add forgotten calls to clear() (diff) | |
| download | KVIrc-2a497c62586a5e427a0055f18dbb1d9d55c5ee2d.tar.gz KVIrc-2a497c62586a5e427a0055f18dbb1d9d55c5ee2d.tar.bz2 KVIrc-2a497c62586a5e427a0055f18dbb1d9d55c5ee2d.zip | |
Fixes Issue #2088 (#2091)
Diffstat (limited to 'src/modules/actioneditor')
| -rw-r--r-- | src/modules/actioneditor/ActionEditor.cpp | 20 | ||||
| -rw-r--r-- | src/modules/actioneditor/ActionEditor.h | 4 |
2 files changed, 17 insertions, 7 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); diff --git a/src/modules/actioneditor/ActionEditor.h b/src/modules/actioneditor/ActionEditor.h index 86470be3f..0877f524a 100644 --- a/src/modules/actioneditor/ActionEditor.h +++ b/src/modules/actioneditor/ActionEditor.h @@ -149,7 +149,9 @@ protected slots: void needsContextCheckToggled(bool); void needsConnectionCheckToggled(bool); void specificWindowsCheckToggled(bool); - void channelQueryOrConsoleWindowCheckToggled(bool); + void channelWindowsCheckToggled(bool); + void consoleWindowsCheckToggled(bool); + void queryWindowsCheckToggled(bool); }; class ActionEditor : public QWidget |
