From 90ed53edb0f3256a5d08e8dd0681938f4d83140d Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Fri, 30 Mar 2001 10:30:28 +0000 Subject: Made these use GTK_TYPE_GDK_EVENT whenever sending an event through the 2001-03-30 Christopher James Lahey * e-table-group.c, e-table-header-item.c, e-table-item.c, e-table.c, e-tree.c: Made these use GTK_TYPE_GDK_EVENT whenever sending an event through the signal system instead of GTK_TYPE_POINTER. * e-table.c, e-tree.c (set_header_canvas_width): Check that none of the variables we're going to need are NULL before executing this function. svn path=/trunk/; revision=9042 --- widgets/table/e-table-group.c | 8 ++++---- widgets/table/e-table-header-item.c | 2 +- widgets/table/e-table-item.c | 8 ++++---- widgets/table/e-table.c | 11 +++++++---- widgets/table/e-tree.c | 11 +++++++---- 5 files changed, 23 insertions(+), 17 deletions(-) diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c index 0b09b38351..f70b9abaf6 100644 --- a/widgets/table/e-table-group.c +++ b/widgets/table/e-table-group.c @@ -618,7 +618,7 @@ etg_class_init (GtkObjectClass *object_class) object_class->type, GTK_SIGNAL_OFFSET (ETableGroupClass, double_click), gtk_marshal_NONE__INT_INT_POINTER, - GTK_TYPE_NONE, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_NONE, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); etg_signals [RIGHT_CLICK] = gtk_signal_new ("right_click", @@ -626,7 +626,7 @@ etg_class_init (GtkObjectClass *object_class) object_class->type, GTK_SIGNAL_OFFSET (ETableGroupClass, right_click), e_marshal_INT__INT_INT_POINTER, - GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); etg_signals [CLICK] = gtk_signal_new ("click", @@ -634,7 +634,7 @@ etg_class_init (GtkObjectClass *object_class) object_class->type, GTK_SIGNAL_OFFSET (ETableGroupClass, click), e_marshal_INT__INT_INT_POINTER, - GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); etg_signals [KEY_PRESS] = gtk_signal_new ("key_press", @@ -642,7 +642,7 @@ etg_class_init (GtkObjectClass *object_class) object_class->type, GTK_SIGNAL_OFFSET (ETableGroupClass, key_press), e_marshal_INT__INT_INT_POINTER, - GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); gtk_object_class_add_signals (object_class, etg_signals, LAST_SIGNAL); } diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 1fd1c12662..cfbabb939f 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -1536,7 +1536,7 @@ ethi_class_init (GtkObjectClass *object_class) object_class->type, GTK_SIGNAL_OFFSET (ETableHeaderItemClass, button_pressed), gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, GTK_TYPE_POINTER); + GTK_TYPE_NONE, 1, GTK_TYPE_GDK_EVENT); gtk_object_class_add_signals (object_class, ethi_signals, LAST_SIGNAL); } diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 2605d5a7a4..765acd1c2e 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -2141,7 +2141,7 @@ eti_class_init (GtkObjectClass *object_class) object_class->type, GTK_SIGNAL_OFFSET (ETableItemClass, double_click), gtk_marshal_NONE__INT_INT_POINTER, - GTK_TYPE_NONE, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_NONE, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); eti_signals [RIGHT_CLICK] = gtk_signal_new ("right_click", @@ -2149,7 +2149,7 @@ eti_class_init (GtkObjectClass *object_class) object_class->type, GTK_SIGNAL_OFFSET (ETableItemClass, right_click), e_marshal_INT__INT_INT_POINTER, - GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); eti_signals [CLICK] = gtk_signal_new ("click", @@ -2157,7 +2157,7 @@ eti_class_init (GtkObjectClass *object_class) object_class->type, GTK_SIGNAL_OFFSET (ETableItemClass, click), e_marshal_INT__INT_INT_POINTER, - GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); eti_signals [KEY_PRESS] = gtk_signal_new ("key_press", @@ -2165,7 +2165,7 @@ eti_class_init (GtkObjectClass *object_class) object_class->type, GTK_SIGNAL_OFFSET (ETableItemClass, key_press), e_marshal_INT__INT_INT_POINTER, - GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); gtk_object_class_add_signals (object_class, eti_signals, LAST_SIGNAL); diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 2dcd6e7c25..b2eb4dd1fe 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -261,6 +261,9 @@ set_header_canvas_width (ETable *e_table) { double oldwidth, oldheight, width; + if (!(e_table->header_item && e_table->header_canvas && e_table->table_canvas)) + return; + gnome_canvas_get_scroll_region (GNOME_CANVAS (e_table->table_canvas), NULL, NULL, &width, NULL); gnome_canvas_get_scroll_region (GNOME_CANVAS (e_table->header_canvas), @@ -2098,7 +2101,7 @@ e_table_class_init (ETableClass *class) object_class->type, GTK_SIGNAL_OFFSET (ETableClass, double_click), gtk_marshal_NONE__INT_INT_POINTER, - GTK_TYPE_NONE, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_NONE, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); et_signals [RIGHT_CLICK] = gtk_signal_new ("right_click", @@ -2106,7 +2109,7 @@ e_table_class_init (ETableClass *class) object_class->type, GTK_SIGNAL_OFFSET (ETableClass, right_click), e_marshal_INT__INT_INT_POINTER, - GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); et_signals [CLICK] = gtk_signal_new ("click", @@ -2114,7 +2117,7 @@ e_table_class_init (ETableClass *class) object_class->type, GTK_SIGNAL_OFFSET (ETableClass, click), e_marshal_INT__INT_INT_POINTER, - GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); et_signals [KEY_PRESS] = gtk_signal_new ("key_press", @@ -2122,7 +2125,7 @@ e_table_class_init (ETableClass *class) object_class->type, GTK_SIGNAL_OFFSET (ETableClass, key_press), e_marshal_INT__INT_INT_POINTER, - GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_INT, 3, GTK_TYPE_INT, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); et_signals[TABLE_DRAG_BEGIN] = gtk_signal_new ("table_drag_begin", diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index 03a439ed2f..c7a9398627 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -210,6 +210,9 @@ set_header_canvas_width (ETree *e_tree) { double oldwidth, oldheight, width; + if (!(e_tree->header_item && e_tree->header_canvas && e_tree->table_canvas)) + return; + gnome_canvas_get_scroll_region (GNOME_CANVAS (e_tree->table_canvas), NULL, NULL, &width, NULL); gnome_canvas_get_scroll_region (GNOME_CANVAS (e_tree->header_canvas), @@ -1893,7 +1896,7 @@ e_tree_class_init (ETreeClass *class) object_class->type, GTK_SIGNAL_OFFSET (ETreeClass, double_click), e_marshal_NONE__INT_POINTER_INT_POINTER, - GTK_TYPE_NONE, 4, GTK_TYPE_INT, GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_NONE, 4, GTK_TYPE_INT, GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); et_signals [RIGHT_CLICK] = gtk_signal_new ("right_click", @@ -1901,7 +1904,7 @@ e_tree_class_init (ETreeClass *class) object_class->type, GTK_SIGNAL_OFFSET (ETreeClass, right_click), e_marshal_INT__INT_POINTER_INT_POINTER, - GTK_TYPE_INT, 4, GTK_TYPE_INT, GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_INT, 4, GTK_TYPE_INT, GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); et_signals [CLICK] = gtk_signal_new ("click", @@ -1909,7 +1912,7 @@ e_tree_class_init (ETreeClass *class) object_class->type, GTK_SIGNAL_OFFSET (ETreeClass, click), e_marshal_INT__INT_POINTER_INT_POINTER, - GTK_TYPE_INT, 4, GTK_TYPE_INT, GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_INT, 4, GTK_TYPE_INT, GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); et_signals [KEY_PRESS] = gtk_signal_new ("key_press", @@ -1917,7 +1920,7 @@ e_tree_class_init (ETreeClass *class) object_class->type, GTK_SIGNAL_OFFSET (ETreeClass, key_press), e_marshal_INT__INT_POINTER_INT_POINTER, - GTK_TYPE_INT, 4, GTK_TYPE_INT, GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_POINTER); + GTK_TYPE_INT, 4, GTK_TYPE_INT, GTK_TYPE_POINTER, GTK_TYPE_INT, GTK_TYPE_GDK_EVENT); et_signals[TREE_DRAG_BEGIN] = gtk_signal_new ("tree_drag_begin", -- cgit