Change popup_menu signal to return gboolean instead of void. This allows

* 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
This commit is contained in:
Padraig O'Briain 2002-02-07 09:39:21 +00:00
parent ac939d3355
commit 5bc235001a
12 changed files with 93 additions and 12 deletions

View File

@ -1,3 +1,14 @@
2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
* 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 <andersca@gnu.org>
* gdk/x11/xsettings-common.c (xsettings_setting_free): Free

View File

@ -1,3 +1,14 @@
2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
* 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 <andersca@gnu.org>
* gdk/x11/xsettings-common.c (xsettings_setting_free): Free

View File

@ -1,3 +1,14 @@
2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
* 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 <andersca@gnu.org>
* gdk/x11/xsettings-common.c (xsettings_setting_free): Free

View File

@ -1,3 +1,14 @@
2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
* 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 <andersca@gnu.org>
* gdk/x11/xsettings-common.c (xsettings_setting_free): Free

View File

@ -1,3 +1,14 @@
2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
* 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 <andersca@gnu.org>
* gdk/x11/xsettings-common.c (xsettings_setting_free): Free

View File

@ -1,3 +1,14 @@
2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
* 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 <andersca@gnu.org>
* gdk/x11/xsettings-common.c (xsettings_setting_free): Free

View File

@ -1,3 +1,14 @@
2002-02-07 Padraig O'Briain <padraig.obriain@sun.com>
* 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 <andersca@gnu.org>
* gdk/x11/xsettings-common.c (xsettings_setting_free): Free

View File

@ -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;
}

View File

@ -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

View File

@ -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 */

View File

@ -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,

View File

@ -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