diff --git a/ChangeLog b/ChangeLog index 443b4390d2..ab6759871e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-02-07 Padraig O'Briain + + * gtk/gtkwidget.[ch]: + Change popup_menu signal to return gboolean instead of void. This + allows the keypress which invokes the signal to be propagated to the + focus widgets ancestors if not handled by the focus widget. + + * gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtktextview.c: + Change signature of popup_menu signal handler to return gboolean + instead of void and return TRUE in the signal handler + 2002-02-07 Anders Carlsson * gdk/x11/xsettings-common.c (xsettings_setting_free): Free diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 443b4390d2..ab6759871e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,14 @@ +2002-02-07 Padraig O'Briain + + * gtk/gtkwidget.[ch]: + Change popup_menu signal to return gboolean instead of void. This + allows the keypress which invokes the signal to be propagated to the + focus widgets ancestors if not handled by the focus widget. + + * gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtktextview.c: + Change signature of popup_menu signal handler to return gboolean + instead of void and return TRUE in the signal handler + 2002-02-07 Anders Carlsson * gdk/x11/xsettings-common.c (xsettings_setting_free): Free diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 443b4390d2..ab6759871e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +2002-02-07 Padraig O'Briain + + * gtk/gtkwidget.[ch]: + Change popup_menu signal to return gboolean instead of void. This + allows the keypress which invokes the signal to be propagated to the + focus widgets ancestors if not handled by the focus widget. + + * gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtktextview.c: + Change signature of popup_menu signal handler to return gboolean + instead of void and return TRUE in the signal handler + 2002-02-07 Anders Carlsson * gdk/x11/xsettings-common.c (xsettings_setting_free): Free diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 443b4390d2..ab6759871e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,14 @@ +2002-02-07 Padraig O'Briain + + * gtk/gtkwidget.[ch]: + Change popup_menu signal to return gboolean instead of void. This + allows the keypress which invokes the signal to be propagated to the + focus widgets ancestors if not handled by the focus widget. + + * gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtktextview.c: + Change signature of popup_menu signal handler to return gboolean + instead of void and return TRUE in the signal handler + 2002-02-07 Anders Carlsson * gdk/x11/xsettings-common.c (xsettings_setting_free): Free diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 443b4390d2..ab6759871e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,14 @@ +2002-02-07 Padraig O'Briain + + * gtk/gtkwidget.[ch]: + Change popup_menu signal to return gboolean instead of void. This + allows the keypress which invokes the signal to be propagated to the + focus widgets ancestors if not handled by the focus widget. + + * gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtktextview.c: + Change signature of popup_menu signal handler to return gboolean + instead of void and return TRUE in the signal handler + 2002-02-07 Anders Carlsson * gdk/x11/xsettings-common.c (xsettings_setting_free): Free diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 443b4390d2..ab6759871e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,14 @@ +2002-02-07 Padraig O'Briain + + * gtk/gtkwidget.[ch]: + Change popup_menu signal to return gboolean instead of void. This + allows the keypress which invokes the signal to be propagated to the + focus widgets ancestors if not handled by the focus widget. + + * gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtktextview.c: + Change signature of popup_menu signal handler to return gboolean + instead of void and return TRUE in the signal handler + 2002-02-07 Anders Carlsson * gdk/x11/xsettings-common.c (xsettings_setting_free): Free diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 443b4390d2..ab6759871e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,14 @@ +2002-02-07 Padraig O'Briain + + * gtk/gtkwidget.[ch]: + Change popup_menu signal to return gboolean instead of void. This + allows the keypress which invokes the signal to be propagated to the + focus widgets ancestors if not handled by the focus widget. + + * gtk/gtkcolorsel.c gtk/gtkentry.c gtk/gtktextview.c: + Change signature of popup_menu signal handler to return gboolean + instead of void and return TRUE in the signal handler + 2002-02-07 Anders Carlsson * gdk/x11/xsettings-common.c (xsettings_setting_free): Free diff --git a/gtk/gtkcolorsel.c b/gtk/gtkcolorsel.c index c6e455e20c..98a0546c55 100644 --- a/gtk/gtkcolorsel.c +++ b/gtk/gtkcolorsel.c @@ -1017,13 +1017,14 @@ palette_activate (GtkWidget *widget, return FALSE; } -static void +static gboolean palette_popup (GtkWidget *widget, gpointer data) { GtkColorSelection *colorsel = GTK_COLOR_SELECTION (data); do_popup (colorsel, widget, GDK_CURRENT_TIME); + return TRUE; } diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index d58c93f96f..d0ff6da211 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -230,7 +230,7 @@ static void gtk_entry_paste_clipboard (GtkEntry *entry); static void gtk_entry_toggle_overwrite (GtkEntry *entry); static void gtk_entry_select_all (GtkEntry *entry); static void gtk_entry_real_activate (GtkEntry *entry); -static void gtk_entry_popup_menu (GtkWidget *widget); +static gboolean gtk_entry_popup_menu (GtkWidget *widget); static void gtk_entry_keymap_direction_changed (GdkKeymap *keymap, GtkEntry *entry); @@ -3946,10 +3946,11 @@ gtk_entry_do_popup (GtkEntry *entry, info); } -static void +static gboolean gtk_entry_popup_menu (GtkWidget *widget) { gtk_entry_do_popup (GTK_ENTRY (widget), NULL); + return TRUE; } static void diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c index 6c04881194..d674c50e91 100644 --- a/gtk/gtktextview.c +++ b/gtk/gtktextview.c @@ -222,7 +222,7 @@ static void gtk_text_view_drag_data_received (GtkWidget *widget, static void gtk_text_view_set_scroll_adjustments (GtkTextView *text_view, GtkAdjustment *hadj, GtkAdjustment *vadj); -static void gtk_text_view_popup_menu (GtkWidget *widget); +static gboolean gtk_text_view_popup_menu (GtkWidget *widget); static void gtk_text_view_move_cursor (GtkTextView *text_view, GtkMovementStep step, @@ -6395,10 +6395,11 @@ gtk_text_view_do_popup (GtkTextView *text_view, info); } -static void +static gboolean gtk_text_view_popup_menu (GtkWidget *widget) { gtk_text_view_do_popup (GTK_TEXT_VIEW (widget), NULL); + return TRUE; } /* Child GdkWindows */ diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 755ae1b25a..2908ecf03c 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -1002,12 +1002,13 @@ gtk_widget_class_init (GtkWidgetClass *klass) G_TYPE_BOOLEAN, 1, GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE); widget_signals[POPUP_MENU] = - gtk_signal_new ("popup_menu", - GTK_RUN_LAST | GTK_RUN_ACTION, - GTK_CLASS_TYPE (object_class), - GTK_SIGNAL_OFFSET (GtkWidgetClass, popup_menu), - _gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); + g_signal_new ("popup_menu", + G_TYPE_FROM_CLASS (object_class), + G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, + GTK_SIGNAL_OFFSET (GtkWidgetClass, popup_menu), + _gtk_boolean_handled_accumulator, NULL, + _gtk_marshal_BOOLEAN__VOID, + G_TYPE_BOOLEAN, 0); widget_signals[SHOW_HELP] = gtk_signal_new ("show_help", GTK_RUN_LAST | GTK_RUN_ACTION, diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h index d70a0ef676..6eebb124f0 100644 --- a/gtk/gtkwidget.h +++ b/gtk/gtkwidget.h @@ -387,7 +387,7 @@ struct _GtkWidgetClass guint time); /* Signals used only for keybindings */ - void (* popup_menu) (GtkWidget *widget); + gboolean (* popup_menu) (GtkWidget *widget); /* If a widget has multiple tooltips/whatsthis, it should show the * one for the current focus location, or if that doesn't make