aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-addressbook-view.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2001-02-06 05:23:28 +0800
committerChris Lahey <clahey@src.gnome.org>2001-02-06 05:23:28 +0800
commit6240b1cdde1fe0f00f1ffce9295c6e9b2adcc817 (patch)
tree63b39d850bab3ac7d4b1bc2ad2fa6a4704f1c33b /addressbook/gui/widgets/e-addressbook-view.c
parentfdb765da597c1929ffc8d5275e74b78f5624fe60 (diff)
downloadgsoc2013-evolution-6240b1cdde1fe0f00f1ffce9295c6e9b2adcc817.tar
gsoc2013-evolution-6240b1cdde1fe0f00f1ffce9295c6e9b2adcc817.tar.gz
gsoc2013-evolution-6240b1cdde1fe0f00f1ffce9295c6e9b2adcc817.tar.bz2
gsoc2013-evolution-6240b1cdde1fe0f00f1ffce9295c6e9b2adcc817.tar.lz
gsoc2013-evolution-6240b1cdde1fe0f00f1ffce9295c6e9b2adcc817.tar.xz
gsoc2013-evolution-6240b1cdde1fe0f00f1ffce9295c6e9b2adcc817.tar.zst
gsoc2013-evolution-6240b1cdde1fe0f00f1ffce9295c6e9b2adcc817.zip
Added gal-view-factory-minicard.c, gal-view-factory-minicard.h,
2001-02-05 Christopher James Lahey <clahey@helixcode.com> * gui/widgets/Makefile.am (libeminicard_a_SOURCES): Added gal-view-factory-minicard.c, gal-view-factory-minicard.h, gal-view-minicard.c, and gal-view-minicard.h. * gui/widgets/gal-view-factory-minicard.c, gui/widgets/gal-view-factory-minicard.h, gui/widgets/gal-view-minicard.c, and gui/widgets/gal-view-minicard.h: New classes for minicard view type. * gui/widgets/e-addressbook-view.c: Deploy gal-view stuff properly. svn path=/trunk/; revision=7987
Diffstat (limited to 'addressbook/gui/widgets/e-addressbook-view.c')
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index cde705427a..9a322a8cbf 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -30,7 +30,12 @@
#include <gal/widgets/e-scroll-frame.h>
#include <gal/widgets/e-popup-menu.h>
#include "widgets/menus/gal-view-menus.h"
+
#include <gal/menus/gal-view-factory-etable.h>
+#include <gal/menus/gal-view-etable.h>
+
+#include "gal-view-factory-minicard.h"
+#include "gal-view-minicard.h"
#include "e-addressbook-model.h"
@@ -787,7 +792,13 @@ display_view(GalViewCollection *collection,
GalView *view,
gpointer data)
{
- g_print ("title: %s\n", gal_view_get_title(view));
+ EAddressbookView *address_view = data;
+ if (GAL_IS_VIEW_ETABLE(view)) {
+ change_view_type (address_view, E_ADDRESSBOOK_VIEW_TABLE);
+ e_table_set_state_object(e_table_scrolled_get_table(E_TABLE_SCROLLED(address_view->widget)), GAL_VIEW_ETABLE(view)->state);
+ } else if (GAL_IS_VIEW_MINICARD(view)) {
+ change_view_type (address_view, E_ADDRESSBOOK_VIEW_MINICARD);
+ }
}
void
@@ -812,18 +823,16 @@ 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();
+ factory = gal_view_factory_minicard_new();
gal_view_collection_add_factory(collection, factory);
gtk_object_sink(GTK_OBJECT(factory));
-#endif
+
+ gal_view_collection_load(collection);
views = gal_view_menus_new(collection);
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);
+ display_view, view);
/* gtk_object_sink(GTK_OBJECT(views)); */
gtk_object_sink(GTK_OBJECT(collection));