aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/e-table/ChangeLog5
-rw-r--r--widgets/e-table/e-table-item.c5
-rw-r--r--widgets/e-table/table-test.c4
-rw-r--r--widgets/table/e-table-item.c5
-rw-r--r--widgets/table/table-test.c4
5 files changed, 19 insertions, 4 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog
index 71ced91a19..6015e53bc0 100644
--- a/widgets/e-table/ChangeLog
+++ b/widgets/e-table/ChangeLog
@@ -1,3 +1,8 @@
+2000-02-11 Miguel de Icaza <miguel@gnu.org>
+
+ * e-table-item.c (eti_header_structure_changed): Add nice
+ assertion.
+
2000-02-10 Christopher James Lahey <clahey@helixcode.com>
* e-cell-text.c: Handle button releases properly.
diff --git a/widgets/e-table/e-table-item.c b/widgets/e-table/e-table-item.c
index 8455ed4824..130c51a85c 100644
--- a/widgets/e-table/e-table-item.c
+++ b/widgets/e-table/e-table-item.c
@@ -459,6 +459,11 @@ eti_header_structure_changed (ETableHeader *eth, ETableItem *eti)
eti->cols = e_table_header_count (eti->header);
eti->width = e_table_header_total_width (eti->header);
+ /*
+ * There should be at least one column
+ */
+ g_assert (eti->cols != 0);
+
if (eti->cell_views){
eti_unrealize_cell_views (eti);
eti_detach_cell_views (eti);
diff --git a/widgets/e-table/table-test.c b/widgets/e-table/table-test.c
index 3009297906..62160e7035 100644
--- a/widgets/e-table/table-test.c
+++ b/widgets/e-table/table-test.c
@@ -31,11 +31,11 @@ main (int argc, char *argv [])
gnome_init ("TableTest", "TableTest", argc, argv);
e_cursors_init ();
-#if 0
+
table_browser_test ();
multi_cols_test ();
check_test ();
-#endif
+
e_table_test ();
gtk_main ();
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c
index 8455ed4824..130c51a85c 100644
--- a/widgets/table/e-table-item.c
+++ b/widgets/table/e-table-item.c
@@ -459,6 +459,11 @@ eti_header_structure_changed (ETableHeader *eth, ETableItem *eti)
eti->cols = e_table_header_count (eti->header);
eti->width = e_table_header_total_width (eti->header);
+ /*
+ * There should be at least one column
+ */
+ g_assert (eti->cols != 0);
+
if (eti->cell_views){
eti_unrealize_cell_views (eti);
eti_detach_cell_views (eti);
diff --git a/widgets/table/table-test.c b/widgets/table/table-test.c
index 3009297906..62160e7035 100644
--- a/widgets/table/table-test.c
+++ b/widgets/table/table-test.c
@@ -31,11 +31,11 @@ main (int argc, char *argv [])
gnome_init ("TableTest", "TableTest", argc, argv);
e_cursors_init ();
-#if 0
+
table_browser_test ();
multi_cols_test ();
check_test ();
-#endif
+
e_table_test ();
gtk_main ();