From 50302d03b3ce145b165db2ddef4e92ad190cbef9 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 4 Aug 2009 15:04:02 +0200 Subject: Bug #205137 - Configurable date formats in components --- addressbook/gui/widgets/e-addressbook-view.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'addressbook/gui') diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 601e7f9546..c606530594 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -26,6 +26,7 @@ #include #include #include
+#include
#include #include #include @@ -267,19 +268,27 @@ static void addressbook_view_create_table_view (EAddressbookView *view) { ETableModel *adapter; + ETableExtras *extras; + ECell *cell; ETable *table; GtkWidget *widget; gchar *etspecfile; adapter = eab_table_adapter_new (view->priv->model); + extras = e_table_extras_new (); + + /* Set proper format component for a default 'date' cell renderer. */ + cell = e_table_extras_get_cell (extras, "date"); + e_cell_date_set_format_component (E_CELL_DATE (cell), "addressbook"); + /* Here we create the table. We give it the three pieces of the table we've created, the header, the model, and the initial layout. It does the rest. */ etspecfile = g_build_filename ( EVOLUTION_ETSPECDIR, "e-addressbook-view.etspec", NULL); widget = e_table_scrolled_new_from_spec_file ( - adapter, NULL, etspecfile, NULL); + adapter, extras, etspecfile, NULL); table = E_TABLE (E_TABLE_SCROLLED (widget)->table); g_free (etspecfile); -- cgit v1.2.3