diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-03-10 21:19:25 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2010-03-15 16:28:43 +0800 |
commit | 91c1a372d9b58a42fd57cc4ce98888771b273f8d (patch) | |
tree | cb43248f27709ff6d9a3d75a2e0d89db9a9d9aca /libempathy-gtk | |
parent | 71ad0f9d2f6a6c35719fbd4d5315ef1104299e7e (diff) | |
download | gsoc2013-empathy-91c1a372d9b58a42fd57cc4ce98888771b273f8d.tar gsoc2013-empathy-91c1a372d9b58a42fd57cc4ce98888771b273f8d.tar.gz gsoc2013-empathy-91c1a372d9b58a42fd57cc4ce98888771b273f8d.tar.bz2 gsoc2013-empathy-91c1a372d9b58a42fd57cc4ce98888771b273f8d.tar.lz gsoc2013-empathy-91c1a372d9b58a42fd57cc4ce98888771b273f8d.tar.xz gsoc2013-empathy-91c1a372d9b58a42fd57cc4ce98888771b273f8d.tar.zst gsoc2013-empathy-91c1a372d9b58a42fd57cc4ce98888771b273f8d.zip |
Allow to remove contact from the 'Ungrouped' group using DnD
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-contact-list-view.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c index b11a20e14..b7e73f21e 100644 --- a/libempathy-gtk/empathy-contact-list-view.c +++ b/libempathy-gtk/empathy-contact-list-view.c @@ -255,17 +255,22 @@ contact_list_view_drag_got_contact (EmpathyTpContactFactory *factory, static gboolean group_can_be_modified (const gchar *name, - gboolean is_fake_group) + gboolean is_fake_group, + gboolean adding) { /* Real groups can always be modified */ if (!is_fake_group) return TRUE; - /* Only the favorite fake group can be modified so users can + /* The favorite fake group can be modified so users can * add/remove favorites using DnD */ if (!tp_strdiff (name, EMPATHY_CONTACT_LIST_STORE_FAVORITE)) return TRUE; + /* We can remove contacts from the 'ungrouped' fake group */ + if (!adding && !tp_strdiff (name, EMPATHY_CONTACT_LIST_STORE_UNGROUPED)) + return TRUE; + return FALSE; } @@ -297,7 +302,7 @@ contact_list_view_contact_drag_received (GtkWidget *view, new_group = empathy_contact_list_store_get_parent_group (model, path, NULL, &new_group_is_fake); - if (!group_can_be_modified (new_group, new_group_is_fake)) + if (!group_can_be_modified (new_group, new_group_is_fake, TRUE)) return FALSE; /* Get source group information. */ |