aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnu.org>2000-02-11 20:19:27 +0800
committerMiguel de Icaza <miguel@src.gnome.org>2000-02-11 20:19:27 +0800
commit0d3051708edbde845787194bf94a0fd777379842 (patch)
treeb953d78666211a88252c69ce5f85ec344da19369
parentd8fbc4fc0c01d174f04e8f2370131a5240764f4b (diff)
downloadgsoc2013-evolution-0d3051708edbde845787194bf94a0fd777379842.tar
gsoc2013-evolution-0d3051708edbde845787194bf94a0fd777379842.tar.gz
gsoc2013-evolution-0d3051708edbde845787194bf94a0fd777379842.tar.bz2
gsoc2013-evolution-0d3051708edbde845787194bf94a0fd777379842.tar.lz
gsoc2013-evolution-0d3051708edbde845787194bf94a0fd777379842.tar.xz
gsoc2013-evolution-0d3051708edbde845787194bf94a0fd777379842.tar.zst
gsoc2013-evolution-0d3051708edbde845787194bf94a0fd777379842.zip
Add nice assertion.
2000-02-11 Miguel de Icaza <miguel@gnu.org> * e-table-item.c (eti_header_structure_changed): Add nice assertion. svn path=/trunk/; revision=1733
-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 ();