diff options
Diffstat (limited to 'Swift')
| -rw-r--r-- | Swift/QtUI/QtHighlightEditor.cpp | 2 | ||||
| -rw-r--r-- | Swift/QtUI/QtHighlightEditor.ui | 11 | 
2 files changed, 8 insertions, 5 deletions
diff --git a/Swift/QtUI/QtHighlightEditor.cpp b/Swift/QtUI/QtHighlightEditor.cpp index 3900cf9..ce07003 100644 --- a/Swift/QtUI/QtHighlightEditor.cpp +++ b/Swift/QtUI/QtHighlightEditor.cpp @@ -138,71 +138,71 @@ void QtHighlightEditor::setHighlightManager(HighlightManager* highlightManager)  void QtHighlightEditor::setContactSuggestions(const std::vector<Contact::ref>& suggestions)  {  	jid_->setSuggestions(suggestions);  }  void QtHighlightEditor::colorOtherSelect()  {  	ui_.foregroundColor->setEnabled(false);  	ui_.backgroundColor->setEnabled(false);  }  void QtHighlightEditor::colorCustomSelect()  {  	ui_.foregroundColor->setEnabled(true);  	ui_.backgroundColor->setEnabled(true);  }  void QtHighlightEditor::soundOtherSelect()  {  	ui_.soundFile->setEnabled(false);  	ui_.soundFileButton->setEnabled(false);  }  void QtHighlightEditor::soundCustomSelect()  {  	ui_.soundFile->setEnabled(true);  	ui_.soundFileButton->setEnabled(true);  }  void QtHighlightEditor::onNewButtonClicked()  {  	int row = getSelectedRow() + 1;  	populateList();  	HighlightRule newRule; -	newRule.setMatchChat(true); +	newRule.setMatchMUC(true);  	highlightManager_->insertRule(row, newRule);  	QListWidgetItem *item = new QListWidgetItem();  	item->setText(P2QSTRING(formatShortDescription(newRule)));  	ui_.listWidget->insertItem(row, item);  	selectRow(row);  }  void QtHighlightEditor::onDeleteButtonClicked()  {  	int selectedRow = getSelectedRow();  	assert(selectedRow>=0 && selectedRow<ui_.listWidget->count());  	delete ui_.listWidget->takeItem(selectedRow);  	highlightManager_->removeRule(selectedRow);  	if (!ui_.listWidget->count()) {  		disableDialog();  		ui_.deleteButton->setEnabled(false);  	} else {  		if (selectedRow == ui_.listWidget->count()) {  			selectRow(ui_.listWidget->count() - 1);  		} else {  			selectRow(selectedRow);  		}  	}  }  void QtHighlightEditor::onCurrentRowChanged(int currentRow)  {  	ui_.deleteButton->setEnabled(currentRow != -1);  	ui_.moveUpButton->setEnabled(currentRow != -1 && currentRow != 0);  	ui_.moveDownButton->setEnabled(currentRow != -1 && currentRow != (ui_.listWidget->count()-1));  	if (previousRow_ != -1) {  		if (ui_.listWidget->count() > previousRow_) {  			highlightManager_->setRule(previousRow_, ruleFromDialog()); diff --git a/Swift/QtUI/QtHighlightEditor.ui b/Swift/QtUI/QtHighlightEditor.ui index a2baffd..be2e99b 100644 --- a/Swift/QtUI/QtHighlightEditor.ui +++ b/Swift/QtUI/QtHighlightEditor.ui @@ -112,83 +112,86 @@            <widget class="QPushButton" name="moveUpButton">             <property name="text">              <string>Move Up</string>             </property>            </widget>           </item>           <item>            <widget class="QPushButton" name="moveDownButton">             <property name="text">              <string>Move Down</string>             </property>            </widget>           </item>          </layout>         </item>         <item>          <widget class="Line" name="line_3">           <property name="orientation">            <enum>Qt::Horizontal</enum>           </property>          </widget>         </item>         <item>          <widget class="QGroupBox" name="groupBox">           <property name="sizePolicy">            <sizepolicy hsizetype="Minimum" vsizetype="Minimum">             <horstretch>0</horstretch>             <verstretch>0</verstretch>            </sizepolicy>           </property>           <property name="title">            <string>Apply Rule To</string>           </property>           <layout class="QHBoxLayout" name="horizontalLayout">            <item> -           <widget class="QRadioButton" name="chatRadio"> +           <widget class="QRadioButton" name="roomRadio">              <property name="text"> -             <string>Chats</string> +             <string>Rooms</string>              </property>              <property name="checked">               <bool>true</bool>              </property>             </widget>            </item>            <item> -           <widget class="QRadioButton" name="roomRadio"> +           <widget class="QRadioButton" name="chatRadio">              <property name="text"> -             <string>Rooms</string> +             <string>Chats</string> +            </property> +            <property name="checked"> +             <bool>false</bool>              </property>             </widget>            </item>            <item>             <spacer name="horizontalSpacer">              <property name="orientation">               <enum>Qt::Horizontal</enum>              </property>              <property name="sizeHint" stdset="0">               <size>                <width>246</width>                <height>20</height>               </size>              </property>             </spacer>            </item>           </layout>          </widget>         </item>         <item>          <widget class="QGroupBox" name="groupBox_6">           <property name="sizePolicy">            <sizepolicy hsizetype="Minimum" vsizetype="Minimum">             <horstretch>0</horstretch>             <verstretch>0</verstretch>            </sizepolicy>           </property>           <property name="title">            <string>Rule Conditions</string>           </property>           <layout class="QVBoxLayout" name="verticalLayout">            <item>             <widget class="QRadioButton" name="allMsgRadio">              <property name="text">               <string>Apply to all messages</string>  | 
 Swift