]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-contact-list-view.c
Remove check on GTK version, we depend on >= 2.14.0 now.
[empathy.git] / libempathy-gtk / empathy-contact-list-view.c
index 6dfb20eb9dc946847184425c4fe08741a215ab42..6cb8b7e8c51ecbbcebd92d45f96ba40a7d8ced56 100644 (file)
@@ -34,6 +34,7 @@
 
 #include <libmissioncontrol/mc-account.h>
 
+#include <libempathy/empathy-call-factory.h>
 #include <libempathy/empathy-contact-factory.h>
 #include <libempathy/empathy-contact-list.h>
 #include <libempathy/empathy-contact-groups.h>
@@ -140,16 +141,19 @@ contact_list_view_query_tooltip_cb (EmpathyContactListView *view,
        GtkTreeModel               *model;
        GtkTreeIter                 iter;
        GtkTreePath                *path;
+       static gint                 running = 0;
+       gboolean                    ret = FALSE;
 
-       /* FIXME: We need GTK version >= 2.12.10. See GNOME bug #504087 */
-       if (gtk_check_version (2, 12, 10)) {
+       /* Avoid an infinite loop. See GNOME bug #574377 */
+       if (running > 0) {
                return FALSE;
        }
+       running++;
 
        if (!gtk_tree_view_get_tooltip_context (GTK_TREE_VIEW (view), &x, &y,
                                                keyboard_mode,
                                                &model, &path, &iter)) {
-               return FALSE;
+               goto OUT;
        }
 
        gtk_tree_view_set_tooltip_row (GTK_TREE_VIEW (view), tooltip, path);
@@ -159,7 +163,7 @@ contact_list_view_query_tooltip_cb (EmpathyContactListView *view,
                            EMPATHY_CONTACT_LIST_STORE_COL_CONTACT, &contact,
                            -1);
        if (!contact) {
-               return FALSE;
+               goto OUT;
        }
 
        if (!priv->tooltip_widget) {
@@ -175,10 +179,13 @@ contact_list_view_query_tooltip_cb (EmpathyContactListView *view,
        }
 
        gtk_tooltip_set_custom (tooltip, priv->tooltip_widget);
+       ret = TRUE;
 
        g_object_unref (contact);
+OUT:
+       running--;
 
-       return TRUE;
+       return ret;
 }
 
 static void
@@ -571,7 +578,11 @@ contact_list_view_voip_activated_cb (EmpathyCellRendererActivatable *cell,
                            -1);
 
        if (contact) {
-               empathy_start_call_with_contact (contact);
+               EmpathyCallFactory *factory;
+
+               factory = empathy_call_factory_get ();
+               empathy_call_factory_new_call (factory, contact);
+
                g_object_unref (contact);
        }
 }
@@ -792,7 +803,7 @@ contact_list_view_row_has_child_toggled_cb (GtkTreeModel          *model,
                            EMPATHY_CONTACT_LIST_STORE_COL_NAME, &name,
                            -1);
 
-       if (!is_group || G_STR_EMPTY (name)) {
+       if (!is_group || EMP_STR_EMPTY (name)) {
                g_free (name);
                return;
        }