aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index f52d2e43c2..cde705427a 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -782,6 +782,14 @@ e_contact_print_button(GnomeDialog *dialog, gint button, gpointer data)
}
}
+static void
+display_view(GalViewCollection *collection,
+ GalView *view,
+ gpointer data)
+{
+ g_print ("title: %s\n", gal_view_get_title(view));
+}
+
void
e_addressbook_view_setup_menus (EAddressbookView *view,
BonoboUIComponent *uic)
@@ -792,6 +800,10 @@ e_addressbook_view_setup_menus (EAddressbookView *view,
ETableSpecification *spec;
collection = gal_view_collection_new();
+ /* FIXME: Memory leak. */
+ gal_view_collection_set_storage_directories(collection,
+ gnome_util_prepend_user_home("/evolution/system/"),
+ gnome_util_prepend_user_home("/evolution/galview/"));
spec = e_table_specification_new();
e_table_specification_load_from_string(spec, SPEC);
@@ -800,6 +812,8 @@ e_addressbook_view_setup_menus (EAddressbookView *view,
gal_view_collection_add_factory(collection, factory);
gtk_object_sink(GTK_OBJECT(factory));
+ gal_view_collection_load(collection);
+
#if 0
factory = e_minicard_view_factory_new();
gal_view_collection_add_factory(collection, factory);
@@ -807,8 +821,10 @@ e_addressbook_view_setup_menus (EAddressbookView *view,
#endif
views = gal_view_menus_new(collection);
- gal_view_menus_apply(views, uic, NULL);
- gtk_object_sink(GTK_OBJECT(views));
+ gal_view_menus_apply(views, uic, NULL); /* This function probably needs to sink the views object. */
+ gtk_signal_connect(GTK_OBJECT(collection), "display_view",
+ display_view, NULL);
+ /* gtk_object_sink(GTK_OBJECT(views)); */
gtk_object_sink(GTK_OBJECT(collection));
}