From 457aff0a2237d4c9d69923ae14635fda58399cc1 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Wed, 6 Dec 2000 18:43:02 +0000 Subject: Moved the gal view menu stuff from here to EAddressbookView. 2000-12-06 Christopher James Lahey * gui/component/addressbook.c: Moved the gal view menu stuff from here to EAddressbookView. * gui/widgets/e-addressbook-view.c, gui/widgets/e-addressbook-view.h: New function to set up the menus for the EAddressbookView. svn path=/trunk/; revision=6814 --- addressbook/gui/widgets/e-addressbook-view.c | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'addressbook/gui/widgets/e-addressbook-view.c') diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index d0d6984faf..2eab704e37 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -29,6 +29,8 @@ #include #include #include +#include "widgets/menus/gal-view-menus.h" +#include #include "e-addressbook-model.h" @@ -672,6 +674,37 @@ e_contact_print_button(GnomeDialog *dialog, gint button, gpointer data) } } +void +e_addressbook_view_setup_menus (EAddressbookView *view, + BonoboUIComponent *uic) +{ + GalViewCollection *collection; + GalViewMenus *views; + GalViewFactory *factory; + ETableSpecification *spec; + + collection = gal_view_collection_new(); + + spec = e_table_specification_new(); + e_table_specification_load_from_string(spec, SPEC); + + factory = gal_view_factory_etable_new(spec); + gal_view_collection_add_factory(collection, factory); + gtk_object_sink(GTK_OBJECT(factory)); + +#if 0 + factory = e_minicard_view_factory_new(); + gal_view_collection_add_factory(collection, factory); + gtk_object_sink(GTK_OBJECT(factory)); +#endif + + views = gal_view_menus_new(collection); + gal_view_menus_apply(views, uic, NULL); + gtk_object_sink(GTK_OBJECT(views)); + + gtk_object_sink(GTK_OBJECT(collection)); +} + void e_addressbook_view_print(EAddressbookView *view) { -- cgit v1.2.3