aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-07-03 06:44:46 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-06 04:40:49 +0800
commitc6d3ced98a3faeccf4acd180435e5a36005fc4a2 (patch)
treeff5a2c9ee90f53ce56fe37049cfcc342cdd5086b /mail
parent1f84c2af9842a0e3da42abb0d1a02b3b02f6740f (diff)
downloadgsoc2013-evolution-c6d3ced98a3faeccf4acd180435e5a36005fc4a2.tar
gsoc2013-evolution-c6d3ced98a3faeccf4acd180435e5a36005fc4a2.tar.gz
gsoc2013-evolution-c6d3ced98a3faeccf4acd180435e5a36005fc4a2.tar.bz2
gsoc2013-evolution-c6d3ced98a3faeccf4acd180435e5a36005fc4a2.tar.lz
gsoc2013-evolution-c6d3ced98a3faeccf4acd180435e5a36005fc4a2.tar.xz
gsoc2013-evolution-c6d3ced98a3faeccf4acd180435e5a36005fc4a2.tar.zst
gsoc2013-evolution-c6d3ced98a3faeccf4acd180435e5a36005fc4a2.zip
GalViewEtable: Remove ETableSpecification member.
Instead, lazily load the state file once an ETable or ETree is attached, since we need its ETableSpecification to create an ETableState instance. This means GalViewFactoryEtable can lose its ETableSpecification too.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-paned-view.c39
1 files changed, 8 insertions, 31 deletions
diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c
index e0c63992c8..2aa602b9b2 100644
--- a/mail/e-mail-paned-view.c
+++ b/mail/e-mail-paned-view.c
@@ -925,42 +925,19 @@ mail_paned_view_update_view_instance (EMailView *view)
folder, "et-header-");
if (g_file_test (state_filename, G_FILE_TEST_IS_REGULAR)) {
- ETableSpecification *spec;
- ETableState *state;
GalView *view;
- gchar *spec_filename;
- GError *local_error = NULL;
-
- spec_filename = g_build_filename (
- EVOLUTION_ETSPECDIR,
- "message-list.etspec",
- NULL);
- 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, "");
-
- e_table_state_load_from_file (
- state, state_filename);
- gal_view_etable_set_state (
- GAL_VIEW_ETABLE (view), state);
+
+ view = gal_view_etable_new ("");
+
+ /* XXX This only stashes the filename in the view.
+ * The state file is not actually loaded until
+ * the MessageList is attached to the view. */
+ gal_view_load (view, state_filename);
+
gal_view_instance_set_custom_view (
view_instance, view);
- g_object_unref (state);
g_object_unref (view);
- g_object_unref (spec);
-
- g_free (spec_filename);
}
g_free (state_filename);