]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
reuse code from wxDC::GetMultiLineTextExtent() instead of duplicating it here
[wxWidgets.git] / src / gtk / window.cpp
index 6b8510a2e4a9819945ae489ef08ca01e4591e98a..4e92f5a4234156c22bc6d7a47700c01b2b2cf44e 100644 (file)
@@ -1217,6 +1217,28 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
         return true;
     }
     
+#endif  // #ifndef  __WXGTK20__
+
+#if wxUSE_ACCEL
+    if (!ret)
+    {
+        wxWindowGTK *ancestor = win;
+        while (ancestor)
+        {
+            int command = ancestor->GetAcceleratorTable()->GetCommand( event );
+            if (command != -1)
+            {
+                wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command );
+                ret = ancestor->GetEventHandler()->ProcessEvent( command_event );
+                break;
+            }
+            if (ancestor->IsTopLevel())
+                break;
+            ancestor = ancestor->GetParent();
+        }
+    }
+#endif // wxUSE_ACCEL
+
     // Only send wxEVT_CHAR event if not processed yet. Thus, ALT-x
     // will only be sent if it is not in an accelerator table.
     if (!ret)
@@ -1262,28 +1284,9 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
             }
         }
     }
-#endif  // #ifndef  __WXGTK20__
 
 
-#if wxUSE_ACCEL
-    if (!ret)
-    {
-        wxWindowGTK *ancestor = win;
-        while (ancestor)
-        {
-            int command = ancestor->GetAcceleratorTable()->GetCommand( event );
-            if (command != -1)
-            {
-                wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command );
-                ret = ancestor->GetEventHandler()->ProcessEvent( command_event );
-                break;
-            }
-            if (ancestor->IsTopLevel())
-                break;
-            ancestor = ancestor->GetParent();
-        }
-    }
-#endif // wxUSE_ACCEL
+
 
 
     // win is a control: tab can be propagated up