aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2001-01-26 00:17:33 +0800
committerChris Lahey <clahey@src.gnome.org>2001-01-26 00:17:33 +0800
commitc7e8d6e6a473a3846e5b737d47c529e44c3ae7fd (patch)
treed31bcaed8481939da1ca5bcc5f63b0bd0f70775b /addressbook/gui
parent2d632be953894e8c6fd75284a750cefe4655327b (diff)
downloadgsoc2013-evolution-c7e8d6e6a473a3846e5b737d47c529e44c3ae7fd.tar.gz
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
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));
}