From 4bfba6702290ad8edeb8e858bc2847d98d8a57aa Mon Sep 17 00:00:00 2001
From: Richard Maudsley <richard.maudsley@isode.com>
Date: Mon, 20 Jan 2014 16:48:25 +0000
Subject: Updated GUI logic.

Change-Id: I793fc80d407cdf7175d32460f11c69df86daa261

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);
-- 
cgit v0.10.2-6-g49f6