Reprioritize key bindings in order of visibility - mnemonics, then
Sat Nov 17 19:26:20 2001 Owen Taylor <otaylor@redhat.com> * gtk/gtkwindow.c (gtk_window_key_press_event): Reprioritize key bindings in order of visibility - mnemonics, then accelerators, then send key to the focus widget, then bindings on the GtkWindow. * gtk/gtklayout.h docs/Changes-2.0.txt tests/testgtk.c: Removed the xoffset, yoffset fields of GtkLayout which were identically zero for compat with 1.2, but were no longer compatible with all uses of these fields in 1.2. * gtk/gtkwindow.c (gtk_window_set_default): Remove unused variable.
This commit is contained in:
15
ChangeLog
15
ChangeLog
@@ -1,3 +1,18 @@
|
||||
Sat Nov 17 19:26:20 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_key_press_event): Reprioritize
|
||||
key bindings in order of visibility - mnemonics, then
|
||||
accelerators, then send key to the focus widget, then
|
||||
bindings on the GtkWindow.
|
||||
|
||||
* gtk/gtklayout.h docs/Changes-2.0.txt tests/testgtk.c:
|
||||
Removed the xoffset, yoffset fields of GtkLayout which were
|
||||
identically zero for compat with 1.2, but were no longer
|
||||
compatible with all uses of these fields in 1.2.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_set_default): Remove
|
||||
unused variable.
|
||||
|
||||
Sat Nov 17 19:08:13 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testtreeview.c (gtk_tree_model_types_get_type):
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
Sat Nov 17 19:26:20 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_key_press_event): Reprioritize
|
||||
key bindings in order of visibility - mnemonics, then
|
||||
accelerators, then send key to the focus widget, then
|
||||
bindings on the GtkWindow.
|
||||
|
||||
* gtk/gtklayout.h docs/Changes-2.0.txt tests/testgtk.c:
|
||||
Removed the xoffset, yoffset fields of GtkLayout which were
|
||||
identically zero for compat with 1.2, but were no longer
|
||||
compatible with all uses of these fields in 1.2.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_set_default): Remove
|
||||
unused variable.
|
||||
|
||||
Sat Nov 17 19:08:13 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testtreeview.c (gtk_tree_model_types_get_type):
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
Sat Nov 17 19:26:20 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_key_press_event): Reprioritize
|
||||
key bindings in order of visibility - mnemonics, then
|
||||
accelerators, then send key to the focus widget, then
|
||||
bindings on the GtkWindow.
|
||||
|
||||
* gtk/gtklayout.h docs/Changes-2.0.txt tests/testgtk.c:
|
||||
Removed the xoffset, yoffset fields of GtkLayout which were
|
||||
identically zero for compat with 1.2, but were no longer
|
||||
compatible with all uses of these fields in 1.2.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_set_default): Remove
|
||||
unused variable.
|
||||
|
||||
Sat Nov 17 19:08:13 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testtreeview.c (gtk_tree_model_types_get_type):
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
Sat Nov 17 19:26:20 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_key_press_event): Reprioritize
|
||||
key bindings in order of visibility - mnemonics, then
|
||||
accelerators, then send key to the focus widget, then
|
||||
bindings on the GtkWindow.
|
||||
|
||||
* gtk/gtklayout.h docs/Changes-2.0.txt tests/testgtk.c:
|
||||
Removed the xoffset, yoffset fields of GtkLayout which were
|
||||
identically zero for compat with 1.2, but were no longer
|
||||
compatible with all uses of these fields in 1.2.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_set_default): Remove
|
||||
unused variable.
|
||||
|
||||
Sat Nov 17 19:08:13 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testtreeview.c (gtk_tree_model_types_get_type):
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
Sat Nov 17 19:26:20 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_key_press_event): Reprioritize
|
||||
key bindings in order of visibility - mnemonics, then
|
||||
accelerators, then send key to the focus widget, then
|
||||
bindings on the GtkWindow.
|
||||
|
||||
* gtk/gtklayout.h docs/Changes-2.0.txt tests/testgtk.c:
|
||||
Removed the xoffset, yoffset fields of GtkLayout which were
|
||||
identically zero for compat with 1.2, but were no longer
|
||||
compatible with all uses of these fields in 1.2.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_set_default): Remove
|
||||
unused variable.
|
||||
|
||||
Sat Nov 17 19:08:13 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testtreeview.c (gtk_tree_model_types_get_type):
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
Sat Nov 17 19:26:20 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_key_press_event): Reprioritize
|
||||
key bindings in order of visibility - mnemonics, then
|
||||
accelerators, then send key to the focus widget, then
|
||||
bindings on the GtkWindow.
|
||||
|
||||
* gtk/gtklayout.h docs/Changes-2.0.txt tests/testgtk.c:
|
||||
Removed the xoffset, yoffset fields of GtkLayout which were
|
||||
identically zero for compat with 1.2, but were no longer
|
||||
compatible with all uses of these fields in 1.2.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_set_default): Remove
|
||||
unused variable.
|
||||
|
||||
Sat Nov 17 19:08:13 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testtreeview.c (gtk_tree_model_types_get_type):
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
Sat Nov 17 19:26:20 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_key_press_event): Reprioritize
|
||||
key bindings in order of visibility - mnemonics, then
|
||||
accelerators, then send key to the focus widget, then
|
||||
bindings on the GtkWindow.
|
||||
|
||||
* gtk/gtklayout.h docs/Changes-2.0.txt tests/testgtk.c:
|
||||
Removed the xoffset, yoffset fields of GtkLayout which were
|
||||
identically zero for compat with 1.2, but were no longer
|
||||
compatible with all uses of these fields in 1.2.
|
||||
|
||||
* gtk/gtkwindow.c (gtk_window_set_default): Remove
|
||||
unused variable.
|
||||
|
||||
Sat Nov 17 19:08:13 2001 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* tests/testtreeview.c (gtk_tree_model_types_get_type):
|
||||
|
||||
@@ -528,3 +528,7 @@ Incompatible Changes from GTK+-1.2 to GTK+-2.0:
|
||||
you must make sure you call gtk_container_propagate_expose()
|
||||
correctly, as you must for any NO_WINDOW widgets.
|
||||
|
||||
* GtkLayout no longer has the xoffset, yoffset fields, which used
|
||||
to store the difference between world and window coordinates for
|
||||
layout->bin_window. These coordinate systems are now always
|
||||
the same.
|
||||
@@ -59,9 +59,6 @@ struct _GtkLayout {
|
||||
guint width;
|
||||
guint height;
|
||||
|
||||
guint xoffset;
|
||||
guint yoffset;
|
||||
|
||||
GtkAdjustment *hadjustment;
|
||||
GtkAdjustment *vadjustment;
|
||||
|
||||
|
||||
@@ -978,8 +978,6 @@ void
|
||||
gtk_window_set_default (GtkWindow *window,
|
||||
GtkWidget *default_widget)
|
||||
{
|
||||
GtkWidget *old_default;
|
||||
|
||||
g_return_if_fail (GTK_IS_WINDOW (window));
|
||||
|
||||
if (default_widget)
|
||||
@@ -3526,31 +3524,6 @@ gtk_window_key_press_event (GtkWidget *widget,
|
||||
|
||||
handled = FALSE;
|
||||
|
||||
focus = window->focus_widget;
|
||||
if (focus)
|
||||
g_object_ref (focus);
|
||||
|
||||
while (!handled &&
|
||||
focus && focus != widget &&
|
||||
gtk_widget_get_toplevel (focus) == widget)
|
||||
{
|
||||
GtkWidget *parent;
|
||||
|
||||
if (GTK_WIDGET_IS_SENSITIVE (focus))
|
||||
handled = gtk_widget_event (focus, (GdkEvent*) event);
|
||||
|
||||
parent = focus->parent;
|
||||
if (parent)
|
||||
g_object_ref (parent);
|
||||
|
||||
g_object_unref (focus);
|
||||
|
||||
focus = parent;
|
||||
}
|
||||
|
||||
if (focus)
|
||||
g_object_unref (focus);
|
||||
|
||||
if (!handled)
|
||||
handled = gtk_window_mnemonic_activate (window,
|
||||
event->keyval,
|
||||
@@ -3559,6 +3532,34 @@ gtk_window_key_press_event (GtkWidget *widget,
|
||||
if (!handled)
|
||||
handled = gtk_accel_groups_activate (G_OBJECT (window), event->keyval, event->state);
|
||||
|
||||
if (!handled)
|
||||
{
|
||||
focus = window->focus_widget;
|
||||
if (focus)
|
||||
g_object_ref (focus);
|
||||
|
||||
while (!handled &&
|
||||
focus && focus != widget &&
|
||||
gtk_widget_get_toplevel (focus) == widget)
|
||||
{
|
||||
GtkWidget *parent;
|
||||
|
||||
if (GTK_WIDGET_IS_SENSITIVE (focus))
|
||||
handled = gtk_widget_event (focus, (GdkEvent*) event);
|
||||
|
||||
parent = focus->parent;
|
||||
if (parent)
|
||||
g_object_ref (parent);
|
||||
|
||||
g_object_unref (focus);
|
||||
|
||||
focus = parent;
|
||||
}
|
||||
|
||||
if (focus)
|
||||
g_object_unref (focus);
|
||||
}
|
||||
|
||||
/* Chain up, invokes binding set */
|
||||
if (!handled && GTK_WIDGET_CLASS (parent_class)->key_press_event)
|
||||
handled = GTK_WIDGET_CLASS (parent_class)->key_press_event (widget, event);
|
||||
|
||||
Reference in New Issue
Block a user