summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorRichard Maudsley <richard.maudsley@isode.com>2014-01-20 16:48:25 (GMT)
committerRichard Maudsley <richard.maudsley@isode.com>2014-01-20 16:48:25 (GMT)
commit4bfba6702290ad8edeb8e858bc2847d98d8a57aa (patch)
tree3d3a9fdee9d30b07880e1e0b3d6e585ab764997e /Swift
parentfb71563d8d77f34cef9a9f55832bd060e07be665 (diff)
downloadswift-4bfba6702290ad8edeb8e858bc2847d98d8a57aa.zip
swift-4bfba6702290ad8edeb8e858bc2847d98d8a57aa.tar.bz2
Updated GUI logic.
Change-Id: I793fc80d407cdf7175d32460f11c69df86daa261
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/QtHighlightEditor.cpp39
1 files changed, 22 insertions, 17 deletions
diff --git a/Swift/QtUI/QtHighlightEditor.cpp b/Swift/QtUI/QtHighlightEditor.cpp
index 0fdec97..6bbd502 100644
--- a/Swift/QtUI/QtHighlightEditor.cpp
+++ b/Swift/QtUI/QtHighlightEditor.cpp
@@ -310,25 +310,24 @@ void QtHighlightEditor::widgetClick()
void QtHighlightEditor::disableDialog()
{
- /* TODO: check all of these */
-
- ui_.chatRadio->setChecked(true);
- ui_.senderRadio->setChecked(false);
- jid_->setText("");
- ui_.keywordRadio->setChecked(false);
- ui_.keyword->setText("");
- ui_.nickIsKeyword->setChecked(false);
- ui_.matchWholeWords->setChecked(false);
- ui_.matchCase->setChecked(false);
- ui_.noColorRadio->setChecked(true);
- ui_.foregroundColor->setEnabled(false);
- ui_.backgroundColor->setEnabled(false);
- ui_.noSoundRadio->setChecked(true);
- ui_.foregroundColor->setColor(QColor());
- ui_.backgroundColor->setColor(QColor());
- ui_.soundFile->setText("");
+ ui_.chatRadio->setEnabled(false);
+ ui_.roomRadio->setEnabled(false);
+ ui_.allMsgRadio->setEnabled(false);
+ ui_.nickIsKeyword->setEnabled(false);
+ ui_.senderRadio->setEnabled(false);
+ ui_.dummySenderName->setEnabled(false);
+ ui_.keywordRadio->setEnabled(false);
+ ui_.keyword->setEnabled(false);
+ ui_.matchWholeWords->setEnabled(false);
+ ui_.matchCase->setEnabled(false);
+ ui_.noColorRadio->setEnabled(false);
+ ui_.defaultColorRadio->setEnabled(false);
+ ui_.customColorRadio->setEnabled(false);
ui_.foregroundColor->setEnabled(false);
ui_.backgroundColor->setEnabled(false);
+ ui_.noSoundRadio->setEnabled(false);
+ ui_.defaultSoundRadio->setEnabled(false);
+ ui_.customSoundRadio->setEnabled(false);
ui_.soundFile->setEnabled(false);
ui_.soundFileButton->setEnabled(false);
}
@@ -466,6 +465,9 @@ void QtHighlightEditor::ruleToDialog(const HighlightRule& rule)
const HighlightAction& action = rule.getAction();
+ ui_.noColorRadio->setEnabled(true);
+ ui_.defaultColorRadio->setEnabled(true);
+ ui_.customColorRadio->setEnabled(true);
if (action.highlightText()) {
if (action.getTextColor().empty() && action.getTextBackground().empty()) {
ui_.defaultColorRadio->setChecked(true);
@@ -486,6 +488,9 @@ void QtHighlightEditor::ruleToDialog(const HighlightRule& rule)
ui_.backgroundColor->setEnabled(false);
}
+ ui_.noSoundRadio->setEnabled(true);
+ ui_.defaultSoundRadio->setEnabled(true);
+ ui_.customSoundRadio->setEnabled(true);
if (action.playSound()) {
if (action.getSoundFile().empty()) {
ui_.defaultSoundRadio->setChecked(true);