aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-07-02 02:12:18 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-02 22:34:11 +0800
commita5f7b4eef62959ededefbcb2e030f4801db74041 (patch)
tree5547adf69f52cf68cf03819961f825f08d46e7cf
parentaeefcadc778590ae8e1a7d0ae704fb5adf809815 (diff)
downloadgsoc2013-evolution-a5f7b4eef62959ededefbcb2e030f4801db74041.tar
gsoc2013-evolution-a5f7b4eef62959ededefbcb2e030f4801db74041.tar.gz
gsoc2013-evolution-a5f7b4eef62959ededefbcb2e030f4801db74041.tar.bz2
gsoc2013-evolution-a5f7b4eef62959ededefbcb2e030f4801db74041.tar.lz
gsoc2013-evolution-a5f7b4eef62959ededefbcb2e030f4801db74041.tar.xz
gsoc2013-evolution-a5f7b4eef62959ededefbcb2e030f4801db74041.tar.zst
gsoc2013-evolution-a5f7b4eef62959ededefbcb2e030f4801db74041.zip
Remove e_tree_new_from_spec_file().
Also remove e_tree_construct_from_spec_file(). Use e_tree_new() or e_tree_construct() instead.
-rw-r--r--doc/reference/evolution-util/evolution-util-sections.txt2
-rw-r--r--e-util/e-tree.c85
-rw-r--r--e-util/e-tree.h9
-rw-r--r--mail/message-list.c11
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 79ab655ff9..15e629cca7 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 5cea79cf16..c7c6b870a8 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 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);
diff --git a/mail/message-list.c b/mail/message-list.c
index e5b1595a4f..2774ec690e 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));