diff options
author | Owen Taylor <otaylor@redhat.com> | 2001-11-18 00:34:23 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2001-11-18 00:34:23 +0000 |
commit | adca28f8c23fea96c79347aa278b323539f3eca8 (patch) | |
tree | 85bae2fdb02ded51218f62ee39619e6ec91db06d | |
parent | 3f376d75ac790285d03735b1416290b6031b2d07 (diff) | |
download | gdk-pixbuf-adca28f8c23fea96c79347aa278b323539f3eca8.tar.gz |
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.
-rw-r--r-- | ChangeLog | 15 | ||||
-rw-r--r-- | ChangeLog.pre-2-0 | 15 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 15 | ||||
-rw-r--r-- | ChangeLog.pre-2-2 | 15 | ||||
-rw-r--r-- | ChangeLog.pre-2-4 | 15 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 15 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 15 | ||||
-rw-r--r-- | docs/Changes-2.0.txt | 4 | ||||
-rw-r--r-- | gtk/gtklayout.h | 3 | ||||
-rw-r--r-- | gtk/gtkwindow.c | 55 |
10 files changed, 137 insertions, 30 deletions
@@ -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): diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 5249d0e48..3d6622556 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -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): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5249d0e48..3d6622556 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -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): diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 5249d0e48..3d6622556 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -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): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 5249d0e48..3d6622556 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -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): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 5249d0e48..3d6622556 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -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): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 5249d0e48..3d6622556 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -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): diff --git a/docs/Changes-2.0.txt b/docs/Changes-2.0.txt index 6c2ceac78..6e4222577 100644 --- a/docs/Changes-2.0.txt +++ b/docs/Changes-2.0.txt @@ -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.
\ No newline at end of file diff --git a/gtk/gtklayout.h b/gtk/gtklayout.h index 68bb43cb3..fbefca9b3 100644 --- a/gtk/gtklayout.h +++ b/gtk/gtklayout.h @@ -59,9 +59,6 @@ struct _GtkLayout { guint width; guint height; - guint xoffset; - guint yoffset; - GtkAdjustment *hadjustment; GtkAdjustment *vadjustment; diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index de3e356ed..27c5eed10 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -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); |