summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-04-20Add missing include for QFileDeviceTobias Markmann
Test-Information: Builds on macOS 10.12.4 with Qt 5.4.2. Change-Id: Id9715062e25c1d541020408a517e0974ce92c886
2017-04-18Don't pass the impromptu MUC 'reason' as the room JIDThanos Doukoudakis
Changing the constructor of the CreateImpromptuMUCUIEvent class not to accept default values to its parameters. This approach is less prone to mistakes, like forgetting an argument. This commit fixes SWIFT-271 bug, where only two arguments were being passed in the constructor. As a result the reason string was used to create a room JID, making the room unusable. By passing an empty string, the room JID created is not valid, and when ChatsManager handles the event, it will generate a new valid room JID. Test information: Unit test pass. Tested the creation of new impromptu chat with with windows 10 (qt5.7). Change-Id: I4ce9ee7db14b9125970a03f19d1ac0c32e1b5a0e
2017-04-12Assert first page in QtUserSearchWindow wizard based on typeTobias Markmann
Converted enum to C++11 enum class in process. Coverity raised this issue. Test-Information: All unit tests pass. Using the “Add Contact…” and “Start Chat…” dialogs did not crash. Tested on macOS 10.12.4 with Qt 5.4.2. Change-Id: I0409688b001d1eaaf5fa77a25b1158ce9e611c77
2017-04-10Only add existing environment variables to QtUI test envTobias Markmann
Furthermore extended the list of potential environment variables based on what the qt4.py tool creates. Fix for commit ed2226782ac15345aeb8e615b41d30e5aab67b51. Test-Information: Tested on Windows 8 with VS2013 with Qt 5.4.2 and on macOS 10.12.4 with Qt 5.5.1. Change-Id: Ib52084ca0e1505fe943c33fa74f479e360d834fe
2017-04-10Make the default chat view font to render thicker on WindowsThanos Doukoudakis
Added a font-weight property on the body style to enhance the default font weight (400) only on Windows, in order to improve the look of the chat view. If the font-weight is being defined in any other styles rules with higher priority, this default value will be overwritten. Test-Information: Tested with with windows 10 (qt5.4.2), Windows 10 (qt5.7), Ubuntu 16.04.2 (qt5.5) Change-Id: Iafd969cff487a907d136b9d2d8b393a90681216f
2017-04-07Do not grey out chat view after clearingJoanna Hulboj
Test-Information: Run Swift, open chat window, enter a message and send it. Right click on chat view and choose Clear. Chat log in a view will be cleared but it will stay white. On the top of the chat view will be a message: e.g. Starting chat with test - test@test.isode.net: Offline. Change-Id: Ie453602e2f2b14e3ecca699821521ad33937ccf6
2017-04-07Make day change chat system message DST awareTobias Markmann
Moved the code for day change message handling from Swift/Controllers to Swift/QtUI. Use QDateTime in local time time spec, which allows DST aware calculation of the duration to the next midnight. Added Swift Qt UI unit tests, which are build when Qt has been successfully detected. Test-Information: Added unit tests for duration to next midnight calculation. Set clock shortly before midnight and verified that a single day change message is added to the chat log at midnight. Tested on macOS 10.12.4 with Qt 5.4.2. Change-Id: I34d69eaa3272981fd220a7963a0417f73ff78e68
2017-04-04Change ‘User’ to ‘Nickname’ in highlight dialogTobias Markmann
Test-Information: Build on macOS 10.12.4 and verified the change in the UI. Change-Id: I8ec472158682e951fe358197c0939f451ade8c54
2017-04-04Open 1:1 chat to real JIDs from MUC rooms (not PMs) when possibleThanos Doukoudakis
Opens the chat with the user JID instead of the MUC JID. Does not affect existing behaviour on normal one2one chats. Test-Information: Builds on Windows and unit test pass. Tested the behaviour on single chats from contacts list (roster), start new chat with one and multiple users. Also tested on MUC rooms that are non-anonymous, semi-anonymous and anonymous. Change-Id: I2b8fbacb1fa640167ec196d4215a13ad4905d45c
2017-04-04Remove superfluous duplicated variable in QtDNDTabBar codeTobias Markmann
Coverity raised this issue. Test-Information: Swift and unit tests still build on macOS 10.12.4. Drag and drop of tabs still work. Change-Id: I64bdb973da73a4f2b5ed514583c4f8740adc77b4
2017-04-04Test against dialog type instead of nullptr in QtUserSearchWindowTobias Markmann
If the dialog is not of type AddContact, firstMultiJIDPage_ is initialised and this states more clearly that the reset is only done when the dialog is in this mode. Coverity raised this issue. Test-Information: Added a user from search and started a chat from user search. All unit tests pass on macOS 10.12.4. Change-Id: I55f6df5b4f48e2c6718922846a424bf17f363b16
2017-03-31Handle potential boost::bad_any_cast exceptionTobias Markmann
Coverity raised this issue. Test-Information: Builds and unit tests pass on macOS 10.12.4. Switching different application languages via --language parameter still works and passing numbers as languages has it correctly fallback to the default system language. Change-Id: Ide1ffdba7a13c27856304aa96b78067147568a95
2017-03-30Fix access to potential unavailable page in QtUserSearchWindowTobias Markmann
Adding searched JIDs to the list of JIDs only makes sense for cases where there is a multi JID page in the first place. Coverity raised this issue. Test-Information: All unit tests pass on macOS 10.12.4 and the “Add Contact” and “Start Chat” dialogs using a user search still work. Change-Id: Icde63f13a2f83690b3189a9c91237eadd6b5218b
2017-03-29Initialise timerId member in QtGridSelectionDialogTobias Markmann
Coverity raised this issue. Test-Information: All unit tests passed on macOS 10.12.4. Change-Id: Id65cdc5e0175ba7773d32b6dddbc9b4af6789019
2017-03-15Add link to https://swift.im/ to about dialogTobias Markmann
In addition, fix display of Swift icon in about dialog. Test-Information: Build on macOS 10.12.3 with Qt 5.4.2 and verified that the icon is display in the about dialog and clicking the link opens the Swift website in the default browser. Change-Id: If13e03bfa976354aeba1de9be4bcb1edabaa5403
2017-03-14Show correct avatars for file-transfer messagesTobias Markmann
Previously we simply showed our default avatar. With this change we will use the same avatar as we use for normal chat messages. Test-Information: Tested on macOS 10.12.3 with Qt 5.5.1 by exchanging files between two Swift instances. Change-Id: I20b953a67a290820900b5b35861c1e17f72148bd
2017-03-14Fix incorrect default chat view font sizeTobias Markmann
A chat font size value of 2 represents the native default font size on the system, which should be the default font size for the chat view on first install. We allow this to be reduced to 0 and increased without a limit. Furthermore the settings key was changed so that Swift 3 users will automatically use the default size when they first open a newer Swift. Test-Information: Tested on Ubuntu 16.04.02 after clearing the local Swift config. Change-Id: I3426001eb302e22134c40bc4a479f15684ca2001
2017-03-14Fix default avatar rendering on WindowsTobias Markmann
Swift installed from our Windows installer packages would not display the default avatar, due to missing Qt5Svg module. Test-Information: Build Windows installer package on Windows 8, with VS 2013 and Qt 5.4.2. Qt5Svg.dll is installed and default avatars are displayed in the roster. Change-Id: Iaa0fb0b013fc32d9d84897e83902ae7487fe72d7
2017-03-07Use text-based emoticons on Linux and WindowsTobias Markmann
The new unicode-based emoji dialog currently only provides a good experience on macOS. This commit enables the unicode-based emoji dialog on macOS and uses the text-based emoticons on Linux and Windows. Test-Information: Tested on macOS 10.12.3 with Qt 5.5.1 and Windows 8 with Qt 5.5.1. Change-Id: Ibee20eacafa5788bcdf5a46e1ceac713a28a0383
2017-03-07Do not color highlight mentions of the own nickname by defaultTobias Markmann
In the default highlight configuration, mentions of the own nickname should only cause a notification sound and a system notification. Test-Information: Tested mention notifications in a test MUC room and verified that only sound and system notifications are issued in the default highlight configurations. Tested on macOS 10.12.3 with Qt 5.5.1. Change-Id: I44a276ab740d7495930c935a89a2ef81219e24df
2017-03-06Fix emoji dialog crash when there are no recent emojisTobias Markmann
The dialog would crash if the user has not selected an emoji ever before through the dialog. Test-Information: Cleared recent list and opened the dialog. Without this patch it would crash, since there are no items in the emojiLayout. Now it does not crash anymore, on macOS 10.12.3 with Qt 5.5.1. Change-Id: Ie736b5af7fe8b2b2c14fcac94b7e4f3bc13f4b84
2017-03-03Allow pasting a newline separated list of JIDs in blocking dialogTobias Markmann
Furthermore the dialog will alphabetically sort the list of blocked JIDs before showing it in the dialog. Test-Information: Tested on macOS 10.12.3 with Qt 5.7.1 that it sorts the list it receives from the server before presenting it in the UI. Successfully pasted a newline spereated list of JIDs in the dialog. Change-Id: I8fe6969821bccad0193180cee9433da43285aaef
2017-03-03Change Enter Room... QWidget to QDialogJoanna Hulboj
Test-Information: Tested under Linux i3 tiling windows manager. Run Swift, from the menu choose Actions, Enter Room... Enter Room... dialog is displayed as a floating window in a tiling manager. Change-Id: I31dc4f8caa04fe137e89f2bcb12852cd0b709bab
2017-03-01Remove support for selecting custom notification soundsTobias Markmann
Test-Information: Tested on macOS 10.12.3 with Qt 5.7.1 that the custom sound menu item was gone. Change-Id: I75186d1a3b74db751fbdd5aaf54402f23f74661b
2017-02-28Do not reset font size when clearing chat viewJoanna Hulboj
Test-Information: From Swift open any chat window, type something, right click on chat view and increase font size 3 times, then right click on chat view and choose Clear. Chat log in a view will be cleared, again type something the form size stays the same as before clearing the log view. Change-Id: I8c057dbd4ed52e5d1efce7064d79b9f7244b3d32
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
2017-02-24Add Sparkle license to about dialog COPYING file on demandTobias Markmann
If scons detects a Sparkle release in the 3rdParty folder, it will add the containing LICENSE file at the end of the dynamically generated COPYING file. Test-Information: Tested that the contents of Sparkle’s LICENSE file are at the end of the text in the license window of the about dialog, if the Sparkle folder, with a Sparkle release inside, is present in 3rdParty. Tested that Swift builds fine, if the Sparkle folder is missing in 3rdParty. Change-Id: I89db155b5bb3eef4d632997fd99ff270b4720a16
2017-02-24Fix sorting of emoji categories in the emoji dialogTobias Markmann
This also changes the minimal height of the emoji dialog to hold about 8 emoji rows. Test-Information: Tested on macOS 10.12.3 with Qt 5.7.1 that the categories are sorted in a more sensible manner and that the dialog at least shows about 8 emoji rows. Change-Id: I8c5518f8d552a581d5073b5f155425580f72938a
2017-02-24Use FlowLayout instead of QGridLayout in QtEmojiGridTobias Markmann
FlowLayout is an official BSD-licensed Qt example showing how to implement custom layouts. It will layout items dynamically in rows. This way we don’t need static column/row calculations for QGridLayout and it looks better. Test-Information: Build and ran on macOS 10.12.3 with Qt 5.7 to test that it has a better, less spacious look. Change-Id: Ief1299b0d3fb1e516a1973469f4f9a26824942f2
2017-02-23Fix crash in Swift about dialog if build w/o auto update supportTobias Markmann
Test-Information: Previously Swift crashed on QtAboutWidget.cpp:175 when build without any auto update support. Now it does not anymore. Tested on macOS 10.12.3 with Qt 5.5.1. Change-Id: Ia58ec3679d107cfd6b736e54e90a4167cf1adc47
2017-02-22Improve Swift about window regarding auto update UXTobias Markmann
The dialog will automatically initiate a check for updates when opened. It will show the current state of the auto updater backend, e.g. whether it is downloading or already at the latest version. This also fixes update channel selection being shown on Windows and Linux. Test-Information: Ran Swift and opening the dialog shows a short progress bar indicating it checking for updates. Afterwards it shows that it is already running the latest version, which is sensible for a dev build. Change-Id: Ie08cd2a8852e468d6007122604b532fedc24bcfe
2017-02-20Add alternative zoom shortcuts on macOS and workaround Qt bugTobias Markmann
This adds the Ctrl + Minus and Ctrl + Equal shortcuts for zoom out and zoom in respectively. In addition, this commit provides a workaround for QTBUG-56571. Test-Information: Tested on macOS 10.12.3 with Qt 5.7.1. Tested with German and UK keyboard layout. On UK layout both shortcuts, Ctrl + (+/-) and Ctrl + (=/-) work. On German layout only Ctrl + (+/-) works. Change-Id: Ifbcab308c9a8f4c88b51978969c73c3c1138a9ba
2017-02-20New Unicode Emojis DialogThibault Meunier
The new selector behaves like the old one. However, selection of an emoji results in the corresponding UTF-8 sequence to be inserted into the input widget instead of a ASCII emoticon. The code is based on the Emojione library which is MIT licensed. Emojione provides a mapping from shortnames to relevant Unicode codepoint, as well as mappings from textual emoticons (e.g. ). This commit does not modify the existing emoticon parser and so does not include any ability to enter emojis via text entry. The part of the Emojione library required to generate the mappings in C++ is included in this patch, specifically the emoji.json file. It is used to generate a corresponding .cpp file. Mapping code can be generated as follows: * cd BuildTools/EmojisGenerator/ * (optional) update emoji.json from https://github.com/Ranks/emojione/blob/master/emoji.json) - Version used with this commit: ba845a7 * npm install * node generate.js Test-information: General * Click the emoji button opens the selector * Change tab * Click an emoji and check it appears correctly * Click outside emoji dialog hides it Emojis * Emojis are well printed on macOS with Qt 5.7.1 * Emojis are black/white on Windows 10 with Qt 5.7.1 * Emojis have the right tooltip (when mouse is hover) * Check emojis are rendered appropriately by the receiving client Tabs * Tabs have the right tooltip * Click an emoji adds to recent tab * Emojis in the Recent tab are ordered by last click date (with a maximum of 50 "recent" emojis) * Recent emojis are saved in the QtSetting under "recentEmojis" Change-Id: Ibd07b8713d6272da6a8a4c9c35ddf866473f662b
2017-02-10Display error message in profile window if vCard request failedTobias Markmann
Also fixed an typo error in GConfProxyProvider.cpp that prevented compilation on Linux. Test-Information: Tested with an XMPP server with vCard support disabled and also with vCard support enabled. Tested profile window and profile editor window. The profile window will show cached vCard data if present and the error message. The profile editor window will only show the error message in case of an error. Tested profile window and profile editor window in a scenario where vCard support is first enabled in the server, then disabled, and finally enabled again, and opening the editors in between. Potential error messages were always correctly cleared before showing the dialog. Tested on macOS 10.12.3 with Qt 5.7.1. Change-Id: I3958c35286f6f0096d1605c29816f666530aae03
2017-02-09Fix mouse movement when resizing trellis layout.Joanna Hulboj
Test-Information: From view menu choose "Change Layout", move mouse to resize trellis. Trellis resizing works fine. Change-Id: I112c0bd84dc57abb3bb95f825f74b2efa1f8e183
2017-01-18Set cursor position to the center of the screen to show layout window in the ↵Joanna Hulboj
middle of the screen Test-Information: Tested with multiple screen setup. Tested only on Windows. From view menu choose "Change Layout", the layout window appears in the middle of the screen. Change-Id: Iab4ba64d54766426be39926773aa5b5bb628b9e9
2017-01-16Prevent cursor from jumping to the wrong position when using Change Layout ↵Joanna Hulboj
dialog Test-Information: Tested only on Windows with two monitors. Tested by opening Swift App on the first screen, next choose View->Change Layout, mouse cursor appears correctly on Change Layout dialog, next move Swift App to the second screen choose View->Change layout, mouse cursor appears correctly on Change Layout dialog. Change-Id: Ibb3e2ca1de6bcdb620104ff6b0940005ab85a827
2017-01-11Allow cancelling trellis resize window with escape keyJoanna Hulboj
Test-Information: From view menu chose "Change Layout". Cancelled the trellis resizer using Escape. Change-Id: I82e196f813cf34db9b50d812ce0597975432869f
2016-12-15Merge branch 'swift-3.x’Tobias Markmann
* swift-3.x: - Fix building Swift on 32-bit Linux distributions - Remove optional_fwd.hpp use; workaround for Boost Bug #12179 - Split COPYING.thirdparty in contributions/dependencies - Fixes for building packages on Debian Conflicts: BuildTools/SCons/SConstruct Sluift/Console.h Sluift/ITunesInterface.h Sluift/Terminal.h Swift/Packaging/Debian/debian/control.in Swift/QtUI/SConscript Swiften/Elements/Stanza.h Swiften/FileTransfer/FileTransferTransporter.h Swiften/FileTransfer/IBBReceiveSession.h Swiften/JID/JID.h Swiften/Network/BoostConnectionServer.h Swiften/Network/ConnectionServer.h Swiften/Parser/AttributeMap.h Test-Information: Builds on macOS 10.12.1 with clang trunk. Change-Id: I9f41ab199f227bc106721627ea994313c68e5cfe
2016-12-09Fix overly bright rendering of status text in contact listTobias Markmann
Instead of adjusting the color lightness for the second line, the new code just draws the second line with 70% opacity. This provides a more consistent and predictable effect. Test-Information: Checked rendering of available, away, and busy contact rendering on macOS 10.12.1 and Windows 10. Change-Id: I417b80bdf8ea01db7a6e0e680b488d6a52c297dd
2016-12-09Do not emit windowClosing signal in QtTabbable dtorTobias Markmann
Instead, handle the QCloseEvent and emit the windowClosing signal there. This is an attempt to fix a crash I am unable to reproduce but which crash stack includes the signal emit in ~QtTabbable. Test-Information: Builds on macOS 10.12.1 with clang master. All unit and integration tests pass. Manual login and close of Swift worked without a crash. Change-Id: I470f3c5362fd0f502c542560854424e87fc0727e
2016-12-09Improve documentation of code related to impromptu chatsTobias Markmann
Test-Information: Builds and all tests pass on macOS 10.12.1. Change-Id: I58ca7ba27736d27426350f636dfe910f4f2f1b17
2016-12-09Fix issue with invites to MUC if a MUC PM for that room is openTobias Markmann
Previously if you wanted to invite people to a MUC and had a PM window for a MUC occupant open at the same time, the InviteToMUCUIEvent would be handled by the PM window, by the ChatController of the PM window and not the MUCController of the MUC window. Test-Information: Verified that some scenarios work correctly: - Tested a drop to a MUC window while a MUC PM window is open to an occupant in the MUC. Previously this crashed due to ChatsManager::localMUCServiceJID_ being empty. - Test that impromptu MUC creation to a normal chat works. - Test that impromptu MUC creation to a MUC PM chat works. All unit and integration tests pass on macOS 10.12.1. Change-Id: Ib20de7e925e3503308211936ee47d4ba829d0394
2016-11-23Migrate remaining Swiften/Base/foreach.h use to range-based for loopTobias Markmann
Test-Information: Build on macOS 10.12.1 and all tests pass. Change-Id: Iedaa3fa7e7672c77909fd0568bf30e9393cb87e0
2016-11-17Fix typo in update feed selection dialogTobias Markmann
Test-Information: None. Change-Id: I6a734918b48e512726344d5812642473067e40a9
2016-11-11Add update channel configuration dialog to the about windowTobias Markmann
If software updates are enabled the about dialog will show the currently configured update channel and provides a link to a dialog to change the update channel. Test-Information: Builds on macOS 10.12.1, unit tests pass, and dialogs behave as expected. Did not test Sparkle updating. Change-Id: I05d5014f0d719ba9b2146c1e599db4f7fde80558
2016-11-10Move Qt specific setting constants to QtUISettingConstants.hTobias Markmann
Test-Information: Builds on macOS 10.12.1, ./scons test=all passes, Swift successfully logins and remembered Trellis configuration. Change-Id: Id94d6af1448d44d7d46ba2b8606f3e5ebe98be7a
2016-11-07Improve roster item readability for selected itemsTobias Markmann
Due to the style independent fixed text color for the status message of non-compact roster item, it was barely readable on Windows 7. This commit has the color for the status message in non-compact roster items depend on the used text color for the name. It uses a brightness adjusted highlight text color for the second line. Test-Information: Tested on OS X 10.11.6 with Qt 5.5.1 and Windows 8 with Qt 5.5.1. Change-Id: I41beb0f3eaede3f9413a39662c213a4e904bdd69
2016-11-04Provide explanation for empty trellis cells to userTobias Markmann
This shows a short descriptive text in empty trellis cells, that describes the current state to the user and suggests actions on how to get rid of the empty trellis cell, e.g. by changing the layout or moving chats to the empty cells. Test-Information: Tested with Qt 5.5.1 on macOS 10.12. Change-Id: Ibc7d3a327cf32b8a21304b37e79534773b5d3761
2016-11-01Explicitly synchronize chat view font sizes on font size changeTobias Markmann
Test-Information: Unit tests pass with Qt 5.7.0. Chat view sizes are synchronised on change. ASAN does not complain when opening/closing lots of chat windows and then closing Swift. Change-Id: Ib00260d2331f48f0ca3c47a2340311dcff85c5ed