[empathy] individual-view: don't display menu if empathy_folks_individual_contains_contact() fails



commit 20772a7c205e54e4b5f28d14e279691459efaf1a
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Wed Nov 9 15:20:23 2011 +0100

    individual-view: don't display menu if empathy_folks_individual_contains_contact() fails
    
    The individual menu already asserts that's the case. And there is no point
    displaying a menu anyway.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=663763

 libempathy-gtk/empathy-individual-view.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 547af24..440680b 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -2627,6 +2627,9 @@ empathy_individual_view_get_individual_menu (EmpathyIndividualView *view)
   if (individual == NULL)
     return NULL;
 
+  if (!empathy_folks_individual_contains_contact (individual))
+    goto out;
+
   /* If any of the Individual's personas can be removed, add an option to
    * remove. This will act as a best-effort option. If any Personas cannot be
    * removed from the server, then this option will just be inactive upon
@@ -2681,6 +2684,7 @@ empathy_individual_view_get_individual_menu (EmpathyIndividualView *view)
   g_signal_connect (menu, "link-contacts-activated",
       (GCallback) individual_menu_link_contacts_activated_cb, view);
 
+out:
   g_object_unref (individual);
 
   return menu;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]