diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-03-01 00:18:22 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-03-01 00:18:22 +0000 |
commit | 0654fc6064b076cd6fa0e8a18c2f0b44efe8ed5e (patch) | |
tree | 4458cac84142389c5c73cbc954f806b03146d099 | |
parent | 51454e8ac664e4098605791af644928dfe920b6f (diff) | |
download | gdk-pixbuf-0654fc6064b076cd6fa0e8a18c2f0b44efe8ed5e.tar.gz |
Patch from ChiDeok Hwang to move call to sync_selection() up a few lines
Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkclist.c (real_remove_row): Patch from ChiDeok
Hwang to move call to sync_selection() up a few lines
to before the row list is modified, to fix crash when
removing rows in the undo_selection list.
(Test case provided by Daniel Elstner:
http://mail.gnome.org/archives/gtk-list/2001-February/msg00359.html)
Wed Feb 28 15:40:27 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtkcalender.c gtk/gtkdnd.c gtk/gtkitemfactory.c gtk/gtklayout.c
gtk/gtkplug.c gtk/gtksocket.c gtk/gtktypeutils.c
gtk/gtkwidget.c genmarshal.pl: Fix implicit casts
between void * and function pointers.
* gtk/gtklayout.c: Remove cruft after #endif
* gtk/gtkdnd.c: Include stdlib.h for abs.
-rw-r--r-- | ChangeLog | 22 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 22 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 22 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 22 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 22 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 22 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 22 | ||||
-rwxr-xr-x | gtk/genmarshal.pl | 4 | ||||
-rw-r--r-- | gtk/gtkcalendar.c | 5 | ||||
-rw-r--r-- | gtk/gtkclist.c | 4 | ||||
-rw-r--r-- | gtk/gtkdnd.c | 2 | ||||
-rw-r--r-- | gtk/gtkitemfactory.c | 4 | ||||
-rw-r--r-- | gtk/gtklayout.c | 7 | ||||
-rw-r--r-- | gtk/gtkplug.c | 5 | ||||
-rw-r--r-- | gtk/gtksignal.c | 4 | ||||
-rw-r--r-- | gtk/gtksocket.c | 5 | ||||
-rw-r--r-- | gtk/gtktypeutils.c | 4 | ||||
-rw-r--r-- | gtk/gtkwidget.c | 7 |
18 files changed, 184 insertions, 21 deletions
@@ -1,3 +1,25 @@ +Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkclist.c (real_remove_row): Patch from ChiDeok + Hwang to move call to sync_selection() up a few lines + to before the row list is modified, to fix crash when + removing rows in the undo_selection list. + + (Test case provided by Daniel Elstner: + + http://mail.gnome.org/archives/gtk-list/2001-February/msg00359.html) + +Wed Feb 28 15:40:27 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkcalender.c gtk/gtkdnd.c gtk/gtkitemfactory.c gtk/gtklayout.c + gtk/gtkplug.c gtk/gtksocket.c gtk/gtktypeutils.c + gtk/gtkwidget.c genmarshal.pl: Fix implicit casts + between void * and function pointers. + + * gtk/gtklayout.c: Remove cruft after #endif + + * gtk/gtkdnd.c: Include stdlib.h for abs. + Tue Feb 27 18:38:27 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_map): Redo the focus stuff diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index fdfd4207e..1a6e0d9d4 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,25 @@ +Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkclist.c (real_remove_row): Patch from ChiDeok + Hwang to move call to sync_selection() up a few lines + to before the row list is modified, to fix crash when + removing rows in the undo_selection list. + + (Test case provided by Daniel Elstner: + + http://mail.gnome.org/archives/gtk-list/2001-February/msg00359.html) + +Wed Feb 28 15:40:27 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkcalender.c gtk/gtkdnd.c gtk/gtkitemfactory.c gtk/gtklayout.c + gtk/gtkplug.c gtk/gtksocket.c gtk/gtktypeutils.c + gtk/gtkwidget.c genmarshal.pl: Fix implicit casts + between void * and function pointers. + + * gtk/gtklayout.c: Remove cruft after #endif + + * gtk/gtkdnd.c: Include stdlib.h for abs. + Tue Feb 27 18:38:27 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_map): Redo the focus stuff diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index fdfd4207e..1a6e0d9d4 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,25 @@ +Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkclist.c (real_remove_row): Patch from ChiDeok + Hwang to move call to sync_selection() up a few lines + to before the row list is modified, to fix crash when + removing rows in the undo_selection list. + + (Test case provided by Daniel Elstner: + + http://mail.gnome.org/archives/gtk-list/2001-February/msg00359.html) + +Wed Feb 28 15:40:27 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkcalender.c gtk/gtkdnd.c gtk/gtkitemfactory.c gtk/gtklayout.c + gtk/gtkplug.c gtk/gtksocket.c gtk/gtktypeutils.c + gtk/gtkwidget.c genmarshal.pl: Fix implicit casts + between void * and function pointers. + + * gtk/gtklayout.c: Remove cruft after #endif + + * gtk/gtkdnd.c: Include stdlib.h for abs. + Tue Feb 27 18:38:27 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_map): Redo the focus stuff diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index fdfd4207e..1a6e0d9d4 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,25 @@ +Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkclist.c (real_remove_row): Patch from ChiDeok + Hwang to move call to sync_selection() up a few lines + to before the row list is modified, to fix crash when + removing rows in the undo_selection list. + + (Test case provided by Daniel Elstner: + + http://mail.gnome.org/archives/gtk-list/2001-February/msg00359.html) + +Wed Feb 28 15:40:27 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkcalender.c gtk/gtkdnd.c gtk/gtkitemfactory.c gtk/gtklayout.c + gtk/gtkplug.c gtk/gtksocket.c gtk/gtktypeutils.c + gtk/gtkwidget.c genmarshal.pl: Fix implicit casts + between void * and function pointers. + + * gtk/gtklayout.c: Remove cruft after #endif + + * gtk/gtkdnd.c: Include stdlib.h for abs. + Tue Feb 27 18:38:27 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_map): Redo the focus stuff diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index fdfd4207e..1a6e0d9d4 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,25 @@ +Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkclist.c (real_remove_row): Patch from ChiDeok + Hwang to move call to sync_selection() up a few lines + to before the row list is modified, to fix crash when + removing rows in the undo_selection list. + + (Test case provided by Daniel Elstner: + + http://mail.gnome.org/archives/gtk-list/2001-February/msg00359.html) + +Wed Feb 28 15:40:27 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkcalender.c gtk/gtkdnd.c gtk/gtkitemfactory.c gtk/gtklayout.c + gtk/gtkplug.c gtk/gtksocket.c gtk/gtktypeutils.c + gtk/gtkwidget.c genmarshal.pl: Fix implicit casts + between void * and function pointers. + + * gtk/gtklayout.c: Remove cruft after #endif + + * gtk/gtkdnd.c: Include stdlib.h for abs. + Tue Feb 27 18:38:27 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_map): Redo the focus stuff diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index fdfd4207e..1a6e0d9d4 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,25 @@ +Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkclist.c (real_remove_row): Patch from ChiDeok + Hwang to move call to sync_selection() up a few lines + to before the row list is modified, to fix crash when + removing rows in the undo_selection list. + + (Test case provided by Daniel Elstner: + + http://mail.gnome.org/archives/gtk-list/2001-February/msg00359.html) + +Wed Feb 28 15:40:27 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkcalender.c gtk/gtkdnd.c gtk/gtkitemfactory.c gtk/gtklayout.c + gtk/gtkplug.c gtk/gtksocket.c gtk/gtktypeutils.c + gtk/gtkwidget.c genmarshal.pl: Fix implicit casts + between void * and function pointers. + + * gtk/gtklayout.c: Remove cruft after #endif + + * gtk/gtkdnd.c: Include stdlib.h for abs. + Tue Feb 27 18:38:27 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_map): Redo the focus stuff diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index fdfd4207e..1a6e0d9d4 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,25 @@ +Wed Feb 28 19:10:43 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkclist.c (real_remove_row): Patch from ChiDeok + Hwang to move call to sync_selection() up a few lines + to before the row list is modified, to fix crash when + removing rows in the undo_selection list. + + (Test case provided by Daniel Elstner: + + http://mail.gnome.org/archives/gtk-list/2001-February/msg00359.html) + +Wed Feb 28 15:40:27 2001 Owen Taylor <otaylor@redhat.com> + + * gtk/gtkcalender.c gtk/gtkdnd.c gtk/gtkitemfactory.c gtk/gtklayout.c + gtk/gtkplug.c gtk/gtksocket.c gtk/gtktypeutils.c + gtk/gtkwidget.c genmarshal.pl: Fix implicit casts + between void * and function pointers. + + * gtk/gtklayout.c: Remove cruft after #endif + + * gtk/gtkdnd.c: Include stdlib.h for abs. + Tue Feb 27 18:38:27 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_map): Redo the focus stuff diff --git a/gtk/genmarshal.pl b/gtk/genmarshal.pl index 067afd3fb..a9cc15d94 100755 --- a/gtk/genmarshal.pl +++ b/gtk/genmarshal.pl @@ -107,8 +107,8 @@ EOT $argn = 1; for (@params) { if($_ eq "C_CALLBACK") { - print OS "gpointer arg".$argn."a,\n"; - print OS "gpointer arg".$argn."b,\n"; + print OS "GtkFunction arg".$argn."a,\n"; + print OS "gpointer arg".$argn."b,\n"; $argn++; } elsif($_ eq "SIGNAL") { print OS "gpointer arg".$argn."a,\n"; diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c index 423f389d1..b7cc6a399 100644 --- a/gtk/gtkcalendar.c +++ b/gtk/gtkcalendar.c @@ -328,8 +328,9 @@ gtk_calendar_get_type (void) sizeof (GtkCalendarClass), (GtkClassInitFunc) gtk_calendar_class_init, (GtkObjectInitFunc) gtk_calendar_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, + /* reserved_1 */ NULL, + /* reserved_2 */ NULL, + (GtkClassInitFunc) NULL, }; calendar_type = gtk_type_unique (GTK_TYPE_WIDGET, &calendar_info); diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c index 04a92c245..af89725ab 100644 --- a/gtk/gtkclist.c +++ b/gtk/gtkclist.c @@ -2790,6 +2790,8 @@ real_remove_row (GtkCList *clist, gtk_signal_emit (GTK_OBJECT (clist), clist_signals[UNSELECT_ROW], row, -1, NULL); + sync_selection (clist, row, SYNC_REMOVE); + /* reset the row end pointer if we're removing at the end of the list */ clist->rows--; if (clist->row_list == list) @@ -2805,8 +2807,6 @@ real_remove_row (GtkCList *clist, if (row < ROW_FROM_YPIXEL (clist, 0)) clist->voffset += clist->row_height + CELL_SPACING; - sync_selection (clist, row, SYNC_REMOVE); - if (clist->selection_mode == GTK_SELECTION_BROWSE && !clist->selection && clist->focus_row >= 0) gtk_signal_emit (GTK_OBJECT (clist), clist_signals[SELECT_ROW], diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index 3449d287d..e2114cc13 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -24,6 +24,8 @@ * GTK+ at ftp://ftp.gtk.org/pub/gtk/. */ +#include <stdlib.h> + #include "gdk/gdkx.h" #include "gdk/gdkkeysyms.h" diff --git a/gtk/gtkitemfactory.c b/gtk/gtkitemfactory.c index e69bda71c..baa800391 100644 --- a/gtk/gtkitemfactory.c +++ b/gtk/gtkitemfactory.c @@ -1530,7 +1530,7 @@ gtk_item_factory_parse_statement (GScanner *scanner, { guint (*parser_func) (GScanner*, GtkItemFactoryClass*); - parser_func = scanner->value.v_symbol; + parser_func = (guint (*) (GScanner *, GtkItemFactoryClass*)) scanner->value.v_symbol; /* check whether this is a GtkItemFactory symbol. */ @@ -1598,7 +1598,7 @@ gtk_item_factory_parse_rc_scanner (GScanner *scanner) saved_symbol = g_scanner_lookup_symbol (scanner, "menu-path"); g_scanner_remove_symbol (scanner, "menu-path"); - g_scanner_add_symbol (scanner, "menu-path", gtk_item_factory_parse_menu_path); + g_scanner_add_symbol (scanner, "menu-path", (gpointer)gtk_item_factory_parse_menu_path); g_scanner_peek_next_token (scanner); diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c index 745b9d2fb..14bd5b4a7 100644 --- a/gtk/gtklayout.c +++ b/gtk/gtklayout.c @@ -357,8 +357,9 @@ gtk_layout_get_type (void) sizeof (GtkLayoutClass), (GtkClassInitFunc) gtk_layout_class_init, (GtkObjectInitFunc) gtk_layout_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL, + /* reserved_1 */ NULL, + /* reserved_2 */ NULL, + (GtkClassInitFunc) NULL, }; layout_type = gtk_type_unique (GTK_TYPE_CONTAINER, &layout_info); @@ -1178,7 +1179,7 @@ gtk_layout_filter (GdkXEvent *gdk_xevent, return GDK_FILTER_CONTINUE; } -#endif 0 +#endif /* Although GDK does have a GDK_VISIBILITY_NOTIFY event, * there is no corresponding event in GTK, so we have diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c index c2412e23d..aec5c4687 100644 --- a/gtk/gtkplug.c +++ b/gtk/gtkplug.c @@ -61,8 +61,9 @@ gtk_plug_get_type () sizeof (GtkPlugClass), (GtkClassInitFunc) gtk_plug_class_init, (GtkObjectInitFunc) gtk_plug_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL + /* reserved_1 */ NULL, + /* reserved_2 */ NULL, + (GtkClassInitFunc) NULL, }; plug_type = gtk_type_unique (gtk_window_get_type (), &plug_info); diff --git a/gtk/gtksignal.c b/gtk/gtksignal.c index eada9bb84..f98184f29 100644 --- a/gtk/gtksignal.c +++ b/gtk/gtksignal.c @@ -1668,7 +1668,7 @@ gtk_signal_add_emission_hook_full (guint signal_id, hook = g_hook_alloc (signal->hook_list); hook->data = data; - hook->func = hook_func; + hook->func = (gpointer)hook_func; hook->destroy = destroy; signal->hook_list->seq_id = seq_hook_id; @@ -1701,7 +1701,7 @@ gtk_emission_hook_marshaller (GHook *hook, GtkEmissionHookData *data = data_p; GtkEmissionHook func; - func = hook->func; + func = (gpointer)hook->func; if (!GTK_OBJECT_DESTROYED (data->object)) return func (data->object, data->signal_id, diff --git a/gtk/gtksocket.c b/gtk/gtksocket.c index 60a5fad93..ed7a57868 100644 --- a/gtk/gtksocket.c +++ b/gtk/gtksocket.c @@ -75,8 +75,9 @@ gtk_socket_get_type () sizeof (GtkSocketClass), (GtkClassInitFunc) gtk_socket_class_init, (GtkObjectInitFunc) gtk_socket_init, - (GtkArgSetFunc) NULL, - (GtkArgGetFunc) NULL + /* reserved_1 */ NULL, + /* reserved_2 */ NULL, + (GtkClassInitFunc) NULL, }; socket_type = gtk_type_unique (gtk_container_get_type (), &socket_info); diff --git a/gtk/gtktypeutils.c b/gtk/gtktypeutils.c index a2c15e6aa..854c18b42 100644 --- a/gtk/gtktypeutils.c +++ b/gtk/gtktypeutils.c @@ -576,7 +576,7 @@ gtk_type_class_init (GtkType type) while (base_node) { if (base_node->type_info.base_class_init_func) - slist = g_slist_prepend (slist, base_node->type_info.base_class_init_func); + slist = g_slist_prepend (slist, (gpointer) base_node->type_info.base_class_init_func); LOOKUP_TYPE_NODE (base_node, base_node->parent_type); } if (slist) @@ -587,7 +587,7 @@ gtk_type_class_init (GtkType type) { GtkClassInitFunc base_class_init; - base_class_init = walk->data; + base_class_init = (GtkClassInitFunc) walk->data; base_class_init (node->klass); LOOKUP_TYPE_NODE (node, type); } diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 1be30ef48..8d674b4e4 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -742,8 +742,11 @@ gtk_widget_class_init (GtkWidgetClass *klass) klass->state_changed = NULL; klass->parent_set = NULL; klass->style_set = gtk_widget_style_set; - klass->add_accelerator = (void*) gtk_accel_group_handle_add; - klass->remove_accelerator = (void*) gtk_accel_group_handle_remove; + klass->add_accelerator = (gint (*) (GtkWidget *, guint, GtkAccelGroup *, + guint, GdkModifierType, + GtkAccelFlags)) gtk_accel_group_handle_add; + klass->add_accelerator = (void (*) (GtkWidget *, GtkAccelGroup *, + guint, GdkModifierType)) gtk_accel_group_handle_remove; klass->grab_focus = gtk_widget_real_grab_focus; klass->event = NULL; klass->button_press_event = NULL; |