diff options
| author | Tobias Markmann <tm@ayena.de> | 2015-09-09 15:20:19 (GMT) |
|---|---|---|
| committer | Kevin Smith <kevin.smith@isode.com> | 2015-09-18 09:09:43 (GMT) |
| commit | 64aa58d97676be61a5bb23b1b3d351b032b9b5a0 (patch) | |
| tree | 896b91773ce60e634ce5bde2b5ec5342899fe8cc | |
| parent | 5bc29fe3fa187187abc2cda4c35fa1a7744c78cb (diff) | |
| download | swift-64aa58d97676be61a5bb23b1b3d351b032b9b5a0.zip swift-64aa58d97676be61a5bb23b1b3d351b032b9b5a0.tar.bz2 | |
Save 'apply to all' property in highlight rule editor
The highlight editor did not save if the user set the 'apply to
all' property on a rule. It allows to highlight complete messages
or be notified only based on the incoming message type.
This commit enables saving the property.
Test-Information:
Tested chat and room rules with the 'apply to all' property set
and verified that the complete messages are highlighted.
Change-Id: Ib06bd3111ae810c8362ab8fd36a2d3b67f5a14cc
| -rw-r--r-- | Swift/QtUI/QtHighlightEditor.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Swift/QtUI/QtHighlightEditor.cpp b/Swift/QtUI/QtHighlightEditor.cpp index c6e4319..7aea26b 100644 --- a/Swift/QtUI/QtHighlightEditor.cpp +++ b/Swift/QtUI/QtHighlightEditor.cpp | |||
| @@ -8,22 +8,24 @@ | |||
| 8 | * Copyright (c) 2014-2015 Isode Limited. | 8 | * Copyright (c) 2014-2015 Isode Limited. |
| 9 | * All rights reserved. | 9 | * All rights reserved. |
| 10 | * See the COPYING file for more information. | 10 | * See the COPYING file for more information. |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #include <Swift/QtUI/QtHighlightEditor.h> | ||
| 14 | |||
| 13 | #include <cassert> | 15 | #include <cassert> |
| 14 | 16 | ||
| 15 | #include <boost/lexical_cast.hpp> | 17 | #include <boost/lexical_cast.hpp> |
| 16 | 18 | ||
| 17 | #include <Swift/QtUI/UserSearch/QtSuggestingJIDInput.h> | 19 | #include <QFileDialog> |
| 20 | #include <QTreeWidgetItem> | ||
| 21 | |||
| 18 | #include <Swift/Controllers/HighlightManager.cpp> | 22 | #include <Swift/Controllers/HighlightManager.cpp> |
| 19 | #include <Swift/QtUI/QtHighlightEditor.h> | ||
| 20 | #include <Swift/QtUI/QtSwiftUtil.h> | ||
| 21 | #include <Swift/QtUI/QtSettingsProvider.h> | ||
| 22 | 23 | ||
| 23 | #include <QTreeWidgetItem> | 24 | #include <Swift/QtUI/QtSettingsProvider.h> |
| 24 | #include <QFileDialog> | 25 | #include <Swift/QtUI/QtSwiftUtil.h> |
| 26 | #include <Swift/QtUI/UserSearch/QtSuggestingJIDInput.h> | ||
| 25 | 27 | ||
| 26 | namespace Swift { | 28 | namespace Swift { |
| 27 | 29 | ||
| 28 | QtHighlightEditor::QtHighlightEditor(QtSettingsProvider* settings, QWidget* parent) | 30 | QtHighlightEditor::QtHighlightEditor(QtSettingsProvider* settings, QWidget* parent) |
| 29 | : QWidget(parent), settings_(settings), previousRow_(-1) | 31 | : QWidget(parent), settings_(settings), previousRow_(-1) |
| @@ -417,10 +419,14 @@ HighlightRule QtHighlightEditor::ruleFromDialog() | |||
| 417 | } else { | 419 | } else { |
| 418 | rule.setMatchChat(false); | 420 | rule.setMatchChat(false); |
| 419 | rule.setMatchMUC(true); | 421 | rule.setMatchMUC(true); |
| 420 | } | 422 | } |
| 421 | 423 | ||
| 424 | if (ui_.allMsgRadio->isChecked()) { | ||
| 425 | action.setHighlightAllText(true); | ||
| 426 | } | ||
| 427 | |||
| 422 | if (ui_.senderRadio->isChecked()) { | 428 | if (ui_.senderRadio->isChecked()) { |
| 423 | QString senderName = jid_->text(); | 429 | QString senderName = jid_->text(); |
| 424 | if (!senderName.isEmpty()) { | 430 | if (!senderName.isEmpty()) { |
| 425 | std::vector<std::string> senders; | 431 | std::vector<std::string> senders; |
| 426 | senders.push_back(Q2PSTRING(senderName)); | 432 | senders.push_back(Q2PSTRING(senderName)); |
Swift