mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-11 13:10:07 +00:00
Add some documenting comments about GTK_CAN_DEFAULT, GTK_HAS_DEFAULT and
Sun Sep 03 00:47:08 2000 George Lebl <jirka@5z.com> * gtk/gtkwidget.h: Add some documenting comments about GTK_CAN_DEFAULT, GTK_HAS_DEFAULT and GTK_RECEIVES_DEFAULT just as owen said on irc. * gtk/gtkwindow.c (gtk_window_set_default): Don't blindly set HAS_DEFAULT. Only set it if there isn't another window holding it (a focus window which RECEIVES_DEFAULT) and only unset it if the widget is not the focused window with RECEIVES_DEFAULT. This fixes weird double default bugs in dialogs which has things call gtk_window_set_default at times.
This commit is contained in:
parent
e4229e9c4b
commit
49a6b8335d
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
Sun Sep 03 00:47:08 2000 George Lebl <jirka@5z.com>
|
||||
|
||||
* gtk/gtkwidget.h: Add some documenting comments about
|
||||
GTK_CAN_DEFAULT, GTK_HAS_DEFAULT and GTK_RECEIVES_DEFAULT
|
||||
just as owen said on irc.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_set_default): Don't blindly
|
||||
set HAS_DEFAULT. Only set it if there isn't another window
|
||||
holding it (a focus window which RECEIVES_DEFAULT) and only unset
|
||||
it if the widget is not the focused window with RECEIVES_DEFAULT.
|
||||
This fixes weird double default bugs in dialogs which has things
|
||||
call gtk_window_set_default at times.
|
||||
|
||||
Fri Sep 1 22:39:07 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.[ch] TODO.xml: Apply patch from
|
||||
|
@ -1,3 +1,16 @@
|
||||
Sun Sep 03 00:47:08 2000 George Lebl <jirka@5z.com>
|
||||
|
||||
* gtk/gtkwidget.h: Add some documenting comments about
|
||||
GTK_CAN_DEFAULT, GTK_HAS_DEFAULT and GTK_RECEIVES_DEFAULT
|
||||
just as owen said on irc.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_set_default): Don't blindly
|
||||
set HAS_DEFAULT. Only set it if there isn't another window
|
||||
holding it (a focus window which RECEIVES_DEFAULT) and only unset
|
||||
it if the widget is not the focused window with RECEIVES_DEFAULT.
|
||||
This fixes weird double default bugs in dialogs which has things
|
||||
call gtk_window_set_default at times.
|
||||
|
||||
Fri Sep 1 22:39:07 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.[ch] TODO.xml: Apply patch from
|
||||
|
@ -1,3 +1,16 @@
|
||||
Sun Sep 03 00:47:08 2000 George Lebl <jirka@5z.com>
|
||||
|
||||
* gtk/gtkwidget.h: Add some documenting comments about
|
||||
GTK_CAN_DEFAULT, GTK_HAS_DEFAULT and GTK_RECEIVES_DEFAULT
|
||||
just as owen said on irc.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_set_default): Don't blindly
|
||||
set HAS_DEFAULT. Only set it if there isn't another window
|
||||
holding it (a focus window which RECEIVES_DEFAULT) and only unset
|
||||
it if the widget is not the focused window with RECEIVES_DEFAULT.
|
||||
This fixes weird double default bugs in dialogs which has things
|
||||
call gtk_window_set_default at times.
|
||||
|
||||
Fri Sep 1 22:39:07 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.[ch] TODO.xml: Apply patch from
|
||||
|
@ -1,3 +1,16 @@
|
||||
Sun Sep 03 00:47:08 2000 George Lebl <jirka@5z.com>
|
||||
|
||||
* gtk/gtkwidget.h: Add some documenting comments about
|
||||
GTK_CAN_DEFAULT, GTK_HAS_DEFAULT and GTK_RECEIVES_DEFAULT
|
||||
just as owen said on irc.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_set_default): Don't blindly
|
||||
set HAS_DEFAULT. Only set it if there isn't another window
|
||||
holding it (a focus window which RECEIVES_DEFAULT) and only unset
|
||||
it if the widget is not the focused window with RECEIVES_DEFAULT.
|
||||
This fixes weird double default bugs in dialogs which has things
|
||||
call gtk_window_set_default at times.
|
||||
|
||||
Fri Sep 1 22:39:07 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.[ch] TODO.xml: Apply patch from
|
||||
|
@ -1,3 +1,16 @@
|
||||
Sun Sep 03 00:47:08 2000 George Lebl <jirka@5z.com>
|
||||
|
||||
* gtk/gtkwidget.h: Add some documenting comments about
|
||||
GTK_CAN_DEFAULT, GTK_HAS_DEFAULT and GTK_RECEIVES_DEFAULT
|
||||
just as owen said on irc.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_set_default): Don't blindly
|
||||
set HAS_DEFAULT. Only set it if there isn't another window
|
||||
holding it (a focus window which RECEIVES_DEFAULT) and only unset
|
||||
it if the widget is not the focused window with RECEIVES_DEFAULT.
|
||||
This fixes weird double default bugs in dialogs which has things
|
||||
call gtk_window_set_default at times.
|
||||
|
||||
Fri Sep 1 22:39:07 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.[ch] TODO.xml: Apply patch from
|
||||
|
@ -1,3 +1,16 @@
|
||||
Sun Sep 03 00:47:08 2000 George Lebl <jirka@5z.com>
|
||||
|
||||
* gtk/gtkwidget.h: Add some documenting comments about
|
||||
GTK_CAN_DEFAULT, GTK_HAS_DEFAULT and GTK_RECEIVES_DEFAULT
|
||||
just as owen said on irc.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_set_default): Don't blindly
|
||||
set HAS_DEFAULT. Only set it if there isn't another window
|
||||
holding it (a focus window which RECEIVES_DEFAULT) and only unset
|
||||
it if the widget is not the focused window with RECEIVES_DEFAULT.
|
||||
This fixes weird double default bugs in dialogs which has things
|
||||
call gtk_window_set_default at times.
|
||||
|
||||
Fri Sep 1 22:39:07 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.[ch] TODO.xml: Apply patch from
|
||||
|
@ -1,3 +1,16 @@
|
||||
Sun Sep 03 00:47:08 2000 George Lebl <jirka@5z.com>
|
||||
|
||||
* gtk/gtkwidget.h: Add some documenting comments about
|
||||
GTK_CAN_DEFAULT, GTK_HAS_DEFAULT and GTK_RECEIVES_DEFAULT
|
||||
just as owen said on irc.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_set_default): Don't blindly
|
||||
set HAS_DEFAULT. Only set it if there isn't another window
|
||||
holding it (a focus window which RECEIVES_DEFAULT) and only unset
|
||||
it if the widget is not the focused window with RECEIVES_DEFAULT.
|
||||
This fixes weird double default bugs in dialogs which has things
|
||||
call gtk_window_set_default at times.
|
||||
|
||||
Fri Sep 1 22:39:07 2000 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkmenu.[ch] TODO.xml: Apply patch from
|
||||
|
@ -53,14 +53,25 @@ typedef enum
|
||||
GTK_PARENT_SENSITIVE = 1 << 10,
|
||||
GTK_CAN_FOCUS = 1 << 11,
|
||||
GTK_HAS_FOCUS = 1 << 12,
|
||||
|
||||
/* widget is allowed to receive the default via gtk_widget_grab_default
|
||||
* and will reserve space to draw the default if possible */
|
||||
GTK_CAN_DEFAULT = 1 << 13,
|
||||
|
||||
/* the widget currently is receiving the default action and should be drawn
|
||||
* appropriately if possible */
|
||||
GTK_HAS_DEFAULT = 1 << 14,
|
||||
|
||||
GTK_HAS_GRAB = 1 << 15,
|
||||
GTK_RC_STYLE = 1 << 16,
|
||||
GTK_COMPOSITE_CHILD = 1 << 17,
|
||||
GTK_NO_REPARENT = 1 << 18,
|
||||
GTK_APP_PAINTABLE = 1 << 19,
|
||||
|
||||
/* the widget when focused will receive the default action and have
|
||||
* HAS_DEFAULT set even if there is a different widget set as default */
|
||||
GTK_RECEIVES_DEFAULT = 1 << 20,
|
||||
|
||||
GTK_DOUBLE_BUFFERED = 1 << 21
|
||||
} GtkWidgetFlags;
|
||||
|
||||
|
@ -471,7 +471,9 @@ gtk_window_set_default (GtkWindow *window,
|
||||
{
|
||||
if (window->default_widget)
|
||||
{
|
||||
GTK_WIDGET_UNSET_FLAGS (window->default_widget, GTK_HAS_DEFAULT);
|
||||
if (window->focus_widget != window->default_widget ||
|
||||
!GTK_WIDGET_RECEIVES_DEFAULT (window->default_widget))
|
||||
GTK_WIDGET_UNSET_FLAGS (window->default_widget, GTK_HAS_DEFAULT);
|
||||
gtk_widget_draw_default (window->default_widget);
|
||||
}
|
||||
|
||||
@ -479,7 +481,9 @@ gtk_window_set_default (GtkWindow *window,
|
||||
|
||||
if (window->default_widget)
|
||||
{
|
||||
GTK_WIDGET_SET_FLAGS (window->default_widget, GTK_HAS_DEFAULT);
|
||||
if (window->focus_widget == NULL ||
|
||||
!GTK_WIDGET_RECEIVES_DEFAULT (window->focus_widget))
|
||||
GTK_WIDGET_SET_FLAGS (window->default_widget, GTK_HAS_DEFAULT);
|
||||
gtk_widget_draw_default (window->default_widget);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user