summaryrefslogtreecommitdiff
path: root/gtk/gtkplug.c
diff options
context:
space:
mode:
authorGeorge Lebl <jirka@5z.com>1999-01-25 19:05:58 +0000
committerGeorge Lebl <jirka@src.gnome.org>1999-01-25 19:05:58 +0000
commit4b8095d525c3d494a0013011445975eed006e628 (patch)
tree4a141111cecba37f36051906a0be1b1e18c0500d /gtk/gtkplug.c
parent8ac2b1dda638008b9f71de224e28f2b01cfdd91c (diff)
downloadgtk+-4b8095d525c3d494a0013011445975eed006e628.tar.gz
set RECEIVES_DEFAULT on init, and a button press on the widget doesn't
Mon Jan 25 11:05:10 1999 George Lebl <jirka@5z.com> * gtk/gtkbutton.c: set RECEIVES_DEFAULT on init, and a button press on the widget doesn't grab default anymore * gtk/gtkcheckbutton.c,gtk/gtkoptionmenu.c,gtk/gtkradiobutton.c: unset RECEIVES_DEFAULT on init * gtk/gtkwidget.[ch]: add a RECEIVES_DEFAULT flag to widget flags * gtk/gtkwindow.c,gtk/gtkplug.c: on pressing <enter>, activate the focused widget if it is a RECEIVES_DEFAULT widget, no matter what the current default_widget is * gtk/gtkwindow.c: on focus change, migrate the HAS_DEFAULT flag to CAN_DEFAULT widgets if they RECEIVE_DEFAULT as well or migrate it back to the default_widget if the focus widget doesn't "RECEIVE_DEFAULT"
Diffstat (limited to 'gtk/gtkplug.c')
-rw-r--r--gtk/gtkplug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gtk/gtkplug.c b/gtk/gtkplug.c
index ba2e906486..3e6a564d20 100644
--- a/gtk/gtkplug.c
+++ b/gtk/gtkplug.c
@@ -204,7 +204,9 @@ gtk_plug_key_press_event (GtkWidget *widget,
break;
case GDK_Return:
case GDK_KP_Enter:
- if (window->default_widget)
+ if (window->default_widget &&
+ (!window->focus_widget ||
+ !GTK_WIDGET_RECEIVES_DEFAULT (window->focus_widget)))
{
gtk_widget_activate (window->default_widget);
return_val = TRUE;