]> git.0d.be Git - empathy.git/commitdiff
individual-menu: only use 'gnome-contacts' with individuals from Folks
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 12 Mar 2012 14:23:30 +0000 (15:23 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 13 Mar 2012 10:20:05 +0000 (11:20 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=671884

libempathy-gtk/empathy-individual-menu.c

index 7b8da52d1e83a99195a214c8fbd78f98fdbe4fbd..22d3148827588a280dd77bd0e9b68b8d50e8fd0a 100644 (file)
@@ -53,6 +53,7 @@
 #include "empathy-share-my-desktop.h"
 #include "empathy-call-utils.h"
 #include "empathy-individual-store-channel.h"
 #include "empathy-share-my-desktop.h"
 #include "empathy-call-utils.h"
 #include "empathy-individual-store-channel.h"
+#include "empathy-individual-information-dialog.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
 #include <libempathy/empathy-debug.h>
 
 #define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
 #include <libempathy/empathy-debug.h>
@@ -1364,7 +1365,24 @@ static void
 individual_info_menu_item_activate_cb (GtkMenuItem *item,
     FolksIndividual *individual)
 {
 individual_info_menu_item_activate_cb (GtkMenuItem *item,
     FolksIndividual *individual)
 {
-  start_gnome_contacts (individual, TRUE);
+  EmpathyIndividualManager *mgr;
+
+  mgr = empathy_individual_manager_dup_singleton ();
+
+  /* Only use gnome-contacts if that's a 'real' individual we got from
+   * Folks (and so the individual manager knows about it). If not that's a
+   * MUC contact and we use the simple dialog. */
+  if (empathy_individual_manager_lookup_member (mgr,
+        folks_individual_get_id (individual)) != NULL)
+    {
+      start_gnome_contacts (individual, TRUE);
+    }
+  else
+    {
+      empathy_individual_information_dialog_show (individual, NULL);
+    }
+
+  g_object_unref (mgr);
 }
 
 static GtkWidget *
 }
 
 static GtkWidget *