[empathy] individual-menu: only use 'gnome-contacts' with individuals from Folks
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] individual-menu: only use 'gnome-contacts' with individuals from Folks
- Date: Tue, 13 Mar 2012 10:20:21 +0000 (UTC)
commit 8daec6589cf7dbd0be2c4f6548234d48d0f5b44a
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Mar 12 15:23:30 2012 +0100
individual-menu: only use 'gnome-contacts' with individuals from Folks
https://bugzilla.gnome.org/show_bug.cgi?id=671884
libempathy-gtk/empathy-individual-menu.c | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c
index 7b8da52..22d3148 100644
--- a/libempathy-gtk/empathy-individual-menu.c
+++ b/libempathy-gtk/empathy-individual-menu.c
@@ -53,6 +53,7 @@
#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>
@@ -1364,7 +1365,24 @@ static void
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 *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]