From 9c540f20d87d06867eac63c8378fb83ee59b9329 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Wed, 20 May 2009 13:48:34 -0400 Subject: Don't allow the user to display many map views --- src/empathy-map-view.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/empathy-map-view.c') diff --git a/src/empathy-map-view.c b/src/empathy-map-view.c index 33ee844cd..e9acdc205 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); -- cgit v1.2.3