aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-07-02 02:59:07 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-02 22:34:12 +0800
commitbe45fdaa0fef4672c1809ad4735f1b343835511f (patch)
tree7d5d3cc5b701e80eb279838aa16f6c6feeef2186 /e-util
parent8654242ffdee210b28c646719f0d9aa655b68117 (diff)
downloadgsoc2013-evolution-be45fdaa0fef4672c1809ad4735f1b343835511f.tar.gz
gsoc2013-evolution-be45fdaa0fef4672c1809ad4735f1b343835511f.tar.zst
gsoc2013-evolution-be45fdaa0fef4672c1809ad4735f1b343835511f.zip
ETableHeaderItem: Avoid e_table_set_state().
Use e_table_state_duplicate() and e_table_set_state_object(). Similarly for e_tree_set_state().
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-table-header-item.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/e-util/e-table-header-item.c b/e-util/e-table-header-item.c
index ea7145c844..1c09b78aa6 100644
--- a/e-util/e-table-header-item.c
+++ b/e-util/e-table-header-item.c
@@ -1533,13 +1533,16 @@ static void
apply_changes (ETableConfig *config,
ETableHeaderItem *ethi)
{
- gchar *state = e_table_state_save_to_string (config->state);
+ ETableState *state;
- if (ethi->table)
- e_table_set_state (ethi->table, state);
- if (ethi->tree)
- e_tree_set_state (ethi->tree, state);
- g_free (state);
+ state = e_table_state_duplicate (config->state);
+
+ if (ethi->table != NULL)
+ e_table_set_state_object (ethi->table, state);
+ if (ethi->tree != NULL)
+ e_tree_set_state_object (ethi->tree, state);
+
+ g_object_unref (state);
gtk_dialog_set_response_sensitive (
GTK_DIALOG (config->dialog_toplevel),