]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/framecmn.cpp
Include wx/utils.h according to precompiled headers of wx/wx.h (with other minor...
[wxWidgets.git] / src / common / framecmn.cpp
index 6127486170f526268ad04af8b959f0d7db163dd7..923fb49e2df6ea42f1cd600dd4fc1e53ff133710 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "framebase.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -205,6 +201,9 @@ bool wxFrameBase::ProcessCommand(int id)
         if (!item->IsEnabled())
             return true;
 
+        if ((item->GetKind() == wxITEM_RADIO) && item->IsChecked() )
+            return true;
+
         if (item->IsCheckable())
         {
             item->Toggle();
@@ -524,16 +523,16 @@ void wxFrameBase::SetToolBar(wxToolBar *toolbar)
 // update all menus
 void wxFrameBase::DoMenuUpdates(wxMenu* menu)
 {
-    wxEvtHandler* source = GetEventHandler();
-    wxMenuBar* bar = GetMenuBar();
-
     if (menu)
+    {
+        wxEvtHandler* source = GetEventHandler();
         menu->UpdateUI(source);
-    else if ( bar != NULL )
+    }
+    else
     {
-        int nCount = bar->GetMenuCount();
-        for (int n = 0; n < nCount; n++)
-            bar->GetMenu(n)->UpdateUI(source);
+        wxMenuBar* bar = GetMenuBar();
+        if (bar != NULL)
+            bar->UpdateMenus();
     }
 }
 
@@ -569,12 +568,3 @@ void wxFrameBase::SetMenuBar(wxMenuBar *menubar)
 }
 
 #endif // wxUSE_MENUS
-
-#if WXWIN_COMPATIBILITY_2_2
-
-bool wxFrameBase::Command(int winid)
-{
-    return ProcessCommand(winid);
-}
-
-#endif // WXWIN_COMPATIBILITY_2_2