[evolution] Remove e_tree_new_from_spec_file().



commit a5f7b4eef62959ededefbcb2e030f4801db74041
Author: Matthew Barnes <mbarnes redhat com>
Date:   Mon Jul 1 14:12:18 2013 -0400

    Remove e_tree_new_from_spec_file().
    
    Also remove e_tree_construct_from_spec_file().
    
    Use e_tree_new() or e_tree_construct() instead.

 .../evolution-util/evolution-util-sections.txt     |    2 -
 e-util/e-tree.c                                    |   85 --------------------
 e-util/e-tree.h                                    |    9 --
 mail/message-list.c                                |   11 ++-
 4 files changed, 8 insertions(+), 99 deletions(-)
---
diff --git a/doc/reference/evolution-util/evolution-util-sections.txt 
b/doc/reference/evolution-util/evolution-util-sections.txt
index 79ab655..15e629c 100644
--- a/doc/reference/evolution-util/evolution-util-sections.txt
+++ b/doc/reference/evolution-util/evolution-util-sections.txt
@@ -4113,8 +4113,6 @@ ETimezoneDialogPrivate
 ETree
 e_tree_construct
 e_tree_new
-e_tree_construct_from_spec_file
-e_tree_new_from_spec_file
 e_tree_get_state
 e_tree_get_state_object
 e_tree_get_spec
diff --git a/e-util/e-tree.c b/e-util/e-tree.c
index 5cea79c..c7c6b87 100644
--- a/e-util/e-tree.c
+++ b/e-util/e-tree.c
@@ -1664,55 +1664,6 @@ e_tree_construct (ETree *tree,
 }
 
 /**
- * e_tree_construct_from_spec_file:
- * @tree: The newly created #ETree object.
- * @etm: The model for this tree
- * @ete: An optional #ETableExtras  (%NULL is valid.)
- * @spec_fn: The filename of the spec
- *
- * This is the internal implementation of e_tree_new_from_spec_file()
- * for use by subclasses or language bindings.  See
- * e_tree_new_from_spec_file() for details.
- *
- * Return value: %TRUE on success, %FALSE if an error occurred
- **/
-gboolean
-e_tree_construct_from_spec_file (ETree *tree,
-                                 ETreeModel *etm,
-                                 ETableExtras *ete,
-                                 const gchar *spec_fn)
-{
-       ETableSpecification *specification;
-       ETableState *state;
-
-       g_return_val_if_fail (E_IS_TREE (tree), FALSE);
-       g_return_val_if_fail (E_IS_TREE_MODEL (etm), FALSE);
-       g_return_val_if_fail (ete == NULL || E_IS_TABLE_EXTRAS (ete), FALSE);
-       g_return_val_if_fail (spec_fn != NULL, FALSE);
-
-       specification = e_table_specification_new ();
-       if (!e_table_specification_load_from_file (specification, spec_fn)) {
-               g_object_unref (specification);
-               return FALSE;
-       }
-
-       state = g_object_ref (specification->state);
-
-       if (!et_real_construct (tree, etm, ete, specification, state)) {
-               g_object_unref (specification);
-               g_object_unref (state);
-               return FALSE;
-       }
-
-       tree->priv->spec = specification;
-       tree->priv->spec->allow_grouping = FALSE;
-
-       g_object_unref (state);
-
-       return TRUE;
-}
-
-/**
  * e_tree_new:
  * @etm: The model for this tree
  * @ete: An optional #ETableExtras  (%NULL is valid.)
@@ -1752,42 +1703,6 @@ e_tree_new (ETreeModel *etm,
        return GTK_WIDGET (tree);
 }
 
-/**
- * e_tree_new_from_spec_file:
- * @etm: The model for this tree.
- * @ete: An optional #ETableExtras.  (%NULL is valid.)
- * @spec_fn: The filename of the spec.
- *
- * 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.
- *
- * @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.
- *
- * 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)
-{
-       ETree *tree;
-
-       g_return_val_if_fail (E_IS_TREE_MODEL (etm), NULL);
-       g_return_val_if_fail (ete == NULL || E_IS_TABLE_EXTRAS (ete), NULL);
-       g_return_val_if_fail (spec_fn != NULL, NULL);
-
-       tree = g_object_new (E_TYPE_TREE, NULL);
-
-       if (!e_tree_construct_from_spec_file (tree, etm, ete, spec_fn)) {
-               g_object_unref (tree);
-               return NULL;
-       }
-
-       return (GtkWidget *) tree;
-}
-
 void
 e_tree_show_cursor_after_reflow (ETree *tree)
 {
diff --git a/e-util/e-tree.h b/e-util/e-tree.h
index 99725df..e88c2e0 100644
--- a/e-util/e-tree.h
+++ b/e-util/e-tree.h
@@ -180,15 +180,6 @@ GtkWidget *        e_tree_new                      (ETreeModel *etm,
                                                 ETableExtras *ete,
                                                 ETableSpecification *specification);
 
-/* Create an ETree using files. */
-gboolean       e_tree_construct_from_spec_file (ETree *tree,
-                                                ETreeModel *etm,
-                                                ETableExtras *ete,
-                                                const gchar *spec_fn);
-GtkWidget *    e_tree_new_from_spec_file       (ETreeModel *etm,
-                                                ETableExtras *ete,
-                                                const gchar *spec_fn);
-
 /* To save the state */
 gchar *                e_tree_get_state                (ETree *tree);
 ETableState *  e_tree_get_state_object         (ETree *tree);
diff --git a/mail/message-list.c b/mail/message-list.c
index e5b1595..2774ec6 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -3356,6 +3356,7 @@ static void
 message_list_construct (MessageList *message_list)
 {
        ETreeTableAdapter *adapter;
+       ETableSpecification *specification;
        AtkObject *a11y;
        gboolean constructed;
        gchar *etspecfile;
@@ -3365,11 +3366,15 @@ message_list_construct (MessageList *message_list)
         */
        message_list->extras = message_list_create_extras ();
 
-       etspecfile = g_build_filename (EVOLUTION_ETSPECDIR, "message-list.etspec", NULL);
-       constructed = e_tree_construct_from_spec_file (
+       etspecfile = g_build_filename (
+               EVOLUTION_ETSPECDIR, "message-list.etspec", NULL);
+       specification = e_table_specification_new ();
+       e_table_specification_load_from_file (specification, etspecfile);
+       constructed = e_tree_construct (
                E_TREE (message_list),
                E_TREE_MODEL (message_list),
-               message_list->extras, etspecfile);
+               message_list->extras, specification);
+       g_object_unref (specification);
        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]