summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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-04-01Modernize code to use C++11 nullptr using clang-tidyTobias Markmann
Run 'clang-tidy -fix -checks=modernize-use-nullptr' 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: Ic43ffeb1b76c1a933a55af03db3c54977f5f60dd
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
2015-12-16Fix crash related to removal of contactsTobias Markmann
Test-Information: Added test@example.com contact and removed it afterwards. Without this patch Swift crashed. With the patch it does not anymore. Change-Id: I09e93340cb0a23291ab094a4cdb7c79ef719645a
2015-10-30Fix code in response to unused macro and private field warningsTobias Markmann
Test-Information: Build and tests pass successfully on OS X 10.10.5. Change-Id: I614586660796f9ef043156d09d998d39934a6eca
2015-10-30Change bare JID presence lookup code to ignore prioritiesTobias Markmann
Before presence handling code was handled by both, the ContactRosterItem in Swift and the PresenceOracle in Swiften. The ContactRosterItem also considered the presence priority for deciding what presence to show for a bare JID. With this code all full or bare JID presence requests are finally handled by the PresenceOracle. For bare JIDs it is looked up to a presence of one of the available resources of that JID regardless of the priorities. Test-Information: Adjusted tests according to above description and documentation in PresenceOracle. Change-Id: I972a4574f476cdf4d4b5593a035eb1c25ef2f8ba
2015-10-16Mark removed contacts as unavailable in SwiftTobias Markmann
When removing a contact, a XMPP client will not receive an explicit unavailable presence stanza for the contact from the server. Because of that Swift used to show removed contacts still with their old presence in the Chats tab or the chat view. With this patch, the PresenceOracle will flush all known presence of a contact as soon as the JID is removed from the roster. An unavailable presence will stored under the removed bare JID and is emitted via the PresenceOracle::onPresenceChange signal. Test-Information: Added a unit test verifying this behavior. Tested the behavior with two scenarios: a) Account A and B adding each other and accepting the subscription request. Starting a chat between A and B. After removing B in A's account, B used to be shown as available in the chat view and the Chats tab. With this patch B is shown as unavailable. b) Account A and B adding each other and accepting the subscription request. A removing B, and B removing A. After A adds B again, B used to be shown with the old presence even before B accepted the subscription request. This behavior is also fixed with this patch, not showing B as online until B accepted the subscription request. Change-Id: Iba97d3bedd0ac962ea00b25a0d2ed6106ed55a55
2014-12-15Update Copyright in SwiftKevin Smith
Change-Id: Idb6ef5fa191b1465c0bf46c47e63b695de07fa0b
2014-10-20Change old C-style cast to static_cast.Tobias Markmann
Test-Information: Before clang produced a warning about old C-style cast; not anymore. Change-Id: I0f381ea0cd1a015cc1774dd1878aaa2736c66059
2014-10-06Fix own avatar in contact list header not updated on VCard edit.Tobias Markmann
Commit 14fd8e changed the JID comparison to JID::WithResource. However, we want JID::WithoutResource because a) handleAvatarChanged is called with a bare resource when our own avatar changes and b) we also want the avatar in the contact list header be updated if another of our resources changes it. Test-Information: Changed own avatar to a different avatar or cleared it. Before the avatar in the contact list header was not updated; now it is. Change-Id: Ie84b6cb10b528f75c1c76c7ceae558f00380d99f
2014-08-10Fix blocklist not being requested on reconnect.Richard Maudsley
Test-Information: Connect client and confirm that blocklist is requested only once. Reconnect client and confirm that blocklist is requested again. Change-Id: Iebf38c9f3c1ff9749c239b6cf785feb7a539a9b1
2014-07-29Fix renaming contact group makes blocked user appear to be unblocked.Richard Maudsley
Test-Information: Block a user and rename the group then verify that the user still appears as blocked in the roster. Try renaming a group with several users in various states of blocked and unblocked and verify that the states are preserved after renaming. Change-Id: I93ff721b053f299d5f1c3f62dd8687f021701fe1
2014-07-07Fix other user avatars appearing in roster tooltip.Richard Maudsley
Test-Information: Reproduce bug by cycling MUC and confirm that another users avatar is visible in the tooltip. Apply this patch and check that only the users own avatar is displayed in the tooltip. Change-Id: I0e9ea44ce408ac445df9c089ce76556ae74e4394
2014-07-07Show own tooltip when hovering over roster header.Richard Maudsley
Test-Information: Made combinations of presence/vcard/avatar changes and verified that the information in the tooltip was synchronized. Connect two clients and verify that the tooltip presence text reflects the local client presence only. Change-Id: I92af0f58f7045f3a15f2fae2f9cbc6e24a066923
2014-05-29Check if contact supports file transfer before sendingRichard Maudsley
Change-Id: Iadb580ad8b3f258d49b7c1b8713f0f92009e022e
2013-12-08Move all RosterItemOperations to Swift/Controllers/Roster/ItemOperations and ↵Tobias Markmann
cleanup related includes. Change-Id: I20b8c347dd6f250f7ca426f8eb4e0093e226de5f License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2013-12-08Convert Roster::setAvailableFeatures() and Roster::setBlockedState() to ↵Tobias Markmann
RosterItemOperations. Change-Id: I67943bd50ca9eb4ae53e1acefbea1c7b67684cc9 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2013-11-18Improve tooltips to include avatars, last seen and vcard information.Tobias Markmann
Change-Id: I3768d9891ba903c5e2ce8217de0b4413ce40bb9a License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2013-05-17Fixed unicode path handling.Remko Tronçon
- Use boost::filesystem::path consistently for referring to files. - Use boost::filesystem streams for I/O, such that paths are always handled correctly. - Use stringToPath and pathToString for conversion between strings and boost::filesystem::path, to ensure we have consistent unicode handling across platforms and environments. The default constructor and string conversion uses platform-dependent encoding, depending on the global locale set in the application, which causes problems. So, unless you are in platform dependent code, the default constructor and string() function should not be used. When constructing paths from other paths (e.g. using operator/), also use stringToPath (instead of string arguments) if the path can contain unicode characters. Change-Id: If286bd9e71c8414afc0b24ba67e26ab7608ef6ea
2013-03-27Adding support for Blocking Command (XEP-0191) to Swift(-en).Tobias Markmann
Change-Id: I7c92518dc389474d520d4cf96f96a11459f73d26 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2012-09-08Support whiteboarding.Mateusz Piekos
License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
2012-03-06Load 'show offline' for new sessionsKevin Smith
2012-02-21Introduce system settings policies.Kevin Smith
Release-Notes: It is now possible for sysadmins to deploy files with policies for configuration options, such as making it impossible for users to save passwords or to force sound notifications off, or to set defaults. Also allow changing an option so that Swift disconnects on idle timeout, instead of going away.
2011-09-25Google Summer of Code 2011 Project: Adding support for Jingle File Transfers ↵Tobias Markmann
(XEP-0234), Jingle SOCKS5 Bytestreams Transport Method (XEP-0260), Jingle In-Band Bytestreams Transport Method (XEP-0261) and SOCKS5 Bytestreams (XEP-0065). License: This patch is BSD-licensed, see http://www.opensource.org/licenses/bsd-license.php
2011-05-23Fixed const references to vectors.Remko Tronçon
This could potentially cause crashes (same as a previous patch).
2011-02-26Add "Edit details" section to Add User widget.Remko Tronçon
Resolves: #618
2011-02-20Make Swift translatable.Remko Tronçon
2011-02-19Make Swift translatable.Remko Tronçon
2011-02-14Removed Swift::String.Remko Tronçon
2011-02-11Allow group changes at the same time as nick changes.Kevin Smith
Resolves: #696 Also hopefully Resolves: #764
2011-02-07Moved Swift-specific roster code out of Swiften.Remko Tronçon