aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-contact-list-view.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-10-15 03:30:01 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-10-15 04:49:48 +0800
commit9357aef4b6cc3ee6c18f987dd439b11a7a21f20a (patch)
treeecd455a710c2fcf993e64f482060aba1e9713bdd /libempathy-gtk/empathy-contact-list-view.c
parent3e2f15590ee0d8e079566e2c6f00c536501c46ea (diff)
downloadgsoc2013-empathy-9357aef4b6cc3ee6c18f987dd439b11a7a21f20a.tar
gsoc2013-empathy-9357aef4b6cc3ee6c18f987dd439b11a7a21f20a.tar.gz
gsoc2013-empathy-9357aef4b6cc3ee6c18f987dd439b11a7a21f20a.tar.bz2
gsoc2013-empathy-9357aef4b6cc3ee6c18f987dd439b11a7a21f20a.tar.lz
gsoc2013-empathy-9357aef4b6cc3ee6c18f987dd439b11a7a21f20a.tar.xz
gsoc2013-empathy-9357aef4b6cc3ee6c18f987dd439b11a7a21f20a.tar.zst
gsoc2013-empathy-9357aef4b6cc3ee6c18f987dd439b11a7a21f20a.zip
contact-list-store: remove 'fake group' code
This store is only used for MUC members which doesn't use these fake groups. Actually we could drop all the group code but it would probably be easier to completely rewrite the way we display MUC members. https://bugzilla.gnome.org/show_bug.cgi?id=661489
Diffstat (limited to 'libempathy-gtk/empathy-contact-list-view.c')
-rw-r--r--libempathy-gtk/empathy-contact-list-view.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index f8c055c7e..1d95baf8e 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -331,20 +331,6 @@ contact_list_view_drag_got_contact (TpConnection *connection,
list = empathy_contact_list_store_get_list_iface (priv->store);
- if (!tp_strdiff (data->new_group, EMPATHY_CONTACT_LIST_STORE_FAVORITE)) {
- /* Mark contact as favourite */
- empathy_contact_list_add_to_favourites (list, contact);
- return;
- }
-
- if (!tp_strdiff (data->old_group, EMPATHY_CONTACT_LIST_STORE_FAVORITE)) {
- /* Remove contact as favourite */
- empathy_contact_list_remove_from_favourites (list, contact);
- /* Don't try to remove it */
- g_free (data->old_group);
- data->old_group = NULL;
- }
-
if (data->new_group) {
empathy_contact_list_add_to_group (list, contact, data->new_group);
}
@@ -354,27 +340,6 @@ contact_list_view_drag_got_contact (TpConnection *connection,
}
static gboolean
-group_can_be_modified (const gchar *name,
- gboolean is_fake_group,
- gboolean adding)
-{
- /* Real groups can always be modified */
- if (!is_fake_group)
- return TRUE;
-
- /* 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;
-}
-
-static gboolean
contact_list_view_contact_drag_received (GtkWidget *view,
GdkDragContext *context,
GtkTreeModel *model,
@@ -401,9 +366,6 @@ 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, TRUE))
- return FALSE;
-
/* Get source group information. */
if (priv->drag_row) {
source_path = gtk_tree_row_reference_get_path (priv->drag_row);
@@ -414,9 +376,6 @@ contact_list_view_contact_drag_received (GtkWidget *view,
}
}
- if (!group_can_be_modified (old_group, old_group_is_fake, FALSE))
- return FALSE;
-
if (!tp_strdiff (old_group, new_group)) {
g_free (new_group);
g_free (old_group);
@@ -1036,15 +995,6 @@ contact_list_view_group_icon_cell_data_func (GtkTreeViewColumn *tree_column,
if (!is_group)
goto out;
- if (!tp_strdiff (name, EMPATHY_CONTACT_LIST_STORE_FAVORITE)) {
- pixbuf = empathy_pixbuf_from_icon_name ("emblem-favorite",
- GTK_ICON_SIZE_MENU);
- }
- else if (!tp_strdiff (name, EMPATHY_CONTACT_LIST_STORE_PEOPLE_NEARBY)) {
- pixbuf = empathy_pixbuf_from_icon_name ("im-local-xmpp",
- GTK_ICON_SIZE_MENU);
- }
-
out:
g_object_set (cell,
"visible", pixbuf != NULL,