summaryrefslogtreecommitdiffstats
path: root/Swift
AgeCommit message (Collapse)Author
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-18Show potentially existing MUC bookmark in chat window bookmark dialogTobias Markmann
The MUC bookmark editor window opened from the chat window would always show a new bookmark. With this commit it will show the existing bookmark if it exists. Otherwise it will show a new bookmark. Test-Information: Tested this behavior by creating a bookmark, changing name and nickname to different values and verified that the bookmark dialog for this room, opened from its chat view, would show the existing bookmark. Change-Id: I6766253ce11be271016473dff1105369482e73df
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-16Increase template OS X installation disk image sizeTobias Markmann
Our packaging procedure temporarily needs more space on the disk image as it first copies the application bundle and frameworks on the image and afterwards removes debugging symbols and other files not required by the end user. The package.sh script reported this error of not having enough space left on the disk image. Test-Infromation: Verified that the disk image is still build, the package.sh error is gone and the packaged Swift.app works. Change-Id: Iba853bd30eb63f74f07cdda08b93e76dd89368bb
2015-09-16Remove Qt bearer plugins from Swift bundle in installation packageTobias Markmann
This is a workaround for QTBUG-34641. The Qt bearer API for detecting network changes will poll for available wireless networks every 30 seconds or so, resulting in needless CPU load. This patch removes the plugins for this API from the installation package, which will disable the constant polling for available wireless networks. Test-Information: Verified that the plugins are removed from the application bundle in the final installation DMG. Change-Id: If46d03ca5623885879ecc10e06a29cec96e7caa4
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-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