summaryrefslogtreecommitdiffstats
path: root/Swift
AgeCommit message (Collapse)Author
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-11Fix broken bookmarks context menu after reconnectTobias Markmann
Test-Information: Tested that the bookmarks context menu still works after an offline/online cycle. Change-Id: I9248b7405a6a09bc813c6590e0f2f9a4ed92acb3
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-27Remember directory services used when searching for usersTobias Markmann
Test-Information: Tested by searching at some services and checked that they are present in the combo box after a Swift restart. Change-Id: Ia30d932f20447f44e458af3b32a38665872da025
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-09Enable SSOMili Verma
Add a hidden option to enable single sign on. When that is enabled, ensure that the user only enters the domain name and that the JID is constructed from the Windows log-on credentials. Test-information: Tested on Windows. Unit tests pass. Change-Id: Ia5592a3893f0807a3801b515c8fcddb580c9ef8d
2015-07-08React to file transfer cancellation before the transfer startedTobias Markmann
Connect FileTransfer::onStateChanged signal earler to slot in FileTransferController, so the slot will be called for state changes that occur before a transfer started. Test-Information: Tested with two Swift instances and cancelling the sender side and receiver side. Without this patch the receiver side UI does not change if the receiver side cancels the transfer. Change-Id: I1d4d3e1ac78689a16120bfa9ccdec30ab1191ee3
2015-07-07Remove partial remains of commented out codeTobias Markmann
Test-Information: Not applicable. Change-Id: I1620be8361c1b70b365011ac7f0ec6ac11dbe76f
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-07-07Fix './scons --help' if no Qt installation can be foundTobias Markmann
Test-Information: Tested on Elementary OS 0.2. Change-Id: Ieae4fc2a2c6fdfaaac9895153b09c9504ef71495
2015-07-01Don't incorrectly claim that non of Swift is built without QtKevin Smith
Test-Information: Building on a system without Qt now says that the application is all that isn't compiled. Swift/Controllers still compiles if requested (as before). Change-Id: I24631f6ba2bf3475a1a6456207c1da94f1b3f1c0
2015-06-29Pass an optional error codeMili Verma
This patch creates and passes on an optional boost::system::error_code variable which contains more error info which can be displayed in case of an error. Test-information: Tested using WIP code on Windows. Change-Id: I285b8aec5e9c00d3a8e0d8cc0d5e7b4c5d94c099
2015-06-14Execute sound actions if requested and if text is highlightedTobias Markmann
HighlightRule did not consider keywords in its isMatch() routine. MUCController only triggered possible HighlightActions if it was a direct 1-to-1 MUC message or an impromptu chat message. Both issues are fixed. Additionally fixed the HighlightRuleTest. It had some wrong assertions related to rules being case insensitive by default and keywords match inside longer words by default. Test-Information: Tested with a highlight rule that highlights text and tested that sound actions are executed if the text is highlighted. Additionaly verified that other behaviour (own nick mentions, direct 1-to-1 messages) have their potential sound actions still executed. Change-Id: Ia922a1ff38c66f6458d28a18a8cdde10e821f83d
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