summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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-09-27Add setting to disable automatic software updatesTobias Markmann
The automatic software update feature is enabled by default. Test-Information: Created system-settings.xml disabling the automatic software update feature and verified no Sparkle log output is produced, showing Sparkle is not initialised and run. Tested on macOS 10.12 with Qt 5.5.1. Change-Id: Ief1f4030505a2a3961ac18cd4774863584489727
2016-09-26Use const std::unique_ptr for pimpl idiom usageTobias Markmann
All our pimpl idiom usage used std::shared_ptr due to being written in C++03. Now we use C++11 and const std::unique_ptr is more sensible. Test-Information: Builds on macOS 10.12 and unit tests pass. Change-Id: I1b9b3fbb22e337d53ae71e5a5e03118998cc3376
2016-09-26Update and tidy up Sparkle software update supportTobias Markmann
Sparkle is configured to do silent automatic background updates based on the provide appcast feed. When a new update was downloaded and is ready to be installed Swift notifies the user that they can restart to take advantage of the newly available version. Test-Information: Setup a custom appcast feed with a newer Swift dev release. Tested updating with Sparkle 1.14.0 binary release using DSA keys and signatures. Did not test Sparkle update with code signed Swift builds. Tested on macOS 10.12. Change-Id: Idad461ec53963c80990e51a502cb6e28bc7b6b4e
2016-09-08Improve visibility of currently focused chat input in trellis modeTobias Markmann
The default focus indicator on the text input fields in chat windows becomes harder to notice in trellis mode as there are many similar looking chat windows visible at the same time. This change increases the visibility of the focus indication border on Windows and will enable the standard blue focus halo on OS X for focused chat inputs in trellis mode. Test-Information: Tested with Qt 5.5.1 on OS X 10.11.6 and Qt 5.5.1 on Windows 8. Change-Id: If9fe9edea6fef292bb99eabbb125c7a9ec20dcc2
2016-09-07Add ability to filter results in "Search Room" dialogTobias Markmann
This is implemented with the help of an implementation of QSortFilterProxyModel which filters room names based on a user search string. Test-Information: Tested on OS X 10.11.6 with Qt 5.5.1. Tested UX with different MUC services and search strings. Change-Id: I88085d089493008b2197a4aeb45d8c4d75724b9c
2016-09-07Explicitly set layout direction based on QT_LAYOUT_DIRECTIONTobias Markmann
This is supposed to happen automatically according to Qt documentation but it does not. Qt also changed the context of QT_LAYOUT_DIRECTION from Application to QGuiApplication. This commit adjusts our translations accordingly. Test-Information: Tested with Qt 5.4.2 and Qt 5.5.1 on OS X 10.11.6 with German and Hebrew translations. Change-Id: I0b6a8bf35487e95f5186fd4fa09d4dcb92ba0c01
2016-09-05Add simple versioning to QtScaledAvatarCacheTobias Markmann
The cache for each version is stored in a dedicated directory that exists next to the raw avatar images. This allows running different Swift versions which use different versions of the QtScaledAvatarCache. Test-Information: Tested on OS X 10.11.6 with Qt 5.5.1 and Windows 8 with Qt 5.5.1. Verified that the avatar paths changed to the new versioned cache path in the web views. Change-Id: I12cb46c4d6750ae7ad82c719eef290f721d1d131
2016-08-26Improve API clarity of MUCSearchItem::setParentTobias Markmann
Change MUCSearchItem::setParent to take weak_ptr over shared_ptr and converting it to weak_ptr in the method. Test-Information: Builds on OS X 10.11.6. Tested that various MUC room searches still work. Change-Id: I26d62861c99957759127c18a629bdda3635012c7
2016-08-25Alphabetically sort MUC search resultTobias Markmann
This also changes the classes around MUCSearchModel to C++11 smart pointer based memory management. Test-Information: Verified that dtors of MUCSearch*Items are called when old search results are replaced by new search results. This was not the case previously. All unit tests and manual testing with an ASAN enabled build succeeded. Change-Id: I84d62f3b86138728401b98d3774f47c72fdf9a4c
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-23Only use Lato font for rosters and the chat viewTobias Markmann
This sets the font family to Lato for QtTreeWidgets. The font size or other settings are not changed. Test-Information: Tested on OS X 10.11.6 with Qt 5.5.1. Change-Id: I235ae1b4e98e903872cb21ce41eca5f08955042d
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-08-23Do not require debug MSVC runtime for non optimized buildsTobias Markmann
This allows building Swift with debug symbols and the non-debug MSVC dynamic runtime. Test-Information: scons debug=1 optimize=0 and ./scons debug=1 optimize=1 both build and Swift runs in both configurations on Windows 8 with VS 2013. Change-Id: I47d75916963c4e64732c547bc7dfb322096d6189
2016-08-22Add shortcuts to change chat view font sizeTobias Markmann
Test-Information: Tested on OS X 10.11.6 with Qt 5.5.1. Change-Id: Ie96bae26e4001b3955007064313ae76cb47c0a7e
2016-08-19Fix crash during trellis size change on WindowsTobias Markmann
Due to Windows focus handling, the handleApplicationFocusChanged method was called during the relayout process while the dynamic grid layout is not in a consistent state. With this change a call to handleApplicationFocusChanged will just be ignored during the relayout process when changing the layout. Now it also remembers the current active widget in the layout and activates it after the relayouting is done. Test-Information: The crash happened in a scenario where you had a few rows and columns and with many tabs randomly distributed, leaving some trellis cells without a widget. When changing back to a 1x1 grid in this situation it sometimes crashed. Now it does not anymore. Tested on Windows 8 with Qt 5.4.2. Change-Id: I829bac2ba050cf320e15ab48b49bbb9606a82831
2016-08-19Support dropping tabs on tab widgetsTobias Markmann
Previously users could only drag and drop tabs on other tab bars. With this change the user can simply drop the tab on another tab widgets. This works on all QtTabWidgets that have a QtDNDTabBar set, regardless of their number of child widgets. This works by forwarding dragEnverEvent() and dropEvent() calls on the QtTabWidget to the corresponding QtDNDTabBar. Tabs dropped on the tab widget instead of the tab bar are added at the end of the tab bar. Test-Information: Tested with Qt 5.5.1 on OS X 10.11.6 and Windows 7. Change-Id: Ie73e02de24472eab2d20a89c937fb6630b1ef7b8
2016-08-18Tweak grid selection dialog renderingTobias Markmann
Recent testing on Debian 8 showed two rendering issues: 1. CE_MenuBarItem in the selected state shows drawing artifacts for our drawing size with Debian's default style. 2. CE_SizeGrip shows drawing artifacts unless it's drawn at position (0,0). Removed size grip as the resizability signification is also provided by the description text. Cells are drawn as simple squares in the palette's highlight color. Test-Information: Verified that there are no artifacts and the dialog is usable on Debian 8, Windows 8 and OS X 10.11.6. Change-Id: I9eaf1e1fd34d035ec3dffcb0dc29efca40d6da24
2016-08-15Improve UX of grid selection dialogTobias Markmann
This fixes UI drawing quirks on Windows and improves the margins. It also adds a descriptive text on how to use the dialog. It adjusts the cursor position when changing the size via keyboard so switches between keyboard and mouse usage of the dialog are fluid. Test-Information: Verified usage and looks on Windows 8 with Qt 5.4.2 and on OS X 10.11.6 with Qt 5.5.1. Change-Id: I983656d7d08d49ac4914380ae42ed5ce49fcea12
2016-08-09Enable better date formatting in the UITobias Markmann
This adds the ability to provide more specific date formatting via the Translator interface. The default translator will use Boost's formatting capabilities. The QtTranslator use more localized and better readable formatting. Test-Information: Tested with Qt 5.5.1 on OS X 10.11.6. Checked that tooltips and presence text in new chat views show the new formatting. Change-Id: I90ff5ab8b31fb41f2dcbea2c40b8846c534c355f
2016-08-09Fix SVG rendering related packaging issuesTobias Markmann
Added Qt image format plugin packages and Qt SVG image format plugin to InstallSwiftDependencies.sh script and Debian packaging. Test-Information: Tested that macdeployqt now adds the image format plugin for SVG to the deployable app bundles. Change-Id: Id1ce265073cb8adb9315cb40da032ee11ea8761d
2016-08-03Draw usernames in contact list in dark grayTobias Markmann
It now uses the same dark gray tone as the chat view uses for its text. Moved some constants to named variables for readability. Test-Information: Compact and non-compact contact lists, in the roster and MUC roster and the chats view all show the first line drawn in a dark gray instead of the hard black. Change-Id: Ief36fd4f27d30ace61f04d50e846db571ab84a4e
2016-08-03Add support for signing the resulting MSI installer on WindowsTobias Markmann
Test-Information: Created a custom CA and added it as trusted to the system. Created a signing certificate and passed it to scons as described. The resulting installer does not show a red UAC dialog anymore during installation. Instead the publisher from the certificate is shown in a blue UAC dialog. Change-Id: Ie4043520f6d45ec2e7aad712441a928cb423b0de
2016-08-02Fix notice sometimes showing empty popup dialog on activationTobias Markmann
Test-Information: Tried editing a contact on a server prohibiting contact editing. Previously the first double-click on the notice showed an empty popup. Now the correct popup text is shown. Change-Id: I996cf5b654e866ec6dd3f5198b694ae564018695
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-22Crop avatars to squares so they look better inside the chat viewTobias Markmann
Test-Information: Tested by clearing the avatar cache and joining MUC some larger MUC rooms. All but our current default avatar look much better. Change-Id: I515adbded1114632f41d6ee4eba6602b77dad975
2016-07-22Add button to changelog dialog to about dialogTobias Markmann
Test-Information: Tested with Qt 5.5.1 on OS X 10.11.5 and Qt 5.3.2 on Debian 8.5. Change-Id: I727bca574ec1433df01bc68e5da0c7678fdb9915
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-07-12Improved logo-shaded-text.svg and its use in login windowTobias Markmann
The old version cut off the blurred shade at the top and bottom. The new version has a square page and does not cut off the blurred shade of the Swift logo used in the image. Furthermore rendered the SVG to a 192x192 PNG, the exact dimensions used in the UI, using the `inkscape -e logo-shaded-text.png -w 192 -h 192 -z logo-shaded-text.svg` command. This change also works around QTBUG-46846. Test-Information: Verified that the login window of the UI looks nearly the same as before. It is a bit smaller since the blurred shade is not cut off anymore. Change-Id: Iee56d2a892572f45db7f93a2429455fd9d603eb6
2016-07-12Bring background enter room dialog to front if it existsTobias Markmann
This is the same approach taken by the vCard dialog. Test-Information: Previously the open 'Enter Room…' dialog would stay in background when selecting the 'Enter Room…' menu item. Now it will be raised to top. Tested on OS X 10.11.5 and Qt 5.5.1. Change-Id: I8ef78ceea328206306d25085feeb3f5b039821d9
2016-07-12Remove Snarl notification supportTobias Markmann
This removes Snarl from 3rdParty, our adapter to it in SwifTools and the integration in Swift UI. Test-Information: Builds and installer still work on Windows 8. Standard system tray balloon notifications still work. Change-Id: Id580642932eac260c79eaf2343a94ec9d5606f11
2016-06-30Add initial support for code signing on OS XTobias Markmann
See DEVELOPMENT.md for instructions. Test-Information: Tested using a self-signed code signing certificate created using Keychain Access.app. Compared the output of 'codesign -vvv -d' on Swift.app with preinstall apps. The output looks much the same except for the signing authority. Change-Id: Idbb3209ad917091c371ced61ec8a77e3e5d18884
2016-06-27Fix cleanup of date_facet instanceTobias Markmann
The C++ standard library takes ownership of the date_facet instance passed into the locale object ctor. Test-Information: Without this fix Swift would crash on exit when build with ASAN. With this fix it does not anymore on OS X 10.11.5. Change-Id: I46a87d9d6840408556722feeebe28a13e0d351b2
2016-06-23Improve Linux spell checking UX and enable it by defaultTobias Markmann
This removes support for user dictionaries for now. The new UI shows a list human readable languages (in their native spelling) where the user can select one to use for spell checking. Updated our InstallSwiftDependencies.sh based on the package names in their repositories. Test-Information: Tested on Ubuntu 16.04 with Hunspell and tested it still builds on OS X 10.11.4. Did not test InstallSwiftDependencies.sh. Change-Id: I24fc705b1495f7c39a8da149cbd7116e41609998
2016-06-23Change minidump filename format to include version and dateTobias Markmann
The new format is VERSION_DATE_UUID.dmp. Included the diff for the Breakpad modification. Test-Information: Tested by adding crashing code and verified the filename of the created minidump file on Windows 8 with VS 2013. Change-Id: I963e7913fadf4787742439da590e12e121ef3435
2016-06-15Load and set Lato font as UI font for QtTobias Markmann
Test-Information: Tested on OS X 10.11.5 with Qt 5.4.2 and Debian 8.5 with Qt 5.3.2. Change-Id: I9a60fc4b5556379576fdddc12a697cb71597e241
2016-06-14Enable trellis support by defaultTobias Markmann
Test-Information: Verified that trellis options are available after login and working as expected on OS X 10.11.5 with Qt 5.4.2. Change-Id: Ib94129abc07c38d38c932493d1c74260e894a4f3
2016-05-27Allow to invite multiple contacts to a chat room at onceTobias Markmann
There was a bug that prevented to drag multiple contacts in the invite dialog list. The restriction for impromptu conversation rooms is now only applied if no local MUC service is found and the dialog is a 'Chat to Users' dialog. Test-Information: Tested that you can now drag multiple contacts into the invite dialog. Tested on OS X 10.11.4 with Qt 5.4.2. Change-Id: I50b0bb191570f32cfa054e415c993b1fb57073ad
2016-05-27Add presence to manually added contacts in 'Start Chat…' dialogTobias Markmann
This fixes a bug where manually added contacts, i.e. the user entered the address and hit the 'Add to list' button, were missing the correct presence in the contacts list in the 'Start Chat…" dialog. Test-Information: Tested on OS X 10.11.5 with Qt 5.4.2. Tested adding a roster member via the drop down suggestion and via manually entering the JID and clicking the 'Add to list' button. In both cases the correct presence was shown. Added a test verifying that empty JIDS are invalid. Change-Id: Idb18e4ad2b5c0afb48461796f64e8f11f02a24fd
2016-05-27Fix QtSuggestingJIDInput popup behavior on OS XTobias Markmann
QtSuggestingJIDInput is used by the 'Start Chat…' dialog and other dialogs. Keyboard usage of the widget works fine. Clicking on a suggested item via touchpad/mouse will correctly select the item. However, when the popup is hidden, the dialog containing the QtSuggestingJIDInput is not the top window but will be in the background instead. With the workaround, the dialog will be on top of the window hierarchy if a suggested item is selected by click. Test-Information: Tested that this workaround is not required on Windows 8 and Ubuntu 16.04. Tested this workaround works on OS X 10.11.5 with Qt 5.4.2. Change-Id: I77f0aa5f92268da1867f61d9f6e1fbc66a724c17
2016-05-26Bring existing dialog to front on open of "Start Chat…" dialogTobias Markmann
Test-Information: Tested on OS X 10.11.5 with Qt 5.4.2. Change-Id: Ic751fec01cfe6417bb5db17364f5eb69a2037895
2016-05-26Fix setting recent search server when doing a local user searchTobias Markmann
Test-Information: Builds on OS X 10.11.5. Tested that the recent search server field in the 'Start Chat…" dialog is not set, if you search locally. Searching on remote servers still adds the server to the recent search server list. Change-Id: I62e21339b055ec826f450b8bfb2c662d1df5e84b
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-25Convert hard tabs to four spaces in all our SConscript/*.py filesTobias Markmann
Test-Information: Test that it still builds and unit test pass on OS X 10.11.4. Change-Id: I2eb4a0b707991aee553db36a8cd1ae28b813acab
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-14Fix delayed login/roster resize on window resize in netbook modeTobias Markmann
If you resize the window in netbook mode, the splitter inside only resizes to the new geometry if it is clicked or moved. This is due to overriding resizeEvent hook of QSplitter in QtSingleWindow but not notifying QSplitter's resizeEvent hook in the new method. Test-Information: Tested on OS X 10.11.4 with Qt 5.4.2. Opened Swift in netbook mode and resize the window. The login screen is resized as the window is resized. The login screen used to only resize if you moved the splitter. Change-Id: I7715e1cdcb4c0e672e233a9f76fad3ef5fe70d25
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-06Fix include case typoTobias Markmann
Test-Information: Builds on Debian 8.4 and unit tests pass. Change-Id: I154f70606de33b57c8dd4a5d9431a14f537ad50f
2016-04-05Migrate to Boost.Signals2 from Boost.SignalsTobias Markmann
Boost.Signals was deprecated and is not improved further. This patch removes Boost.Signals from 3rdParty and adds Boost.Signals2 and its dependencies. Also removed the Qt signals compatibility file Swiften/Base/boost_bsignals.h. Test-Information: Build and ran unit tests on OS X 10.11.4. Confirmed successful login using Swift client. Change-Id: Ie6e3b2d15aac2462cda95401582f5287a479fb54
2016-04-04Modernize code to use range based for loops using clang-tidyTobias Markmann
Run 'clang-tidy -fix -checks=modernize-loop-convert' 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: I65b99e0978cfab8ca6de2a3e5342e7a81416c12c