#include <string.h>
-#include <glib/gi18n.h>
+#include <glib/gi18n-lib.h>
#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>
#include <glade/glade.h>
#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>
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);
EMPATHY_CONTACT_LIST_STORE_COL_CONTACT, &contact,
-1);
if (!contact) {
- return FALSE;
+ goto OUT;
}
if (!priv->tooltip_widget) {
}
gtk_tooltip_set_custom (tooltip, priv->tooltip_widget);
+ ret = TRUE;
g_object_unref (contact);
+OUT:
+ running--;
- return TRUE;
+ return ret;
}
static void
id);
strv = g_strsplit (id, "/", 2);
- factory = empathy_contact_factory_new ();
+ factory = empathy_contact_factory_dup_singleton ();
account = mc_account_lookup (strv[0]);
if (account) {
contact = empathy_contact_factory_get_from_id (factory,
if (contact) {
DEBUG ("Starting a chat");
- empathy_dispatcher_chat_with_contact (contact);
+ empathy_dispatcher_chat_with_contact (contact, NULL, NULL);
g_object_unref (contact);
}
}
-1);
if (contact) {
- empathy_dispatcher_call_with_contact (contact);
+ EmpathyCallFactory *factory;
+
+ factory = empathy_call_factory_get ();
+ empathy_call_factory_new_call (factory, contact);
+
g_object_unref (contact);
}
}
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;
}