aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-10-16 06:32:01 +0800
committerChris Lahey <clahey@src.gnome.org>2000-10-16 06:32:01 +0800
commitbe894a163a038fc60e50c435462571923f600f01 (patch)
tree142b8a64ac5e3868c034a015d8c0c4b8dee48139
parentef961dcd932d9cd4f26c2f5f5899b1e2132b5212 (diff)
downloadgsoc2013-evolution-be894a163a038fc60e50c435462571923f600f01.tar
gsoc2013-evolution-be894a163a038fc60e50c435462571923f600f01.tar.gz
gsoc2013-evolution-be894a163a038fc60e50c435462571923f600f01.tar.bz2
gsoc2013-evolution-be894a163a038fc60e50c435462571923f600f01.tar.lz
gsoc2013-evolution-be894a163a038fc60e50c435462571923f600f01.tar.xz
gsoc2013-evolution-be894a163a038fc60e50c435462571923f600f01.tar.zst
gsoc2013-evolution-be894a163a038fc60e50c435462571923f600f01.zip
Made it so that ETable won't use a state with 0 columns.
2000-10-15 Christopher James Lahey <clahey@helixcode.com> * e-table.c: Made it so that ETable won't use a state with 0 columns. svn path=/trunk/; revision=5931
-rw-r--r--widgets/table/e-table.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 8794e2142e..6a9b721547 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -716,7 +716,8 @@ void e_table_set_state (ETable *e_table
state = e_table_state_new();
e_table_state_load_from_string(state, state_str);
- et_set_state(e_table, state);
+ if (state->col_count > 0)
+ et_set_state(e_table, state);
gtk_object_sink(GTK_OBJECT(state));
}
@@ -733,7 +734,8 @@ void e_table_load_state (ETable *e_table
state = e_table_state_new();
e_table_state_load_from_file(state, filename);
- et_set_state(e_table, state);
+ if (state->col_count > 0)
+ et_set_state(e_table, state);
gtk_object_sink(GTK_OBJECT(state));
}
@@ -883,6 +885,11 @@ e_table_construct (ETable *e_table, ETableModel *etm, ETableExtras *ete,
if (state_str) {
state = e_table_state_new();
e_table_state_load_from_string(state, state_str);
+ if (state->col_count <= 0) {
+ gtk_object_unref(GTK_OBJECT(state));
+ state = specification->state;
+ gtk_object_ref(GTK_OBJECT(state));
+ }
} else {
state = specification->state;
gtk_object_ref(GTK_OBJECT(state));
@@ -923,6 +930,11 @@ e_table_construct_from_spec_file (ETable *e_table, ETableModel *etm, ETableExtra
state = specification->state;
gtk_object_ref(GTK_OBJECT(state));
}
+ if (state->col_count <= 0) {
+ gtk_object_unref(GTK_OBJECT(state));
+ state = specification->state;
+ gtk_object_ref(GTK_OBJECT(state));
+ }
} else {
state = specification->state;
gtk_object_ref(GTK_OBJECT(state));