summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-02-27Redesign highlight logic and processingTobias Markmann
The new highlight logic follows a simpler model. It supports: * highlighting of whole words in a message * highlighting messages by sender name * highlighting if the user’s name is mentioned Possible actions for these highlights are text colouring, sound playback of WAV files, and system notifications. In addition the user can decide to receive sound and system notification on general incoming direct and group messages. Redesigned the highlight configuration UI dialog for this new model. ChatMessageParser class now deals with all parsing and marking up the chat message with the matching HighlightActions. Highlighter class has been extended to deal with all sound and system notification highlights that should be emitted by a specified chat message. Moved some tests over to gtest in the process. Test-Information: Tested UI on macOS 10.12.3 with Qt 5.7.1. Manually tested that correct system notification are emitted on mentions, keyword highlights and general messages. Added new unit tests to cover new highlighting behaviour. Change-Id: I1c89e29d81022174187fb44af0d384036ec51594
2016-09-29Fix uninitialised class membersTobias Markmann
Initialised previously uninitialised class members. Changed some raw pointers to std::unique_ptr for clearer and automatically initialised code. Test-Information: Builds on macOS 10.12 and unit tests pass in ASAN-enabled build. Change-Id: I7900fe6131119c228ca92c79c0ee8125137f2e48
2016-04-26Make remaining UI strings in QtHighlightEditor translatableTobias Markmann
Test-Information: Builds on OS X 10.11.4 with Qt 5.4.2 and the short description still shows the strings in the UI. Checked that update_translations=1 shows the newly translatable strings. Change-Id: I7acc1058fbb07a5f1ed630c5cc95493f2bc79770
2016-04-01Modernize code to use C++11 nullptr using clang-tidyTobias Markmann
Run 'clang-tidy -fix -checks=modernize-use-nullptr' on all source code files on OS X. This does not modernize platform specific code on Linux and Windows Test-Information: Code builds and unit tests pass on OS X 10.11.4. Change-Id: Ic43ffeb1b76c1a933a55af03db3c54977f5f60dd
2016-03-31Convert tabs to 4 spaces for all source filesTobias Markmann
Removed trailing spaces and whitespace on empty lines in the process. Changed CheckTabs.py tool to disallow hard tabs in source files. Test-Information: Manually checked 30 random files that the conversion worked as expected. Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
2016-03-30Apply consistent #include grouping and sorting styleTobias Markmann
Changed "" style includes to <> style. Test-Information: Build with Clang 3.9.0 and ran all tests on OS X 10.11.4. Change-Id: Ic05e53f2e5dba39cc1307b116fc5f17b62ab9eb8
2015-09-22Keep scroll position in highlight rule editor when moving rulesTobias Markmann
When moving a rule up or down in the highlight rule editor on Linux, the scroll area scrolled all the way down after each move. This problem is not reproducible on OS X. With this commit the dialog remembers the scroll area position before moving a rule and sets the scroll position back to the remembered value after the move of the highlight rule. Test-Information: Verified that the scroll position is not changed when moving highlight rules up or down on Debian 8.2 and OS X 10.9.5. Change-Id: Ide7c99e1311671c77cbf72da5cad4f64bfaab11f
2015-02-05Add "Reset defaults" button to highlight editor window.Tobias Markmann
The button is only shown if the current rules are *not* the default set of rules. Test-Information: Tested on Mac OS X 10.9.5. Change-Id: Ibf1856af04c6bdacf6102d240e6fe5f6071cb46a
2014-12-15Update Copyright in SwiftKevin Smith
Change-Id: Idb6ef5fa191b1465c0bf46c47e63b695de07fa0b
2014-10-03Suggest MUC occupants when typing in highlight editor JID boxRichard Maudsley
Test-Information: Join several MUCs and confirm that MUC occupants are suggested along with recent contacts. Confirm that clicking or pressing return adds the selected contact to the edit field. Check that QtSuggestingJIDInput in Start Chat dialog still functions as before, and that MUC users are not suggested here. Change-Id: Ieadc95d55c764e1fa48c949cca4d5e0aa5f19615
2014-07-29Add ability to reorder highlight rules list.Richard Maudsley
Test-Information: Add several highlight rules. Verify that the up and down buttons reorder the items in the list. Change-Id: I6272799e2b2767ddfa01068c2ffcd1fb4651e11d
2014-07-09Reworked highlight rules dialog. Added support for highlighting individual ↵Richard Maudsley
words in messages. Change-Id: I378fa69077c29008db4ef7c2265e5212924bc2ce