diff options
author | Milan Crha <mcrha@redhat.com> | 2009-08-04 21:04:02 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-08-12 03:44:27 +0800 |
commit | 50302d03b3ce145b165db2ddef4e92ad190cbef9 (patch) | |
tree | 4a804f72f256ef774d6f0f23c84643e42cc10083 /addressbook/gui | |
parent | cd6f86108bfc34db41de71f1e00c7e7768cb4816 (diff) | |
download | gsoc2013-evolution-50302d03b3ce145b165db2ddef4e92ad190cbef9.tar gsoc2013-evolution-50302d03b3ce145b165db2ddef4e92ad190cbef9.tar.gz gsoc2013-evolution-50302d03b3ce145b165db2ddef4e92ad190cbef9.tar.bz2 gsoc2013-evolution-50302d03b3ce145b165db2ddef4e92ad190cbef9.tar.lz gsoc2013-evolution-50302d03b3ce145b165db2ddef4e92ad190cbef9.tar.xz gsoc2013-evolution-50302d03b3ce145b165db2ddef4e92ad190cbef9.tar.zst gsoc2013-evolution-50302d03b3ce145b165db2ddef4e92ad190cbef9.zip |
Bug #205137 - Configurable date formats in components
Diffstat (limited to 'addressbook/gui')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 11 |
1 files changed, 10 insertions, 1 deletions
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 <glib/gi18n.h> #include <table/e-table-scrolled.h> #include <table/e-table-model.h> +#include <table/e-cell-date.h> #include <misc/e-gui-utils.h> #include <widgets/menus/gal-view-factory-etable.h> #include <filter/rule-editor.h> @@ -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); |