]> Pileus Git - ~andy/gtk/commitdiff
Change popup_menu signal to return gboolean instead of void. This allows
authorPadraig O'Briain <padraigo@src.gnome.org>
Thu, 7 Feb 2002 09:39:21 +0000 (09:39 +0000)
committerPadraig O'Briain <padraigo@src.gnome.org>
Thu, 7 Feb 2002 09:39:21 +0000 (09:39 +0000)
* 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

12 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcolorsel.c
gtk/gtkentry.c
gtk/gtktextview.c
gtk/gtkwidget.c
gtk/gtkwidget.h

index 443b4390d254aaca927c4a71fa9693785db356f9..ab6759871eb8085eeec3767b210330be43f8af80 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 
index 443b4390d254aaca927c4a71fa9693785db356f9..ab6759871eb8085eeec3767b210330be43f8af80 100644 (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 
index 443b4390d254aaca927c4a71fa9693785db356f9..ab6759871eb8085eeec3767b210330be43f8af80 100644 (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 
index 443b4390d254aaca927c4a71fa9693785db356f9..ab6759871eb8085eeec3767b210330be43f8af80 100644 (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 
index 443b4390d254aaca927c4a71fa9693785db356f9..ab6759871eb8085eeec3767b210330be43f8af80 100644 (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 
index 443b4390d254aaca927c4a71fa9693785db356f9..ab6759871eb8085eeec3767b210330be43f8af80 100644 (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 
index 443b4390d254aaca927c4a71fa9693785db356f9..ab6759871eb8085eeec3767b210330be43f8af80 100644 (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 
index c6e455e20c44eb19d6a852b514b937266ca7e604..98a0546c55697f5ed8face83e0d0577ebf267d0f 100644 (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;
 }
                
 
index d58c93f96fe5f4da0b29f11364089a302fdecaa4..d0ff6da2110b4b317367ccd6fe8ba19965f6019b 100644 (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
index 6c04881194331f275031a1715d77f788f808e2fd..d674c50e9146b13ad96b3a119e1d0ada3fdf111c 100644 (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 */
index 755ae1b25ac099338ded7c41810eca657e47dce3..2908ecf03cc4acd7705f181e057024eecdef1a68 100644 (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,
index d70a0ef67621fba39b266db36e883700d339266e..6eebb124f0394b584cee3b6fb689b5531960fc3e 100644 (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