summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
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);