diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2001-01-26 00:17:33 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-01-26 00:17:33 +0800 |
commit | c7e8d6e6a473a3846e5b737d47c529e44c3ae7fd (patch) | |
tree | d31bcaed8481939da1ca5bcc5f63b0bd0f70775b | |
parent | 2d632be953894e8c6fd75284a750cefe4655327b (diff) | |
download | gsoc2013-evolution-c7e8d6e6a473a3846e5b737d47c529e44c3ae7fd.tar gsoc2013-evolution-c7e8d6e6a473a3846e5b737d47c529e44c3ae7fd.tar.gz gsoc2013-evolution-c7e8d6e6a473a3846e5b737d47c529e44c3ae7fd.tar.bz2 gsoc2013-evolution-c7e8d6e6a473a3846e5b737d47c529e44c3ae7fd.tar.lz gsoc2013-evolution-c7e8d6e6a473a3846e5b737d47c529e44c3ae7fd.tar.xz gsoc2013-evolution-c7e8d6e6a473a3846e5b737d47c529e44c3ae7fd.tar.zst gsoc2013-evolution-c7e8d6e6a473a3846e5b737d47c529e44c3ae7fd.zip |
Setup the view collection properly and handle the "display_view" signal.
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.
svn path=/trunk/; revision=7810
-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)); } |