aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-contact-manager.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-01-02 06:10:22 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-01-02 06:10:22 +0800
commit5ba8e4047cf01d47781db85b2c400e67b84026a9 (patch)
tree164870ce992ada4185388a2a4f70fb68996f6649 /libempathy/empathy-contact-manager.c
parent6fd6f3b1081a5b72054ef135346da0d5eb979590 (diff)
downloadgsoc2013-empathy-5ba8e4047cf01d47781db85b2c400e67b84026a9.tar
gsoc2013-empathy-5ba8e4047cf01d47781db85b2c400e67b84026a9.tar.gz
gsoc2013-empathy-5ba8e4047cf01d47781db85b2c400e67b84026a9.tar.bz2
gsoc2013-empathy-5ba8e4047cf01d47781db85b2c400e67b84026a9.tar.lz
gsoc2013-empathy-5ba8e4047cf01d47781db85b2c400e67b84026a9.tar.xz
gsoc2013-empathy-5ba8e4047cf01d47781db85b2c400e67b84026a9.tar.zst
gsoc2013-empathy-5ba8e4047cf01d47781db85b2c400e67b84026a9.zip
Add a remove option to delete a contact group. Fixes bug #459520 (David Turner).
svn path=/trunk/; revision=528
Diffstat (limited to 'libempathy/empathy-contact-manager.c')
-rw-r--r--libempathy/empathy-contact-manager.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c
index 219cf8886..d86275048 100644
--- a/libempathy/empathy-contact-manager.c
+++ b/libempathy/empathy-contact-manager.c
@@ -482,6 +482,27 @@ contact_manager_rename_group (EmpathyContactList *manager,
&data);
}
+static void contact_manager_remove_group_foreach (McAccount *account,
+ EmpathyTpContactList *list,
+ const gchar *group)
+{
+ empathy_contact_list_remove_group (EMPATHY_CONTACT_LIST (list),
+ group);
+}
+
+static void
+contact_manager_remove_group (EmpathyContactList *manager,
+ const gchar *group)
+{
+ EmpathyContactManagerPriv *priv = GET_PRIV (manager);
+
+ g_return_if_fail (EMPATHY_IS_CONTACT_MANAGER (manager));
+
+ g_hash_table_foreach (priv->lists,
+ (GHFunc) contact_manager_remove_group_foreach,
+ (gpointer) group);
+}
+
static void
contact_manager_iface_init (EmpathyContactListIface *iface)
{
@@ -494,5 +515,6 @@ contact_manager_iface_init (EmpathyContactListIface *iface)
iface->add_to_group = contact_manager_add_to_group;
iface->remove_from_group = contact_manager_remove_from_group;
iface->rename_group = contact_manager_rename_group;
+ iface->remove_group = contact_manager_remove_group;
}