[evolution] ETableHeaderItem: Avoid e_table_set_state().



commit be45fdaa0fef4672c1809ad4735f1b343835511f
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Jul 1 14:59:07 2013 -0400

    ETableHeaderItem: Avoid e_table_set_state().
    
    Use e_table_state_duplicate() and e_table_set_state_object().
    
    Similarly for e_tree_set_state().

 e-util/e-table-header-item.c |   15 +++++++++------
 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 ea7145c..1c09b78 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),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]