summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-10-21Add delivery-warning SVG icon with a matching styleTobias Markmann
The delviery-warning.svg matches the style of delivery-failure.svg and delivery-success.svg. It is a yellowish circle with a white border and a white exclamation mark in it. Test-Information: Build and checked the new icon is shown when a message receipt is requested but no receipt is received. Tested on macOS 10.12 with Qt 5.7.0 and QtWebKit TP4. Change-Id: Ie715993eabd8f853ea0a6983645d7d89259f61a7
2016-10-19Scale QWebView DPI resolution to match desktop DPI resolutionTobias Markmann
Test-Information: Tested that at 1em scaling, the default, the main text in the chat style has the same height as the nicknames in the roster. Tested with Qt 5.4.2 on macOS 10.12 on a retina system, with Qt 5.4.2 on macOS 10.12 on a non-retina system, and Windows 8 with Qt 5.7.0 with QtWebKit Technology Preview 4. Change-Id: I10701c411d9f787bf497eb6aab208a0f3fda621c
2016-08-24Improve readability of message receipt iconsTobias Markmann
This changes the icons for delivery success and delivery failure to vector graphics in SVG format. Added a slight white circle around the graphics for better readability on backgrounds with low contrast. Test-Information: Tested with Qt 5.4.2 and Qt 5.5.1 on OS X 10.11.6 on retina and non-retina systems. Noticeable better rendering due to SVG over PNG. Noticeable but not attracting attention white circle. Change-Id: I3c9be99854a300a4e40161a74964514aa47d292a
2016-08-23Improve chat view font handlingTobias Markmann
This changes the minimal font scaling to 0.8em, so that the font size in the chat view can be smaller than the font size in the rest of the application. At 1.0em the font in the chat view has the same size as the rest of the application. Also changed fixed pixel sizes in main.css to relative percentage sizes. Test-Information: Verified the font size in the chat view is the same as the font size for the contact lists at 1.0em on Windows and OS X with Qt 5.5.1. Change-Id: Ib625f11cea0aacd31edee27c2dc89df5e2cbd1c4
2016-07-25Changing default avatar to a blue circled swiftTobias Markmann
The old default avatar does not work well with the new chat view design which uses circled avatars. This also uses the vector avatar internally in Swift and has Qt and the chat view engine scale it to the required size. Test-Information: Tested on OS X 10.11.5 with non-compact chat views and MUC conversations. Change-Id: I82580ecb91fc81f4fe9535aa9d3b214b720a40f3
2016-07-19Fix Swift UI sometimes getting stuck during loginTobias Markmann
In some cases during the login the helper QEventLoop in QtWebKitChatView takes over the event handling of the application and never retirms from it. Qt events are still handled in this case but any other new events are only queued up. The user would still have a responsible UI, but all network traffic or other non-Qt events would not be handled correctly. Test-Information: Without the patch Swift would get stuck during login in 5 of 10 runs. With this patch it did not get stuck anymore in 10 runs. Tested on OS X 10.11.5 with Qt 5.5.1. Change-Id: Ie17a8e01cc9c52cc784e223974ec21e604dcccab
2016-04-25Fix detection of vertical scroll bar position in chat viewsTobias Markmann
Chat views are expected to remember the scroll position. If the user scrolled all the way down, the view should keep scrolled all the way down, even if the windows is resized, new messages are added or the user enters a multi line message in the message input box. Qt WebKit only provides reliable scroll position updates in their web environment. This requires to have scroll changes call a JS hook that calls our C++ signal. Test-Information: Tested and verified the following cases for correct behavior: * entering a multi line message keeping the view scrolled down * resizing the window and keeping it scrolled down * receiving messages and the view keeps being scrolled down * verified that view does not scroll down if it is not yet on resize of the window, entering multi line messages, and receiving new messages Change-Id: I579a07d0b073c34e7a46b0fde1bc09f3da08d5da
2016-04-08Fix code in response to compiler warnings by clangTobias Markmann
Test-Information: Builds on OS X 10.11.4 with Apple clang and clang master. Change-Id: I012577e29c6fcf2fb452b4f13912aaeb37250fb5
2016-04-04Modernize code to use C++11 shared_ptr instead of Boost'sTobias Markmann
This change was done by applying the following 'gsed' replacement calls to all source files: 's/\#include <boost\/shared_ptr\.hpp>/\#include <memory>/g' 's/\#include <boost\/enable_shared_from_this\.hpp>/\#include <memory>/g' 's/\#include <boost\/smart_ptr\/make_shared\.hpp>/\#include <memory>/g' 's/\#include <boost\/make_shared\.hpp>/\#include <memory>/g' 's/\#include <boost\/weak_ptr\.hpp>/\#include <memory>/g' 's/boost::make_shared/std::make_shared/g' 's/boost::dynamic_pointer_cast/std::dynamic_pointer_cast/g' 's/boost::shared_ptr/std::shared_ptr/g' 's/boost::weak_ptr/std::weak_ptr/g' 's/boost::enable_shared_from_this/std::enable_shared_from_this/g' The remaining issues have been fixed manually. Test-Information: Code builds on OS X 10.11.4 and unit tests pass. Change-Id: Ia7ae34eab869fb9ad6387a1348426b71ae4acd5f
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-29Refactored keyword highlightingTobias Markmann
This commit changes the ChatWindow/ChatView APIs to not pass highlights actions as additional parameters but instead they are now part of the ChatWindow::ChatMessage and its parts. This allows the controllers to do highlighting in one single place and play sound actions on the highlighted message in a single place. On a highlighted message only unique sounds are played and they are played in sequence of the rules that matched the message. Test-Information: Adjusted the existing unit tests accordingly. Added unit tests that check reduplication of highlight action sounds and that the sound actions are emitted correctly. Manually verified that highlight sound actions with and without duplicated sounds are audible on OS X 10.11.3. Change-Id: I68c88e0d285d79d87b2997ed29d92b140480b394
2016-03-29Replace chat view theme with one based on the new designTobias Markmann
This also removes the old chat theme resources and some code in QtWebKitChatView that was required for compatibility to Adium-style themes. The new code uses a CSS style in the header to change the font size and does not iterate the whole DOM tree itself anymore. Added new resources for failed and successful asks. Test-Information: Tested MUCs, PMs, message correction and file-transfers with the new chat theme. Change-Id: If922a972c658189444e60a7b00e5e5e96661620d
2016-02-15Fix crash when saving a received file to non-writable locationTobias Markmann
WriteBytestream::write(…) now returns a boolean indicating its success state (false in case of an error). Adjusted FileWriteBytestream accordingly. The QtWebKitChatView will test if the file path selected by the user is writable before accepting it and starting the transfer. If it is not writable a red warning message will be added to the file-transfer element in the chat view. Test-Information: Added an integration test that tests the new behavior for the FileWriteBytestream class. Tested two file transfers on OS X 10.11.3, one to a write protected location and another to /tmp. The first is not accepted by the UI, and without the UI sanity check it results in a file-transfer error. The second succeeds as expected. Change-Id: I5aa0c617423073feb371365a23a294c149c88036
2015-12-17Show file-transfer description if providedTobias Markmann
Test-Information: Tested by transferring a file between two Swift instances. Tested in WebKit chat views and in plain chat views. Change-Id: Ie46cbd7bac8a36478f64b4557cf55926e6d4af37
2015-10-30Only highlight text if a highlight color is setTobias Markmann
This commit has the default rule set the default color and changes HighlightAction::highlightText_ symbol to HighlightAction::highlightWholeMessage_ as it is more descriptive of its use. Test-Information: Tested highlighting with the default rule set, and one with a highlight color set for the chat rule. Change-Id: Ic638e6347bdf6623ab5959341486233494f005f0
2015-10-07Fix wording so text is independent of sender/receiver caseTobias Markmann
Test-Information: None. Change-Id: I4e0cd54c9009bc19fdc10cd1ec2697252bd6f7f7
2015-08-11Remove extra space in file transfer file size textTobias Markmann
Test-Information: Verified the change is visible in the UI. Change-Id: I31ebb28b3930c45e791ffea2ba8eb08364fcbd9b
2015-07-10Stay scrolled at bottom of chat view during a file transferTobias Markmann
Swift did not remember the correct scrolled-at-bottom position for the current chat view after it added/updated file-transfer UI to the chat view. Test-Information: Tested with two Swift instances (one with the fix, one without) and send files in both directions. The instance with this fix, scrolls down along with new messages as they are recevied if the chat view is scrolled to the bottom. Change-Id: Ia9afa68254c3add5f7677b1f4b7ed3c7e1edcf6f
2015-07-10Show correct times for file-transfer requests and MUC invitationsTobias Markmann
The code passed local time to the B2QDATE macro. The B2QDATE macro however requires its input to be in UTC. Test-Information: Tested a file-transfer and MUC invite between two Swift instances. Change-Id: I3a44f35d804b4029a6ff80548a6cb8a1d3edc27e
2015-07-10Show collecting of file transfer candidates in UITobias Markmann
Show the user the collection of possible file transfer candidates after pressing the 'Start' button for a file transfer. Previously the buttons remained in the UI giving no feedback to the user at all. If no UPnP/NAT-PMP device is present, it this stage can take a couple seconds to timeout and move on to the next stage. Furthermore this commit adds documentation for the different states in the ChatWindow::FileTransferState enum. Test-Information: Tested this in a network environment with no UPnP/NAT-PMP device between two Swift instances. Change-Id: I76ec6e641a2acd683938fe2d8f542d023a244145
2015-07-10Add 'Open file' button for successfully transferred filesTobias Markmann
The button is shown after the 'Transfer completed successful.' message and asks the desktop environment to open the file with the default program. Test-Information: Send a file to another Swift on OS X 10.9.5 and verified that it opens the file on button click. Change-Id: I602e534ef07a119247cbf979e13551be7771880c
2015-02-03Fix chat log system messages related to entering a roomTobias Markmann
In the past MUCController added a "trying to enter..." message and later tried to replace this with "entered room as..." message. However, any message received in between, like a system message about room topic, came in between since MUCController replaced the *last* message added to the log. The new code also adds message IDs to system messages. This way the correct message can be replaced on successful login, no matter how many messages came in between. Test-Information: Tested against a MUC component that send a system message before sending the join presence back to a user. Change-Id: I3bcb5d78de680494965d837b2ad3edb847ff7f99
2014-12-15Update Copyright in SwiftKevin Smith
Change-Id: Idb6ef5fa191b1465c0bf46c47e63b695de07fa0b
2014-07-29Prevent nick highlight rule highlighting the entire message and remove ↵Richard Maudsley
default highlight colours Test-Information: Add a nick highlight rule. Verify that it is triggered correctly in MUCs and that only the nick text is highlighted. Added unit tests. Change-Id: I9af1c900f4767383745afd36a5eadbe08f606432
2014-07-09Reworked highlight rules dialog. Added support for highlighting individual ↵Richard Maudsley
words in messages. Change-Id: I378fa69077c29008db4ef7c2265e5212924bc2ce
2014-05-30Show most recent time when squashing presence, not the earliestRichard Maudsley
Change-Id: I661b80d589386cf69d720f2786723afb2ab2f2ed
2014-02-22Handle error responses to XEP-0184 receipt requests.Tobias Markmann
Change-Id: I23d77168c1c387342164d857a3eb5577bff65fb9 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2014-01-15Improved plaintext chat view for screen-reader support.Richard Maudsley
Change-Id: Ib7c10350b56683db95f4c6be49f79f8a9d9e80ec
2013-11-08Improve some access for screen readers.Kevin Smith
Includes the start of a very ugly plain text chat log Change-Id: I26b6d8f752164e4f8a12fe66aedc93af67345cca
2013-10-03Factor the webkit chat view out of QtChatWindow.Kevin Smith
This will let us substitute it for an alternative chat view. Change-Id: I002d9b90a7f618a354dda648c280ccee0e48edd7