diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-07-02 21:22:18 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-07-02 22:34:12 +0800 |
commit | f267827d67d3fd11478fbf94da9cd6095400a49c (patch) | |
tree | 29bf07f39ab001ea53bdb1bd67c32242e53c0944 /mail/e-mail-paned-view.c | |
parent | dfc653bb43a6311c04d7881c2d1b1642c081f839 (diff) | |
download | gsoc2013-evolution-f267827d67d3fd11478fbf94da9cd6095400a49c.tar gsoc2013-evolution-f267827d67d3fd11478fbf94da9cd6095400a49c.tar.gz gsoc2013-evolution-f267827d67d3fd11478fbf94da9cd6095400a49c.tar.bz2 gsoc2013-evolution-f267827d67d3fd11478fbf94da9cd6095400a49c.tar.lz gsoc2013-evolution-f267827d67d3fd11478fbf94da9cd6095400a49c.tar.xz gsoc2013-evolution-f267827d67d3fd11478fbf94da9cd6095400a49c.tar.zst gsoc2013-evolution-f267827d67d3fd11478fbf94da9cd6095400a49c.zip |
ETableSpecification: Implement GInitable.
e_table_specification_new() now takes a table specification filename and
a GError and parses the file as part of instance creation. If a file or
parse error occurs, e_table_specification_new() returns NULL.
This replaces e_table_specification_load_from_file().
New functions:
e_table_specification_get_filename()
Removed functions:
e_table_specification_load_from_file()
Diffstat (limited to 'mail/e-mail-paned-view.c')
-rw-r--r-- | mail/e-mail-paned-view.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c index c491db7150..41c98f0e23 100644 --- a/mail/e-mail-paned-view.c +++ b/mail/e-mail-paned-view.c @@ -924,15 +924,22 @@ mail_paned_view_update_view_instance (EMailView *view) ETableState *state; GalView *view; gchar *spec_filename; + GError *local_error = NULL; - spec = e_table_specification_new (); spec_filename = g_build_filename ( EVOLUTION_ETSPECDIR, "message-list.etspec", NULL); - e_table_specification_load_from_file ( - spec, spec_filename); - g_free (spec_filename); + spec = e_table_specification_new ( + spec_filename, &local_error); + + /* Failure here is fatal. */ + if (local_error != NULL) { + g_error ( + "%s: %s", spec_filename, + local_error->message); + g_assert_not_reached (); + } state = e_table_state_new (spec); view = gal_view_etable_new (spec, ""); @@ -947,6 +954,8 @@ mail_paned_view_update_view_instance (EMailView *view) g_object_unref (state); g_object_unref (view); g_object_unref (spec); + + g_free (spec_filename); } g_free (state_filename); |