]> Pileus Git - ~andy/gtk/commitdiff
Reprioritize key bindings in order of visibility - mnemonics, then
authorOwen Taylor <otaylor@redhat.com>
Sun, 18 Nov 2001 00:34:23 +0000 (00:34 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Sun, 18 Nov 2001 00:34:23 +0000 (00:34 +0000)
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.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
docs/Changes-2.0.txt
gtk/gtklayout.h
gtk/gtkwindow.c

index 5249d0e485d7f8f121b683f05a4de948cc41a2fd..3d662255647da2af32f3d42dda65c74f254fec09 100644 (file)
--- a/ChangeLog
+++ b/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): 
index 5249d0e485d7f8f121b683f05a4de948cc41a2fd..3d662255647da2af32f3d42dda65c74f254fec09 100644 (file)
@@ -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): 
index 5249d0e485d7f8f121b683f05a4de948cc41a2fd..3d662255647da2af32f3d42dda65c74f254fec09 100644 (file)
@@ -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): 
index 5249d0e485d7f8f121b683f05a4de948cc41a2fd..3d662255647da2af32f3d42dda65c74f254fec09 100644 (file)
@@ -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): 
index 5249d0e485d7f8f121b683f05a4de948cc41a2fd..3d662255647da2af32f3d42dda65c74f254fec09 100644 (file)
@@ -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): 
index 5249d0e485d7f8f121b683f05a4de948cc41a2fd..3d662255647da2af32f3d42dda65c74f254fec09 100644 (file)
@@ -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): 
index 5249d0e485d7f8f121b683f05a4de948cc41a2fd..3d662255647da2af32f3d42dda65c74f254fec09 100644 (file)
@@ -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): 
index 6c2ceac78a1cc8c56ff8e5c9162c24ae62da3b4a..6e4222577e5f67fb0514c4bb6982ea637f3d91a1 100644 (file)
@@ -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
index 68bb43cb3aae9dd06dd7d054bc8039ead1ba4803..fbefca9b385613b90a1b41426718376018d2bbbe 100644 (file)
@@ -59,9 +59,6 @@ struct _GtkLayout {
   guint width;
   guint height;
 
-  guint xoffset;
-  guint yoffset;
-
   GtkAdjustment *hadjustment;
   GtkAdjustment *vadjustment;
 
index de3e356ed13b2d09d549691213765cf1f7d7c097..27c5eed10dfa9641ca4d22431f63f02979e022af 100644 (file)
@@ -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);