[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:06:27 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=bc7cb30

The following commit has been merged in the master branch:
commit bc7cb30419adbfd8cf45a0c8a092a8a62292f483
Author: Keith Rusler <xzekecomax at gmail.com>
Date:   Wed May 18 07:57:11 2011 -0500

    Search through all the available accounts to retrieve the contact
    groups that are available to us then we append them together so
    that the user can move contacts all to the same groups etc instead of
    what we current had that would only move them between groups that only
    that contact had for that protocol.
    BUG:272475
---
 main-widget.cpp | 17 ++++++++++++++---
 main-widget.h   |  1 +
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/main-widget.cpp b/main-widget.cpp
index 20e8003..4b2c055 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -4,6 +4,7 @@
  * Copyright (C) 2009-2010 Collabora Ltd. <info at collabora.co.uk>
  *   @Author George Goldberg <george.goldberg at collabora.co.uk>
  *   @Author Martin Klapetek <martin.klapetek at gmail.com>
+ *   @Author Keith Rusler <xzekecomax at gmail.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -709,16 +710,26 @@ void MainWidget::onCustomContextMenuRequested(const QPoint &)
     if (accountConnection->actualFeatures().contains(Tp::Connection::FeatureRosterGroups)) {
         QMenu* groupAddMenu = menu->addMenu(i18n("Move to Group"));
 
+        QStringList groupList;
+        QList<Tp::AccountPtr> accounts = m_accountManager->allAccounts();
+        foreach (const Tp::AccountPtr account, accounts) {
+            if (!account->connection().isNull()) {
+                groupList.append(account->connection()->contactManager()->allKnownGroups());
+            }
+        }
+
+        groupList.removeDuplicates();
+
         QStringList currentGroups = contact->groups();
-        QStringList allGroups = accountConnection->contactManager()->allKnownGroups();
+
         foreach (const QString &group, currentGroups) {
-            allGroups.removeAll(group);
+            groupList.removeAll(group);
         }
 
         groupAddMenu->addAction(i18n("Create New Group..."));
         groupAddMenu->addSeparator();
 
-        foreach (const QString &group, allGroups) {
+        foreach (const QString &group, groupList) {
             connect(groupAddMenu->addAction(group), SIGNAL(triggered(bool)),
                     SLOT(slotAddContactToGroupTriggered()));
         }
diff --git a/main-widget.h b/main-widget.h
index 7a5e417..4ec5357 100644
--- a/main-widget.h
+++ b/main-widget.h
@@ -4,6 +4,7 @@
  * Copyright (C) 2009-2010 Collabora Ltd. <info at collabora.co.uk>
  *   @Author George Goldberg <george.goldberg at collabora.co.uk>
  *   @Author Martin Klapetek <martin.klapetek at gmail.com>
+ *   @Author Keith Rusler <xzekecomax at gmail.com>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public

-- 
ktp-contact-list packaging



More information about the pkg-kde-commits mailing list