]> git.0d.be Git - empathy.git/commitdiff
Use its own ListStore of contacts instead of borrowing the Contact
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Tue, 7 Apr 2009 21:41:23 +0000 (17:41 -0400)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Wed, 27 May 2009 16:52:05 +0000 (12:52 -0400)
List's

src/empathy-main-window.c
src/empathy-map-view.c
src/empathy-map-view.h

index b21464834ee59b8041d947ebed18047e8c217a39..0ff054faab83b6862ca9d554d03769af08db0a32 100644 (file)
@@ -720,7 +720,7 @@ static void
 main_window_view_show_map_cb (GtkCheckMenuItem  *item,
                              EmpathyMainWindow *window)
 {
-       empathy_map_view_show (window->list_store);
+       empathy_map_view_show ();
 }
 #endif
 
index a0ca3f5b5fcae77ff23d683d27ecfd026ca72a0d..dd9f00f2a8144c6894fefa626503aa22fb2930a2 100644 (file)
@@ -89,7 +89,7 @@ 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 (EmpathyContactListStore *list_store)
+empathy_map_view_show ()
 {
   static EmpathyMapView *window = NULL;
   GtkBuilder *gui;
@@ -97,6 +97,8 @@ empathy_map_view_show (EmpathyContactListStore *list_store)
   GtkWidget *embed;
   gchar *filename;
   GtkTreeModel *model;
+  EmpathyContactList *list_iface;
+  EmpathyContactListStore *list_store;
 
   /*
   if (window)
@@ -121,6 +123,10 @@ empathy_map_view_show (EmpathyContactListStore *list_store)
 
   g_object_unref (gui);
 
+  list_iface = EMPATHY_CONTACT_LIST (empathy_contact_manager_dup_singleton ());
+  list_store = empathy_contact_list_store_new (list_iface);
+  g_object_unref (list_iface);
+
   window->list_store = list_store;
 
   /* Set up map view */
index bad93da96a9f839b84272b9f2b4b6c1d168af617..45ecbdd921be42a18a79182a381c9f66e5d67006 100644 (file)
@@ -26,7 +26,7 @@
 
 G_BEGIN_DECLS
 
-GtkWidget *empathy_map_view_show (EmpathyContactListStore *list_store);
+GtkWidget *empathy_map_view_show (void);
 
 G_END_DECLS