From a5f7b4eef62959ededefbcb2e030f4801db74041 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 1 Jul 2013 14:12:18 -0400 Subject: Remove e_tree_new_from_spec_file(). Also remove e_tree_construct_from_spec_file(). Use e_tree_new() or e_tree_construct() instead. --- e-util/e-tree.c | 85 --------------------------------------------------------- e-util/e-tree.h | 9 ------ 2 files changed, 94 deletions(-) (limited to 'e-util') diff --git a/e-util/e-tree.c b/e-util/e-tree.c index 5cea79cf16..c7c6b870a8 100644 --- a/e-util/e-tree.c +++ b/e-util/e-tree.c @@ -1663,55 +1663,6 @@ e_tree_construct (ETree *tree, return TRUE; } -/** - * 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 @@ -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 99725df3aa..e88c2e0b47 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); -- cgit v1.2.3