summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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-09-22Fix 'unused' member/parameter compiler warnings reported for SwiftTobias Markmann
Test-Information: Still compiles, the menitoned warnings in Swift are gone and unit tests pass. Change-Id: I8e113e7faf2e9273b4741f18c19e35e1b7bc7661
2015-09-22Reset potential warning when opening 'Add Contact' dialogTobias Markmann
Test-Information: Tested by entering an existing JID, closing the dialog window and reopening it. Change-Id: I6c24ba319a062d19f2144c70fcc94fe77d36befe
2015-09-18Save 'apply to all' property in highlight rule editorTobias Markmann
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
2015-09-18Set keyboard focus to text input after selecting an emoticonTobias Markmann
After selecting an emoticon on Windows the keyboard focus does not return to the text input. OS X did not exhibit that behavior. This fix explicitly sets the focus back to the text input after selection of an emoticon, as expected by the user. Test-Information: Verified the behavior on OS X 10.9.5 and Windows 7, both with Qt 5.4.2. Change-Id: I8737a7e3f6d1a6b7a8e60261e9bd14c7be8d07a6
2015-09-16Only put qt.conf as resource binary for Windows buildsTobias Markmann
Commit 22ea5735ad1a105a4294b7475aba58646ef3ee8a added a qt.conf file to the compiled binary resources of Swift which is picked up by Qt and configures Qt to disable DPI awareness on Windows, as it is not supported by the Qt WebKit widgets yet. However, the Mac application bundle also ships with a qt.conf file which set the correct folders for Qt plugins. This was overridden by the compiled qt.conf resource file. This commit only compiles the qt.conf resoruce file require for Windows on the Windows platform. Test-Information: Tested on Windows 10 with 150% scaling that Swift is scaled up based on the pixel data. Tested on OS X 10.9.5 that the installation package works again. Change-Id: I74ce722cff1090e7dafc3a67e04f2a45d375a43d
2015-09-04Fix middle name and suffix arrangement in vCard dialogTobias Markmann
The vCard fields for middle name and suffix have been swapped at some point in the past. This commit fixes this error. It also specifies the correct tab sequence for the widget. Test-Information: Tested the correct visual appearance and tab sequence on Mac OS X 10.9.5 with Qt 5.4.2. Change-Id: I80d7e21982ddbb836c9f9a690e685a902e54df9c
2015-09-03Initial support for OS X Notification CenterTobias Markmann
This implements basic support for OS X Notification Center notifications with simple banner notifications showing type, contact and message/presence information. A click on the notification opens the chat view to the contact. The Notification Center backend will be used on OS X if the Growl notification backend is not used. This code requires OS X version 10.8 or later. Test-Information: Tested presence and message notifications between multiple Swift accounts and instances on OS X 10.9.5. Change-Id: I7b9e2132cab25e086e0912191562cad8f4cbae38
2015-09-03Add close button to about dialog for Linux desktopsTobias Markmann
The default Debian 7 desktop uses window decorations for dialog windows that does not have close window buttons at the top. This commit adds a dedicated close button to the about window. This button is *not* added on Windows and OS X. Test-Information: Tested looks and function on OS X 10.9.5 with Qt 5.4.2 and Debian 7 with Qt 5.3.2. Change-Id: Ia363f66666eb88d43834ab0556f7b06efd3cedef
2015-08-11Fix accelerator for "Chats" tab in the main windowTobias Markmann
Test-Information: Verified behavior with Qt 5.5.0 on Elementary OS 0.2. Change-Id: Id4dd1e5e35c1ec20d0a2dd39727ee0ba352b611a
2015-08-11Disabling HiDPI support for Qt on WindowsTobias Markmann
This is an intermediate solution to the problem that the web views of Qt do not scale to the correct size out of the box. Disabling support for HiDPI mode will let Windows do pixel based scaling. The resulting appearance is not as clear but the web views remain readable. Test-Information: Tested with Qt 5.4.2 on Windows 8. Change-Id: I9460902e728e6190c8382d4eb954135470654e5c
2015-08-11Fix crash on trellis shortcuts if no chat window is openTobias Markmann
Test-Information: Verified that using trellis shortcuts does not crash Swift anymore if no chat window is open. Change-Id: Ie5c7b4675c89c8481cad48f2a348e6520ac42b13
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-14Fix memory leak in QtUserSearchWindowTobias Markmann
The delegate was not correctly freed and was leaking across login/logout sessions. Setting the parent of the delegate during initialization, so it will be freed by Qt when the QtUserSearchWindow is freed. Delegated the deallocation to Qt, because it has to be freed after the widget that uses the delegate is freed. Test-Information: The leak was reported by Valgrind. Verified with Valgrind that this commit fixes the leak and is not reported anymore. Change-Id: Ib48d2628577433bce82103b3f14cbd11d733b7ac
2015-07-13Fix Swift crash during start because of spellcheck codeTobias Markmann
Check that checker_ and highlighter_ are initialized before calling them. A crash report indicated a crash calling getMisspelledPositions() on highlighter_ from QtTextEdit::contextMenuEvent(). This fix should prevent this call to cause a crash. Test-Information: Verified that spell checking still works on OS X. Change-Id: Idae37c1f9e2d1a0d0f64da251aa6778f2e9b47a2
2015-07-13Change label of button clearing the file transfer listTobias Markmann
Test-Information: Checked that the button has the new label. Change-Id: Ic0e00e479de01decd23e14477d0bf34950ab6160
2015-07-10Implement logic behind 'Clear all' buttonTobias Markmann
The 'Clear all' button in the file transfer overview window was only present in the UI, without any logic behind. That's fixed now. Test-Information: Send a file in between two Swift instances. Verified that the button is enabled/disabled at appropriate times and works as expected if pressed. Change-Id: Ib92621cba479683ade8d815ce5ace9768449a499
2015-07-10Create notice events for incoming file-transfersTobias Markmann
Test-Information: Send a file from one Swift instance to another. The UX is similar to that of a MUC invite, clicking the notice will bring the relevant chat in front. Change-Id: Ief3cd7371ae01b2b38b6d1af36189df961eacef4
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-07-07Add ability to enter rooms when offlineTobias Markmann
Rooms in the recent chats list and bookmarks can be entered by double click if the user is offline. They are joined when the user goes online again. Test-Information: Tested by going offline via the presence menu and then entering rooms via recent chats and bookmarks. Change-Id: I8c3eadd29c3353c2cf5f04f53b71ef7ad67a5c05
2015-07-07Show old vCard in UI if vCard update is rejected by serverTobias Markmann
Previously QtVCardWidget would work on a shared copy of a VCard and modify the shared version. Now when setting the vCard on the widget it creates its own copy and works on that. The ProfileController holds a reference to the VCard it sets on the UI. If the server rejects an update it can reset the UI to this VCard. Test-Information: Tested against a XMPP server that rejects all vCard updates (mod_readonly). Change-Id: Iaa8eed6406f2dc6cc7ac5434194a7dae4f879b33
2015-07-07Add hidden option to prevent disconnect when smartcard removedMili Verma
This patch adds an option 'disconnectOnCardRemoval' to system-settings.xml which when set to false allows the user's session to stay connected if the smartcard is removed. The default value of this option is true if it is not specified. Test-information: Tested on Windows using NIST smartcards. Tested true and false values set for this option in the file and also when option is not specified (true). Unit tests pass. Change-Id: I7e421b4153ff7d3000f41999add20d339076c96e
2015-06-10Add ability to limit SChannel to TLS 1.0Kevin Smith
Some servers have very restrictive TLS stacks that respond badly to a bug in the SChannel TLS implementation, meaning that TLS has to be limited to 1.0. Add ClientOptions.tlsOptions. This is a method of passing options into the TLS stack. It's currently only used for the TLS 1.0 workaround in SChannel, but we might reasonably expose other options in the future, such as limiting cypher suites. Disables use of SSLv3 for SChannel Also updates the coding style in SchannelContext a bit. Test-Information: Compiles on both OS X and Windows(SChannel). OS X doesn't show the new option. Windows shows it, and remembers it between logins. Not tested against a server requiring 1.0 only, but a previous hack with the same approach was tested. Change-Id: I1e7854d43811fd173f21f98d4dc3915fc7a4b322
2015-06-05UI improvements to the ad-hoc command windowTobias Markmann
Use QDialogButtonBox instead of custom button layout code. This way the button are correctly layouted depending on platform guidelines. Show a 'Ok' button if no other button is shown which closes the window. Test-Information: Tested on OS X 10.9.5 with Qt 5.4.2. Change-Id: I37581982766d013f4d3d636880fd5ada59ee0c40
2015-05-31Remove magic number and fix QtVCardWidget::sizeHintTobias Markmann
This adds layout margin and spacing to the calculation of the correct size hint. Test-Information: Tested on OS X 10.9.5 with Qt 5.4.1. Change-Id: I7036f64a6621f5ce6603e77da26a887e28c663ca
2015-05-31Open profile windows in their ideal size so everything is readableTobias Markmann
Test-Information: Tested on OS X 10.9.5 with Qt 5.4.1 and Windows 8 with Qt 5.3.2 and KUbuntu 14.04 with Qt 5.4.1. Change-Id: Ia6cf54baad3020d05be94c6159aa623f7a619816
2015-05-31Overriding QtVCardWidget::sizeHint() so ideally there is no scrollingTobias Markmann
Test-Information: Tested on OS X 10.9.5 with Qt 5.4.1. Change-Id: I27ba80b9799fd8177a291ec0b8eeb0c2168e2f04
2015-05-31Layout improvements to QtVCardPhotoAndNameFieldsTobias Markmann
Layout label and editing widgets below each other instead of next to each other. This way there will not be any horizontal spacing if one of them is hidden. This also removes empty name parts in the shown fullname. Test-Information: Tested on Mac OS X 10.9.5 and Qt 5.4.1. Change-Id: I20561a8e7f8b9305cd3314b1250a2d006abbccb5
2015-05-31Overriding QtElidingLabel::sizeHint() so preferably all text is shownTobias Markmann
Test-Information: Tested on OS X 10.9.5 with Qt 5.4.1. Change-Id: I8cad307d967be32a9d67dc8408e4a27f487f6032
2015-05-26Fix trellis related bugsTobias Markmann
Bugs like: * Tab title not matching shown chat window * Duplicated tab titles after tab movement Swift is also subject to QTBUG-36455, which is fixed for Qt >= 5.3.0. This commit removes the use of application wide focus handlers in QtChatWindow class, the QtChatWindow::qAppFocusChanged method. The reason for this is due to the way QTabBar::moveTab is implemented in Qt which we use for the Trellis feature. Internally QTabBar::moveTab first adjusts its tab bar labels, then removes the tab from its old location in the internal QStackedLayout and then inserts it in the new location. After the remove Qt gives focus to another widget via a focus change that does not go through the event loop of the application and is not interceptable with eventFilters. Previously we would set the focus and call other signals in the application wide focus change handler which then used the currently inconsistent QTabBar/QTabWidget. Test-Information: Tested tab switching and movement on Windows 8 (Qt 5.3.2), OS X 10.9.5 (Qt 5.4.3) and Ubuntu 14.04.2 LTS (Qt 5.4.3). Change-Id: Ief423c4add58a90279109f72fac95fc58cb71111
2015-05-26Set QtGetridSelectionDialog to frameless window to enable cursor changesTobias Markmann
Popup windows cannot change the mouse cursor on OS X. A frameless window looks the same. Test-Information: Tested on OS X 10.9.5 with Qt 5.4. Change-Id: Ia97e645be2ad1e5063f0cd8ef54344b63274b2d1
2015-05-26Add visual resize indicator in bottom right corner of QtGridSelectionDialogTobias Markmann
Test-Information: Tested on Mac OS X 10.9.5 with Qt 5.4. Change-Id: I7581ae478fb347bb468b28997be963799b82b2cb
2015-05-20Usability improvements to "Enter Room" dialogTobias Markmann
Require valid room JID to proceed with entering a room. Provide user feedback via tooltips on invalid input in the room and nickname field. Test-Information: Tested with invalid room JID and empty nickanme on OS X 10.9.5 and Qt 5.4.0. Change-Id: I8d8c75f5712f27cc72cce2d6dd16dbbea4fb504a
2015-05-20Limit Qt placeholder text workaround to affected versionsTobias Markmann
The workaround was fixed with QTBUG-33237 and is not needed anymore. Test-Information: Tested on OS X 10.9.5 with Qt 5.4.0. Change-Id: Ie6a101749c816a082f31ac83085e098b3aa328aa
2015-05-19Consolidate Python and SCons files to tab based indentationTobias Markmann
Test-Information: Verified that SCons still runs on OS X. Change-Id: I7e9b97f90ee5581a691a959b6f2c999d93e0be53
2015-05-07Add support for Qt 5.4.1 to build and distribution process on WindowsTobias Markmann
Test-Information: Tested with Qt 5.3.2 and Qt 5.4.1 from qt.io website. Change-Id: Iada3e64e530d8a5b53b8b5c8943bcafbd9bd6c64
2015-04-28Allow editing bookmarks of MUC chats in the "Recent Chats"Tobias Markmann
Test-Information: Tested with online and offline account. Tested with not bookmarked and already bookmarked chats. Works as expected. Change-Id: Ib8851a70a7a82a198ee5b7a207816f03ad9df61e
2015-04-28Add Qt flags detection using pkg-config on Linux platformsTobias Markmann
Fix qt4.py SCons module to use the specific tools of the correct Qt verison. On non-Windows and non-Darwin platforms SCons will try to detect the correct Qt compiler and linker flags from pkg-config. Added the ability to build Slimber with Qt5. Fixed Qt5 support on Linux when using prebuilt Qt distribution from Qt. This patch adds support for building Swift on Arch Linux, with Qt4 and Qt5. Test-Information: Tested under Mac OS X 10.9.5 and Manjaor Linux (Arch Linux) in Qt4 and Qt5 configuration, and tested Qt5 Linux binary from their website on Arch Linux with the qt variable set in config.py. Change-Id: I2e19ab4aa7a26fdd989e2a12faa51a0f3f89c3ce
2015-04-10Fix keyboard shortcuts for --no-tabs modeTobias Markmann
This commit enables the following shortcuts for --no-tabs mode: - CTRL + Tab or CTRL/CMD + PageDown to switch to the next chat window - CTRL + Shift + Tab or CTRL/CMD + PageUp to switch to the previous chat window - CTRL/CMD + W to close the current chat window - ALT + A to switch to the next chat window with active messages Test-Information: Verified that the new shortcuts work as expected and verified that standard mode and netbook mode still work as usual. Change-Id: I3831b6c02f5d664cc8b21d7571e20aed00de89b4
2015-04-10Change trellis tab movement shortcutsTobias Markmann
The previous shortcuts conflicted with the shortcuts for moving to the begin and end of a line in text input widgets. New Shortcuts: Move tab left Ctrl+Shift+Page Up Move tab right Ctrl+Shift+Page Down Move tab to previous group Ctrl+Alt+Page Up Move tab to next group Ctrl+Alt+Page Down Test-Information: Tested and it works on Mac OS X 10.9.5 with Qt 5.4.1. Change-Id: Ie8b6fb05d56013d499e46838b15840554bbe6f72
2015-04-10Introduce FeatureOracle class for contact feature support detectionTobias Markmann
This modifies the feature detection in the ChatController to try to use the common features of all available resources feature detection if no full JID has been bound to the chat yet. Test-Information: Tested with two Swift instances. Tested a) the initial chat start case and, b) the offline/online. In case a) Swift used to initally show a yellow warning about no support for message receipts. This warning is gone now. In case b), after a user gone offline and online again in a running chat, Swift used to show a warning about missing support for message receipts. This warning is gone now. Change-Id: I7a769fde8d14847b180503aeaa58280c572d81b3
2015-04-05Improve UX regarding room bookmark handlingTobias Markmann
Label the window for adding bookmarks as "Add Bookmark Details". Allow modification of bookmarks from the cog menu in the chat window and adjust the context menu item accordingly. Test-Information: Tested the bookmarks section of the "Chats" tab in the contact list and the UX scenario using the cog menu that it works as expected. Tested it on OS X 10.9.5 with Qt 5.4.1. Change-Id: I80daf339fc86506db3d863decae4bcd892e3ea88
2015-04-04Fix popup visibility issues in QtSuggestingJIDInputTobias Markmann
When hiding the popup after selection of an item via mouse, the focus was given to a widget other then the QtSuggestingJIDInput or its parent dialog. This patch explicitly sets the focus back to the QtSuggestingJIDInput. Hide the potentially open popup when the QtSuggestingJIDInput is hidden. This can happen when the user closes a dialog with a QtSuggestingJIDInput inside of it. Test-Information: Verified described behavior on OS X 10.9.5 and Windows 8. Change-Id: Ic6629e6e626be18a70de159df62cda79dd82ee09
2015-04-03Fix vertical alignment of close button in QtClosableLineEditTobias Markmann
Test-Information: Tested vertical alignment of close button on OS X, Windows 7 and Elementary OS. Change-Id: Ia07a8476912674c94d851315f80630710e5f4217
2015-04-03Use SizeAllCursor for trellis resize dialogTobias Markmann
This is should be a union of the two diagonal resize cursors on most systems and is provided by Qt. Test-Information: Tested on Windows 7 and OS X 10.9.5. On OS X the cursor does not look like the union of the two diagonal resize cursors with Qt 5.4.1. Change-Id: I442f7e25b9bf0a3e6868cbcc9bd0a48d24da718d
2015-04-03Elide rightmost fields in the VCard dialogTobias Markmann
This patch changes the rightmost widget in the VCard fields from a QLabel to a QtElidingLabel. It also improves the spacing in the header in VCard profile dialog. Test-Information: Tested on OS X 10.9.5 with Qt 5.4.1. Change-Id: I771ddb555c5990c67550d9e36f001e57644712da
2015-03-31Disable signals when adding a tab to the trellis layoutTobias Markmann
Due ot the way Qt implements widgets and the events, the windowOpening signal of a QtTabbable is emitted before the QtTabbable is a member of a QTabWidget when adding a QtTabbable to a QTabWidget. Disabling the signals when adding the widget will prevent these signals to be called and will prevent and endlress recursion. This has originally been reported by Pavol Babincak. Test-Information: Without this patch the reporter had Swift crash after a day or two. With this patch the reporter does not experience the endless recursion (crash) anymore. Change-Id: I8b3d791d79e9ab8f42dd1a1cba30d118f620f15d