aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-07-01 07:48:35 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-02 22:34:11 +0800
commit509fe2614110ce545ce63f514f5c9d76fbc98303 (patch)
tree0726c359d1c782972da947a70ff142b97a509639
parentaa505e7fe9ab95e6dab95ee9a454c17d92d07eea (diff)
downloadgsoc2013-evolution-509fe2614110ce545ce63f514f5c9d76fbc98303.tar
gsoc2013-evolution-509fe2614110ce545ce63f514f5c9d76fbc98303.tar.gz
gsoc2013-evolution-509fe2614110ce545ce63f514f5c9d76fbc98303.tar.bz2
gsoc2013-evolution-509fe2614110ce545ce63f514f5c9d76fbc98303.tar.lz
gsoc2013-evolution-509fe2614110ce545ce63f514f5c9d76fbc98303.tar.xz
gsoc2013-evolution-509fe2614110ce545ce63f514f5c9d76fbc98303.tar.zst
gsoc2013-evolution-509fe2614110ce545ce63f514f5c9d76fbc98303.zip
e_tree_new_from_spec_file: Remove unused "state_fn" parameter.
-rw-r--r--e-util/e-tree.c32
-rw-r--r--e-util/e-tree.h6
-rw-r--r--mail/message-list.c2
3 files changed, 8 insertions, 32 deletions
diff --git a/e-util/e-tree.c b/e-util/e-tree.c
index 89d04676a6..501a4ce967 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 0e64ecdf82..99dcfee762 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 cf8f99ecc1..e5b1595a4f 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));