[empathy] Don't allow the user to display many map views



commit 9c540f20d87d06867eac63c8378fb83ee59b9329
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date:   Wed May 20 13:48:34 2009 -0400

    Don't allow the user to display many map views
---
 src/empathy-map-view.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c
index 33ee844..e9acdc2 100644
--- a/src/empathy-map-view.c
+++ b/src/empathy-map-view.c
@@ -73,7 +73,6 @@ static void map_view_contact_location_notify (GObject *gobject,
 static gchar * get_dup_string (GHashTable *location,
     gchar *key);
 
-/* FIXME: Make it so that only one window can be shown */
 GtkWidget *
 empathy_map_view_show ()
 {
@@ -86,13 +85,11 @@ empathy_map_view_show ()
   EmpathyContactList *list_iface;
   EmpathyContactListStore *list_store;
 
-  /*
   if (window)
     {
       empathy_window_present (GTK_WINDOW (window->window), TRUE);
       return window->window;
     }
-  */
 
   window = g_slice_new0 (EmpathyMapView);
 
@@ -114,6 +111,9 @@ empathy_map_view_show ()
 
   g_object_unref (gui);
 
+  /* Clear the static pointer to window if the dialog is destroyed */
+  g_object_add_weak_pointer (G_OBJECT (window->window), (gpointer *) &window);
+
   list_iface = EMPATHY_CONTACT_LIST (empathy_contact_manager_dup_singleton ());
   list_store = empathy_contact_list_store_new (list_iface);
   empathy_contact_list_store_set_show_groups (list_store, FALSE);



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