forked from AuroraMiddleware/gtk
[ Patch from Padraig O'Briain, #87904 ]
Thu Jul 25 11:57:57 2002 Owen Taylor <otaylor@redhat.com> [ Patch from Padraig O'Briain, #87904 ] * gtk/gtkwidget.c (gtk_widget_class_init): Cleanup - use G_SIGNAL_RUN_LAST not GTK_RUN_LAST when using g_signal new. * gtk/gtktogglebutton.c (gtk_toggle_button_mnemonic_activate): Always focus the widget, even when we are activating as well.
This commit is contained in:
parent
394ae506ba
commit
eccc076085
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
Thu Jul 25 11:57:57 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
[ Patch from Padraig O'Briain, #87904 ]
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_class_init): Cleanup -
|
||||||
|
use G_SIGNAL_RUN_LAST not GTK_RUN_LAST when using
|
||||||
|
g_signal new.
|
||||||
|
|
||||||
|
* gtk/gtktogglebutton.c (gtk_toggle_button_mnemonic_activate):
|
||||||
|
Always focus the widget, even when we are activating
|
||||||
|
as well.
|
||||||
|
|
||||||
2002-07-24 Havoc Pennington <hp@pobox.com>
|
2002-07-24 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* gtk/gtktextview.c: Apply patch from Gustavo
|
* gtk/gtktextview.c: Apply patch from Gustavo
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
Thu Jul 25 11:57:57 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
[ Patch from Padraig O'Briain, #87904 ]
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_class_init): Cleanup -
|
||||||
|
use G_SIGNAL_RUN_LAST not GTK_RUN_LAST when using
|
||||||
|
g_signal new.
|
||||||
|
|
||||||
|
* gtk/gtktogglebutton.c (gtk_toggle_button_mnemonic_activate):
|
||||||
|
Always focus the widget, even when we are activating
|
||||||
|
as well.
|
||||||
|
|
||||||
2002-07-24 Havoc Pennington <hp@pobox.com>
|
2002-07-24 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* gtk/gtktextview.c: Apply patch from Gustavo
|
* gtk/gtktextview.c: Apply patch from Gustavo
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
Thu Jul 25 11:57:57 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
[ Patch from Padraig O'Briain, #87904 ]
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_class_init): Cleanup -
|
||||||
|
use G_SIGNAL_RUN_LAST not GTK_RUN_LAST when using
|
||||||
|
g_signal new.
|
||||||
|
|
||||||
|
* gtk/gtktogglebutton.c (gtk_toggle_button_mnemonic_activate):
|
||||||
|
Always focus the widget, even when we are activating
|
||||||
|
as well.
|
||||||
|
|
||||||
2002-07-24 Havoc Pennington <hp@pobox.com>
|
2002-07-24 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* gtk/gtktextview.c: Apply patch from Gustavo
|
* gtk/gtktextview.c: Apply patch from Gustavo
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
Thu Jul 25 11:57:57 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
[ Patch from Padraig O'Briain, #87904 ]
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_class_init): Cleanup -
|
||||||
|
use G_SIGNAL_RUN_LAST not GTK_RUN_LAST when using
|
||||||
|
g_signal new.
|
||||||
|
|
||||||
|
* gtk/gtktogglebutton.c (gtk_toggle_button_mnemonic_activate):
|
||||||
|
Always focus the widget, even when we are activating
|
||||||
|
as well.
|
||||||
|
|
||||||
2002-07-24 Havoc Pennington <hp@pobox.com>
|
2002-07-24 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* gtk/gtktextview.c: Apply patch from Gustavo
|
* gtk/gtktextview.c: Apply patch from Gustavo
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
Thu Jul 25 11:57:57 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
[ Patch from Padraig O'Briain, #87904 ]
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_class_init): Cleanup -
|
||||||
|
use G_SIGNAL_RUN_LAST not GTK_RUN_LAST when using
|
||||||
|
g_signal new.
|
||||||
|
|
||||||
|
* gtk/gtktogglebutton.c (gtk_toggle_button_mnemonic_activate):
|
||||||
|
Always focus the widget, even when we are activating
|
||||||
|
as well.
|
||||||
|
|
||||||
2002-07-24 Havoc Pennington <hp@pobox.com>
|
2002-07-24 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* gtk/gtktextview.c: Apply patch from Gustavo
|
* gtk/gtktextview.c: Apply patch from Gustavo
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
Thu Jul 25 11:57:57 2002 Owen Taylor <otaylor@redhat.com>
|
||||||
|
|
||||||
|
[ Patch from Padraig O'Briain, #87904 ]
|
||||||
|
|
||||||
|
* gtk/gtkwidget.c (gtk_widget_class_init): Cleanup -
|
||||||
|
use G_SIGNAL_RUN_LAST not GTK_RUN_LAST when using
|
||||||
|
g_signal new.
|
||||||
|
|
||||||
|
* gtk/gtktogglebutton.c (gtk_toggle_button_mnemonic_activate):
|
||||||
|
Always focus the widget, even when we are activating
|
||||||
|
as well.
|
||||||
|
|
||||||
2002-07-24 Havoc Pennington <hp@pobox.com>
|
2002-07-24 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* gtk/gtktextview.c: Apply patch from Gustavo
|
* gtk/gtktextview.c: Apply patch from Gustavo
|
||||||
|
@ -52,6 +52,8 @@ static void gtk_toggle_button_class_init (GtkToggleButtonClass *klass);
|
|||||||
static void gtk_toggle_button_init (GtkToggleButton *toggle_button);
|
static void gtk_toggle_button_init (GtkToggleButton *toggle_button);
|
||||||
static gint gtk_toggle_button_expose (GtkWidget *widget,
|
static gint gtk_toggle_button_expose (GtkWidget *widget,
|
||||||
GdkEventExpose *event);
|
GdkEventExpose *event);
|
||||||
|
static gboolean gtk_toggle_button_mnemonic_activate (GtkWidget *widget,
|
||||||
|
gboolean group_cycling);
|
||||||
static void gtk_toggle_button_pressed (GtkButton *button);
|
static void gtk_toggle_button_pressed (GtkButton *button);
|
||||||
static void gtk_toggle_button_released (GtkButton *button);
|
static void gtk_toggle_button_released (GtkButton *button);
|
||||||
static void gtk_toggle_button_clicked (GtkButton *button);
|
static void gtk_toggle_button_clicked (GtkButton *button);
|
||||||
@ -115,6 +117,7 @@ gtk_toggle_button_class_init (GtkToggleButtonClass *class)
|
|||||||
gobject_class->get_property = gtk_toggle_button_get_property;
|
gobject_class->get_property = gtk_toggle_button_get_property;
|
||||||
|
|
||||||
widget_class->expose_event = gtk_toggle_button_expose;
|
widget_class->expose_event = gtk_toggle_button_expose;
|
||||||
|
widget_class->mnemonic_activate = gtk_toggle_button_mnemonic_activate;
|
||||||
|
|
||||||
button_class->pressed = gtk_toggle_button_pressed;
|
button_class->pressed = gtk_toggle_button_pressed;
|
||||||
button_class->released = gtk_toggle_button_released;
|
button_class->released = gtk_toggle_button_released;
|
||||||
@ -401,6 +404,24 @@ gtk_toggle_button_expose (GtkWidget *widget,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
gtk_toggle_button_mnemonic_activate (GtkWidget *widget,
|
||||||
|
gboolean group_cycling)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* We override the standard implementation in
|
||||||
|
* gtk_widget_real_mnemonic_activate() in order to focus the widget even
|
||||||
|
* if there is no mnemonic conflict.
|
||||||
|
*/
|
||||||
|
if (GTK_WIDGET_CAN_FOCUS (widget))
|
||||||
|
gtk_widget_grab_focus (widget);
|
||||||
|
|
||||||
|
if (!group_cycling)
|
||||||
|
gtk_widget_activate (widget);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gtk_toggle_button_pressed (GtkButton *button)
|
gtk_toggle_button_pressed (GtkButton *button)
|
||||||
{
|
{
|
||||||
|
@ -631,7 +631,7 @@ gtk_widget_class_init (GtkWidgetClass *klass)
|
|||||||
widget_signals[MNEMONIC_ACTIVATE] =
|
widget_signals[MNEMONIC_ACTIVATE] =
|
||||||
g_signal_new ("mnemonic_activate",
|
g_signal_new ("mnemonic_activate",
|
||||||
GTK_CLASS_TYPE (object_class),
|
GTK_CLASS_TYPE (object_class),
|
||||||
GTK_RUN_LAST,
|
G_SIGNAL_RUN_LAST,
|
||||||
GTK_SIGNAL_OFFSET (GtkWidgetClass, mnemonic_activate),
|
GTK_SIGNAL_OFFSET (GtkWidgetClass, mnemonic_activate),
|
||||||
_gtk_boolean_handled_accumulator, NULL,
|
_gtk_boolean_handled_accumulator, NULL,
|
||||||
_gtk_marshal_BOOLEAN__BOOLEAN,
|
_gtk_marshal_BOOLEAN__BOOLEAN,
|
||||||
|
Loading…
Reference in New Issue
Block a user