]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-contact-list-view.c
Merge branch 'people-nearby-fake-group-613558'
[empathy.git] / libempathy-gtk / empathy-contact-list-view.c
index 58d4569fc04e89cf242a656b8fa69e204ce4c3d0..05823435a04727f9b9d42f501b5477156e38a733 100644 (file)
@@ -94,6 +94,7 @@ enum DndDragType {
 };
 
 static const GtkTargetEntry drag_types_dest[] = {
+       { "text/path-list",  0, DND_DRAG_TYPE_URI_LIST },
        { "text/uri-list",   0, DND_DRAG_TYPE_URI_LIST },
        { "text/contact-id", 0, DND_DRAG_TYPE_CONTACT_ID },
        { "text/plain",      0, DND_DRAG_TYPE_STRING },
@@ -101,6 +102,7 @@ static const GtkTargetEntry drag_types_dest[] = {
 };
 
 static const GtkTargetEntry drag_types_dest_file[] = {
+       { "text/path-list",  0, DND_DRAG_TYPE_URI_LIST },
        { "text/uri-list",   0, DND_DRAG_TYPE_URI_LIST },
 };
 
@@ -940,11 +942,14 @@ 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))
-               goto out;
-
-       pixbuf = empathy_pixbuf_from_icon_name ("emblem-favorite",
-               GTK_ICON_SIZE_MENU);
+       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,
@@ -1025,22 +1030,12 @@ contact_list_view_text_cell_data_func (GtkTreeViewColumn     *tree_column,
 {
        gboolean is_group;
        gboolean is_active;
-       gboolean show_status;
-       gchar *name;
 
        gtk_tree_model_get (model, iter,
                            EMPATHY_CONTACT_LIST_STORE_COL_IS_GROUP, &is_group,
                            EMPATHY_CONTACT_LIST_STORE_COL_IS_ACTIVE, &is_active,
-                           EMPATHY_CONTACT_LIST_STORE_COL_STATUS_VISIBLE, &show_status,
-                           EMPATHY_CONTACT_LIST_STORE_COL_NAME, &name,
                            -1);
 
-       g_object_set (cell,
-                     "show-status", show_status,
-                     "text", name,
-                     NULL);
-       g_free (name);
-
        contact_list_view_cell_set_background (view, cell, is_group, is_active);
 }
 
@@ -1221,10 +1216,16 @@ contact_list_view_setup (EmpathyContactListView *view)
 
        gtk_tree_view_column_add_attribute (col, cell,
                                            "name", EMPATHY_CONTACT_LIST_STORE_COL_NAME);
+       gtk_tree_view_column_add_attribute (col, cell,
+                                           "text", EMPATHY_CONTACT_LIST_STORE_COL_NAME);
+       gtk_tree_view_column_add_attribute (col, cell,
+                                           "presence-type", EMPATHY_CONTACT_LIST_STORE_COL_PRESENCE_TYPE);
        gtk_tree_view_column_add_attribute (col, cell,
                                            "status", EMPATHY_CONTACT_LIST_STORE_COL_STATUS);
        gtk_tree_view_column_add_attribute (col, cell,
                                            "is_group", EMPATHY_CONTACT_LIST_STORE_COL_IS_GROUP);
+       gtk_tree_view_column_add_attribute (col, cell,
+                                           "compact", EMPATHY_CONTACT_LIST_STORE_COL_COMPACT);
 
        /* Audio Call Icon */
        cell = empathy_cell_renderer_activatable_new ();