Added a "grab_focus" signal for widgets. When the signal is emitted, the
1998-12-13 Federico Mena Quintero <federico@nuclecu.unam.mx> * gtk/gtkwidget.h (struct _GtkWidgetClass): Added a "grab_focus" signal for widgets. When the signal is emitted, the widget will grab the focus. This is needed to let the user press an accelerator key in a dialog box and have the corresponding widget be focused. * gtk/gtkwidget.c (gtk_widget_class_init): Create the "grab_focus" signal. The default handler is simply gtk_widget_grab_focus().
This commit is contained in:
parent
113448e030
commit
3441c3f2c4
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
1998-12-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added a "grab_focus"
|
||||||
|
signal for widgets. When the signal is emitted, the widget will
|
||||||
|
grab the focus. This is needed to let the user press an
|
||||||
|
accelerator key in a dialog box and have the corresponding widget
|
||||||
|
be focused.
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_class_init): Create the "grab_focus"
|
||||||
|
signal. The default handler is simply gtk_widget_grab_focus().
|
||||||
|
|
||||||
Sun Dec 13 22:15:48 GMT 1998 Tony Gale <gale@gtk.org>
|
Sun Dec 13 22:15:48 GMT 1998 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* docs/gtk_tut.sgml: Update the following sections to the
|
* docs/gtk_tut.sgml: Update the following sections to the
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
1998-12-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added a "grab_focus"
|
||||||
|
signal for widgets. When the signal is emitted, the widget will
|
||||||
|
grab the focus. This is needed to let the user press an
|
||||||
|
accelerator key in a dialog box and have the corresponding widget
|
||||||
|
be focused.
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_class_init): Create the "grab_focus"
|
||||||
|
signal. The default handler is simply gtk_widget_grab_focus().
|
||||||
|
|
||||||
Sun Dec 13 22:15:48 GMT 1998 Tony Gale <gale@gtk.org>
|
Sun Dec 13 22:15:48 GMT 1998 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* docs/gtk_tut.sgml: Update the following sections to the
|
* docs/gtk_tut.sgml: Update the following sections to the
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
1998-12-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added a "grab_focus"
|
||||||
|
signal for widgets. When the signal is emitted, the widget will
|
||||||
|
grab the focus. This is needed to let the user press an
|
||||||
|
accelerator key in a dialog box and have the corresponding widget
|
||||||
|
be focused.
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_class_init): Create the "grab_focus"
|
||||||
|
signal. The default handler is simply gtk_widget_grab_focus().
|
||||||
|
|
||||||
Sun Dec 13 22:15:48 GMT 1998 Tony Gale <gale@gtk.org>
|
Sun Dec 13 22:15:48 GMT 1998 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* docs/gtk_tut.sgml: Update the following sections to the
|
* docs/gtk_tut.sgml: Update the following sections to the
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
1998-12-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added a "grab_focus"
|
||||||
|
signal for widgets. When the signal is emitted, the widget will
|
||||||
|
grab the focus. This is needed to let the user press an
|
||||||
|
accelerator key in a dialog box and have the corresponding widget
|
||||||
|
be focused.
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_class_init): Create the "grab_focus"
|
||||||
|
signal. The default handler is simply gtk_widget_grab_focus().
|
||||||
|
|
||||||
Sun Dec 13 22:15:48 GMT 1998 Tony Gale <gale@gtk.org>
|
Sun Dec 13 22:15:48 GMT 1998 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* docs/gtk_tut.sgml: Update the following sections to the
|
* docs/gtk_tut.sgml: Update the following sections to the
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
1998-12-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added a "grab_focus"
|
||||||
|
signal for widgets. When the signal is emitted, the widget will
|
||||||
|
grab the focus. This is needed to let the user press an
|
||||||
|
accelerator key in a dialog box and have the corresponding widget
|
||||||
|
be focused.
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_class_init): Create the "grab_focus"
|
||||||
|
signal. The default handler is simply gtk_widget_grab_focus().
|
||||||
|
|
||||||
Sun Dec 13 22:15:48 GMT 1998 Tony Gale <gale@gtk.org>
|
Sun Dec 13 22:15:48 GMT 1998 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* docs/gtk_tut.sgml: Update the following sections to the
|
* docs/gtk_tut.sgml: Update the following sections to the
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
1998-12-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added a "grab_focus"
|
||||||
|
signal for widgets. When the signal is emitted, the widget will
|
||||||
|
grab the focus. This is needed to let the user press an
|
||||||
|
accelerator key in a dialog box and have the corresponding widget
|
||||||
|
be focused.
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_class_init): Create the "grab_focus"
|
||||||
|
signal. The default handler is simply gtk_widget_grab_focus().
|
||||||
|
|
||||||
Sun Dec 13 22:15:48 GMT 1998 Tony Gale <gale@gtk.org>
|
Sun Dec 13 22:15:48 GMT 1998 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* docs/gtk_tut.sgml: Update the following sections to the
|
* docs/gtk_tut.sgml: Update the following sections to the
|
||||||
|
@ -1,3 +1,14 @@
|
|||||||
|
1998-12-13 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gtk/gtkwidget.h (struct _GtkWidgetClass): Added a "grab_focus"
|
||||||
|
signal for widgets. When the signal is emitted, the widget will
|
||||||
|
grab the focus. This is needed to let the user press an
|
||||||
|
accelerator key in a dialog box and have the corresponding widget
|
||||||
|
be focused.
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_class_init): Create the "grab_focus"
|
||||||
|
signal. The default handler is simply gtk_widget_grab_focus().
|
||||||
|
|
||||||
Sun Dec 13 22:15:48 GMT 1998 Tony Gale <gale@gtk.org>
|
Sun Dec 13 22:15:48 GMT 1998 Tony Gale <gale@gtk.org>
|
||||||
|
|
||||||
* docs/gtk_tut.sgml: Update the following sections to the
|
* docs/gtk_tut.sgml: Update the following sections to the
|
||||||
|
@ -52,6 +52,7 @@ enum {
|
|||||||
STYLE_SET,
|
STYLE_SET,
|
||||||
ADD_ACCELERATOR,
|
ADD_ACCELERATOR,
|
||||||
REMOVE_ACCELERATOR,
|
REMOVE_ACCELERATOR,
|
||||||
|
GRAB_FOCUS,
|
||||||
EVENT,
|
EVENT,
|
||||||
BUTTON_PRESS_EVENT,
|
BUTTON_PRESS_EVENT,
|
||||||
BUTTON_RELEASE_EVENT,
|
BUTTON_RELEASE_EVENT,
|
||||||
@ -387,6 +388,13 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
|||||||
widget_signals[REMOVE_ACCELERATOR] =
|
widget_signals[REMOVE_ACCELERATOR] =
|
||||||
gtk_accel_group_create_remove (object_class->type, GTK_RUN_LAST,
|
gtk_accel_group_create_remove (object_class->type, GTK_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (GtkWidgetClass, remove_accelerator));
|
GTK_SIGNAL_OFFSET (GtkWidgetClass, remove_accelerator));
|
||||||
|
widget_signals[GRAB_FOCUS] =
|
||||||
|
gtk_signal_new ("grab_focus",
|
||||||
|
GTK_RUN_FIRST,
|
||||||
|
object_class->type,
|
||||||
|
GTK_SIGNAL_OFFSET (GtkWidgetClass, grab_focus),
|
||||||
|
gtk_marshal_NONE__NONE,
|
||||||
|
GTK_TYPE_NONE, 0);
|
||||||
widget_signals[EVENT] =
|
widget_signals[EVENT] =
|
||||||
gtk_signal_new ("event",
|
gtk_signal_new ("event",
|
||||||
GTK_RUN_LAST,
|
GTK_RUN_LAST,
|
||||||
@ -721,6 +729,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
|||||||
klass->style_set = gtk_widget_style_set;
|
klass->style_set = gtk_widget_style_set;
|
||||||
klass->add_accelerator = (void*) gtk_accel_group_handle_add;
|
klass->add_accelerator = (void*) gtk_accel_group_handle_add;
|
||||||
klass->remove_accelerator = (void*) gtk_accel_group_handle_remove;
|
klass->remove_accelerator = (void*) gtk_accel_group_handle_remove;
|
||||||
|
klass->grab_focus = gtk_widget_grab_focus;
|
||||||
klass->event = NULL;
|
klass->event = NULL;
|
||||||
klass->button_press_event = NULL;
|
klass->button_press_event = NULL;
|
||||||
klass->button_release_event = NULL;
|
klass->button_release_event = NULL;
|
||||||
|
@ -273,6 +273,9 @@ struct _GtkWidgetClass
|
|||||||
guint accel_key,
|
guint accel_key,
|
||||||
GdkModifierType accel_mods);
|
GdkModifierType accel_mods);
|
||||||
|
|
||||||
|
/* explicit focus */
|
||||||
|
void (* grab_focus) (GtkWidget *widget);
|
||||||
|
|
||||||
/* events */
|
/* events */
|
||||||
gint (* event) (GtkWidget *widget,
|
gint (* event) (GtkWidget *widget,
|
||||||
GdkEvent *event);
|
GdkEvent *event);
|
||||||
|
Loading…
Reference in New Issue
Block a user