aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-07-01 07:35:22 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-02 22:34:10 +0800
commitf38b9b6fb7a6d7400587d517226803bf3e3aa03b (patch)
tree84922a08e5f0625cdb7a9458168149b24f814062
parent27c8788ce83ee646fddebeece57c7aecc04c7d38 (diff)
downloadgsoc2013-evolution-f38b9b6fb7a6d7400587d517226803bf3e3aa03b.tar
gsoc2013-evolution-f38b9b6fb7a6d7400587d517226803bf3e3aa03b.tar.gz
gsoc2013-evolution-f38b9b6fb7a6d7400587d517226803bf3e3aa03b.tar.bz2
gsoc2013-evolution-f38b9b6fb7a6d7400587d517226803bf3e3aa03b.tar.lz
gsoc2013-evolution-f38b9b6fb7a6d7400587d517226803bf3e3aa03b.tar.xz
gsoc2013-evolution-f38b9b6fb7a6d7400587d517226803bf3e3aa03b.tar.zst
gsoc2013-evolution-f38b9b6fb7a6d7400587d517226803bf3e3aa03b.zip
e_table_new_from_spec_file: Remove unused "state_fn" parameter.
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c3
-rw-r--r--calendar/gui/e-cal-list-view.c2
-rw-r--r--calendar/gui/e-memo-table.c5
-rw-r--r--calendar/gui/e-task-table.c5
-rw-r--r--e-util/e-table.c31
-rw-r--r--e-util/e-table.h6
6 files changed, 14 insertions, 38 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 5edbf0fe60..33999ef702 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -305,8 +305,7 @@ addressbook_view_create_table_view (EAddressbookView *view,
* initial layout. It does the rest. */
etspecfile = g_build_filename (
EVOLUTION_ETSPECDIR, "e-addressbook-view.etspec", NULL);
- widget = e_table_new_from_spec_file (
- adapter, extras, etspecfile, NULL);
+ widget = e_table_new_from_spec_file (adapter, extras, etspecfile);
gtk_container_add (GTK_CONTAINER (view), widget);
g_free (etspecfile);
diff --git a/calendar/gui/e-cal-list-view.c b/calendar/gui/e-cal-list-view.c
index 275cc0c0dd..5150ac9f72 100644
--- a/calendar/gui/e-cal-list-view.c
+++ b/calendar/gui/e-cal-list-view.c
@@ -311,7 +311,7 @@ setup_e_table (ECalListView *cal_list_view)
etspecfile = g_build_filename (
EVOLUTION_ETSPECDIR, "e-cal-list-view.etspec", NULL);
widget = e_table_new_from_spec_file (
- E_TABLE_MODEL (model), extras, etspecfile, NULL);
+ E_TABLE_MODEL (model), extras, etspecfile);
gtk_container_add (GTK_CONTAINER (container), widget);
cal_list_view->table = E_TABLE (widget);
gtk_widget_show (widget);
diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c
index 580f378083..4f1a59ba7b 100644
--- a/calendar/gui/e-memo-table.c
+++ b/calendar/gui/e-memo-table.c
@@ -408,8 +408,9 @@ memo_table_constructed (GObject *object)
etspecfile = g_build_filename (
EVOLUTION_ETSPECDIR, "e-memo-table.etspec", NULL);
e_table_construct_from_spec_file (
- E_TABLE (memo_table), E_TABLE_MODEL (model),
- extras, etspecfile, NULL);
+ E_TABLE (memo_table),
+ E_TABLE_MODEL (model),
+ extras, etspecfile);
g_free (etspecfile);
gtk_widget_set_has_tooltip (GTK_WIDGET (memo_table), TRUE);
diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c
index d16719cd4c..7672835989 100644
--- a/calendar/gui/e-task-table.c
+++ b/calendar/gui/e-task-table.c
@@ -695,8 +695,9 @@ task_table_constructed (GObject *object)
etspecfile = g_build_filename (
EVOLUTION_ETSPECDIR, "e-calendar-table.etspec", NULL);
e_table_construct_from_spec_file (
- E_TABLE (task_table), E_TABLE_MODEL (model),
- extras, etspecfile, NULL);
+ E_TABLE (task_table),
+ E_TABLE_MODEL (model),
+ extras, etspecfile);
g_free (etspecfile);
gtk_widget_set_has_tooltip (GTK_WIDGET (task_table), TRUE);
diff --git a/e-util/e-table.c b/e-util/e-table.c
index 46c7b43147..3875792bd1 100644
--- a/e-util/e-table.c
+++ b/e-util/e-table.c
@@ -1948,7 +1948,6 @@ e_table_construct (ETable *e_table,
* @etm: The model for this table.
* @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_table_new_from_spec_file()
* for use by subclasses or language bindings. See
@@ -1961,8 +1960,7 @@ ETable *
e_table_construct_from_spec_file (ETable *e_table,
ETableModel *etm,
ETableExtras *ete,
- const gchar *spec_fn,
- const gchar *state_fn)
+ const gchar *spec_fn)
{
ETableSpecification *specification;
ETableState *state;
@@ -1978,22 +1976,7 @@ e_table_construct_from_spec_file (ETable *e_table,
return NULL;
}
- 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);
e_table = et_real_construct (e_table, etm, ete, specification, state);
@@ -2046,7 +2029,6 @@ e_table_new (ETableModel *etm,
* @etm: The model for this table.
* @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_table_new(), except instead of passing in
* strings you pass in the file names of the spec and state to load.
@@ -2054,18 +2036,13 @@ e_table_new (ETableModel *etm,
* @spec_fn is the filename of the spec to load. If this file doesn't
* exist, e_table_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 #ETable or %NULL if there's an error.
**/
GtkWidget *
e_table_new_from_spec_file (ETableModel *etm,
ETableExtras *ete,
- const gchar *spec_fn,
- const gchar *state_fn)
+ const gchar *spec_fn)
{
ETable *e_table;
@@ -2075,7 +2052,7 @@ e_table_new_from_spec_file (ETableModel *etm,
e_table = g_object_new (E_TYPE_TABLE, NULL);
- e_table = e_table_construct_from_spec_file (e_table, etm, ete, spec_fn, state_fn);
+ e_table = e_table_construct_from_spec_file (e_table, etm, ete, spec_fn);
return GTK_WIDGET (e_table);
}
diff --git a/e-util/e-table.h b/e-util/e-table.h
index 4f147ac130..e8dfbfeeb1 100644
--- a/e-util/e-table.h
+++ b/e-util/e-table.h
@@ -280,12 +280,10 @@ ETable * e_table_construct_from_spec_file
(ETable *e_table,
ETableModel *etm,
ETableExtras *ete,
- const gchar *spec_fn,
- const gchar *state_fn);
+ const gchar *spec_fn);
GtkWidget * e_table_new_from_spec_file (ETableModel *etm,
ETableExtras *ete,
- const gchar *spec_fn,
- const gchar *state_fn);
+ const gchar *spec_fn);
/* To save the state */
gchar * e_table_get_state (ETable *e_table);