diff options
| author | Richard Maudsley <richard.maudsley@isode.com> | 2014-07-28 10:13:04 (GMT) |
|---|---|---|
| committer | Swift Review <review@swift.im> | 2014-07-28 12:20:35 (GMT) |
| commit | 9403679b404852edfc0509026da7d5c131d21c38 (patch) | |
| tree | 509d3427bb4fbc73de3de16e67c95df44c38c778 /Swift/QtUI/QtHighlightEditor.cpp | |
| parent | cc379dcf8aeba3c7f259b7e40c9ea2d7a137aa7a (diff) | |
| download | swift-contrib-9403679b404852edfc0509026da7d5c131d21c38.zip swift-contrib-9403679b404852edfc0509026da7d5c131d21c38.tar.bz2 | |
Change highlight rule default to MUC for new rules.
Test-Information:
View highlight editor dialog and confirm that Rooms is now the default option.
Change-Id: I4881efeb26c19fc0779dc99c3a4516f54ec3e211
Diffstat (limited to 'Swift/QtUI/QtHighlightEditor.cpp')
| -rw-r--r-- | Swift/QtUI/QtHighlightEditor.cpp | 2 |
1 files changed, 1 insertions, 1 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()); |
Swift