[evolution] e-mail-reader-utils.c: Avoid e_tree_get_state().



commit 7329de1078e5fbb71ab4dc7315f8f14b5956cc92
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Jul 1 15:06:26 2013 -0400

    e-mail-reader-utils.c: Avoid e_tree_get_state().
    
    Use e_tree_get_state_object() and e_tree_set_state_object() instead to
    transfer state info from one ETree instance to another.

 mail/e-mail-reader-utils.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c
index b50a06b..5fb7c64 100644
--- a/mail/e-mail-reader-utils.c
+++ b/mail/e-mail-reader-utils.c
@@ -779,7 +779,7 @@ copy_tree_state (EMailReader *src_reader,
                  EMailReader *des_reader)
 {
        GtkWidget *src_mlist, *des_mlist;
-       gchar *state;
+       ETableState *state;
 
        g_return_if_fail (src_reader != NULL);
        g_return_if_fail (des_reader != NULL);
@@ -792,10 +792,9 @@ copy_tree_state (EMailReader *src_reader,
        if (!des_mlist)
                return;
 
-       state = e_tree_get_state (E_TREE (src_mlist));
-       if (state)
-               e_tree_set_state (E_TREE (des_mlist), state);
-       g_free (state);
+       state = e_tree_get_state_object (E_TREE (src_mlist));
+       e_tree_set_state_object (E_TREE (des_mlist), state);
+       g_object_unref (state);
 
        message_list_set_search (MESSAGE_LIST (des_mlist), MESSAGE_LIST (src_mlist)->search);
 }


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