[evolution] e_tree_new_from_spec_file: Remove unused "state_fn" parameter.



commit 509fe2614110ce545ce63f514f5c9d76fbc98303
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Jun 30 19:48:35 2013 -0400

    e_tree_new_from_spec_file: Remove unused "state_fn" parameter.

 e-util/e-tree.c     |   32 +++++---------------------------
 e-util/e-tree.h     |    6 ++----
 mail/message-list.c |    2 +-
 3 files changed, 8 insertions(+), 32 deletions(-)
---
diff --git a/e-util/e-tree.c b/e-util/e-tree.c
index 89d0467..501a4ce 100644
--- a/e-util/e-tree.c
+++ b/e-util/e-tree.c
@@ -1680,7 +1680,6 @@ e_tree_construct (ETree *tree,
  * @etm: The model for this tree
  * @ete: An optional #ETableExtras  (%NULL is valid.)
  * @spec_fn: The filename of the spec
- * @state_fn: An optional state file  (%NULL is valid.)
  *
  * This is the internal implementation of e_tree_new_from_spec_file()
  * for use by subclasses or language bindings.  See
@@ -1692,8 +1691,7 @@ gboolean
 e_tree_construct_from_spec_file (ETree *tree,
                                  ETreeModel *etm,
                                  ETableExtras *ete,
-                                 const gchar *spec_fn,
-                                 const gchar *state_fn)
+                                 const gchar *spec_fn)
 {
        ETableSpecification *specification;
        ETableState *state;
@@ -1708,22 +1706,8 @@ e_tree_construct_from_spec_file (ETree *tree,
                g_object_unref (specification);
                return FALSE;
        }
-       if (state_fn) {
-               state = e_table_state_new (specification);
-               if (!e_table_state_load_from_file (state, state_fn)) {
-                       g_object_unref (state);
-                       state = specification->state;
-                       g_object_ref (state);
-               }
-               if (state->col_count <= 0) {
-                       g_object_unref (state);
-                       state = specification->state;
-                       g_object_ref (state);
-               }
-       } else {
-               state = specification->state;
-               g_object_ref (state);
-       }
+
+       state = g_object_ref (specification->state);
 
        if (!et_real_construct (tree, etm, ete, specification, state)) {
                g_object_unref (specification);
@@ -1785,7 +1769,6 @@ e_tree_new (ETreeModel *etm,
  * @etm: The model for this tree.
  * @ete: An optional #ETableExtras.  (%NULL is valid.)
  * @spec_fn: The filename of the spec.
- * @state_fn: An optional state file.  (%NULL is valid.)
  *
  * This is very similar to e_tree_new(), except instead of passing in
  * strings you pass in the file names of the spec and state to load.
@@ -1793,18 +1776,13 @@ e_tree_new (ETreeModel *etm,
  * @spec_fn is the filename of the spec to load.  If this file doesn't
  * exist, e_tree_new_from_spec_file will return %NULL.
  *
- * @state_fn is the filename of the initial state to load.  If this is
- * %NULL or if the specified file doesn't exist, the default state
- * from the spec file is used.
- *
  * Return value:
  * The newly created #ETree or %NULL if there's an error.
  **/
 GtkWidget *
 e_tree_new_from_spec_file (ETreeModel *etm,
                            ETableExtras *ete,
-                           const gchar *spec_fn,
-                           const gchar *state_fn)
+                           const gchar *spec_fn)
 {
        ETree *tree;
 
@@ -1814,7 +1792,7 @@ e_tree_new_from_spec_file (ETreeModel *etm,
 
        tree = g_object_new (E_TYPE_TREE, NULL);
 
-       if (!e_tree_construct_from_spec_file (tree, etm, ete, spec_fn, state_fn)) {
+       if (!e_tree_construct_from_spec_file (tree, etm, ete, spec_fn)) {
                g_object_unref (tree);
                return NULL;
        }
diff --git a/e-util/e-tree.h b/e-util/e-tree.h
index 0e64ecd..99dcfee 100644
--- a/e-util/e-tree.h
+++ b/e-util/e-tree.h
@@ -184,12 +184,10 @@ GtkWidget *       e_tree_new                      (ETreeModel *etm,
 gboolean       e_tree_construct_from_spec_file (ETree *tree,
                                                 ETreeModel *etm,
                                                 ETableExtras *ete,
-                                                const gchar *spec_fn,
-                                                const gchar *state_fn);
+                                                const gchar *spec_fn);
 GtkWidget *    e_tree_new_from_spec_file       (ETreeModel *etm,
                                                 ETableExtras *ete,
-                                                const gchar *spec_fn,
-                                                const gchar *state_fn);
+                                                const gchar *spec_fn);
 
 /* To save the state */
 gchar *                e_tree_get_state                (ETree *tree);
diff --git a/mail/message-list.c b/mail/message-list.c
index cf8f99e..e5b1595 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -3369,7 +3369,7 @@ message_list_construct (MessageList *message_list)
        constructed = e_tree_construct_from_spec_file (
                E_TREE (message_list),
                E_TREE_MODEL (message_list),
-               message_list->extras, etspecfile, NULL);
+               message_list->extras, etspecfile);
        g_free (etspecfile);
 
        adapter = e_tree_get_table_adapter (E_TREE (message_list));


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