aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-08-28 23:27:38 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-08-28 23:27:38 +0800
commit876558f75fd7342eb4cb95a45c6173d4a876bbc1 (patch)
treec96a7bf68309db331b3c3b7d38b0e592b0f880f3 /widgets/table
parente3913975e84bff02feedb4252d4ecb2cddce211f (diff)
downloadgsoc2013-evolution-876558f75fd7342eb4cb95a45c6173d4a876bbc1.tar
gsoc2013-evolution-876558f75fd7342eb4cb95a45c6173d4a876bbc1.tar.gz
gsoc2013-evolution-876558f75fd7342eb4cb95a45c6173d4a876bbc1.tar.bz2
gsoc2013-evolution-876558f75fd7342eb4cb95a45c6173d4a876bbc1.tar.lz
gsoc2013-evolution-876558f75fd7342eb4cb95a45c6173d4a876bbc1.tar.xz
gsoc2013-evolution-876558f75fd7342eb4cb95a45c6173d4a876bbc1.tar.zst
gsoc2013-evolution-876558f75fd7342eb4cb95a45c6173d4a876bbc1.zip
Remove a ton of (hopefully harmless) warnings from the ETable code.
svn path=/trunk/; revision=5081
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-table-group-leaf.c8
-rw-r--r--widgets/table/e-table.c11
-rw-r--r--widgets/table/e-tree-model.c3
3 files changed, 16 insertions, 6 deletions
diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c
index d083d44f21..082963a616 100644
--- a/widgets/table/e-table-group-leaf.c
+++ b/widgets/table/e-table-group-leaf.c
@@ -227,9 +227,11 @@ static void
etgl_set_cursor_row (ETableGroup *etg, gint row)
{
ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF (etg);
- gnome_canvas_item_set(GNOME_CANVAS_ITEM(etgl->item),
- "cursor_row", row,
- NULL);
+
+ if (etgl->item != NULL)
+ gnome_canvas_item_set(GNOME_CANVAS_ITEM(etgl->item),
+ "cursor_row", row,
+ NULL);
}
static int
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 7906ad877d..89f032b401 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -146,7 +146,10 @@ et_destroy (GtkObject *object)
gtk_object_unref (GTK_OBJECT (et->header));
gtk_object_unref (GTK_OBJECT (et->sort_info));
gtk_object_unref (GTK_OBJECT (et->sorter));
- gtk_widget_destroy (GTK_WIDGET (et->header_canvas));
+
+ if (et->header_canvas != NULL)
+ gtk_widget_destroy (GTK_WIDGET (et->header_canvas));
+
gtk_widget_destroy (GTK_WIDGET (et->table_canvas));
if (et->rebuild_idle_id) {
@@ -997,8 +1000,10 @@ set_scroll_adjustments (ETable *table,
hadjustment);
gtk_layout_set_vadjustment (GTK_LAYOUT(table->table_canvas),
vadjustment);
- gtk_layout_set_hadjustment (GTK_LAYOUT(table->header_canvas),
- hadjustment);
+
+ if (table->header_canvas != NULL)
+ gtk_layout_set_hadjustment (GTK_LAYOUT(table->header_canvas),
+ hadjustment);
}
gint
diff --git a/widgets/table/e-tree-model.c b/widgets/table/e-tree-model.c
index c57bf2d683..f6d8ddddd5 100644
--- a/widgets/table/e-tree-model.c
+++ b/widgets/table/e-tree-model.c
@@ -446,6 +446,9 @@ e_tree_model_row_of_node (ETreeModel *etree, ETreePath *node)
{
int i;
+ if (etree->root == node)
+ return -1;
+
for (i = 0; i < etree->row_array->len; i ++)
if (g_array_index (etree->row_array, GNode*, i) == node)
return i;