diff options
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 6 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 20 |
2 files changed, 24 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index d83c2d57ae..6b26a56023 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2001-01-25 Christopher James Lahey <clahey@helixcode.com> + + * gui/widgets/e-addressbook-view.c + (e_addressbook_view_setup_menus): Setup the view collection + properly and handle the "display_view" signal. + 2001-01-25 Ettore Perazzoli <ettore@ximian.com> * gui/component/addressbook.c (update_pixmaps): Consider the 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)); } |