[evolution] e_table_new_from_spec_file: Remove unused "state_fn" parameter.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] e_table_new_from_spec_file: Remove unused "state_fn" parameter.
- Date: Tue, 2 Jul 2013 15:27:37 +0000 (UTC)
commit f38b9b6fb7a6d7400587d517226803bf3e3aa03b
Author: Matthew Barnes <mbarnes redhat com>
Date: Sun Jun 30 19:35:22 2013 -0400
e_table_new_from_spec_file: Remove unused "state_fn" parameter.
addressbook/gui/widgets/e-addressbook-view.c | 3 +-
calendar/gui/e-cal-list-view.c | 2 +-
calendar/gui/e-memo-table.c | 5 ++-
calendar/gui/e-task-table.c | 5 ++-
e-util/e-table.c | 31 +++----------------------
e-util/e-table.h | 6 +---
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 5edbf0f..33999ef 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 275cc0c..5150ac9 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 580f378..4f1a59b 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 d16719c..7672835 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 46c7b43..3875792 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 4f147ac..e8dfbfe 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]