]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/menu.cpp
assert in OnSelected() fixed
[wxWidgets.git] / src / motif / menu.cpp
index 7fa4d9f93b1e5eb8c712ec1d3ddcc65a879df37a..23b39e39ba71ea75859b931602d4a10fa1ccc07f 100644 (file)
@@ -162,14 +162,14 @@ bool wxMenu::ProcessCommand(wxCommandEvent & event)
 {
     bool processed = FALSE;
 
-#if WXWIN_COMPATIBILITY
+#if wxUSE_MENU_CALLBACK
     // Try a callback
     if (m_callback)
     {
         (void) (*(m_callback)) (*this, event);
         processed = TRUE;
     }
-#endif // WXWIN_COMPATIBILITY
+#endif // wxUSE_MENU_CALLBACK
 
     // Try the menu's event handler
     if ( !processed && GetEventHandler())
@@ -216,7 +216,8 @@ wxMenuBar::~wxMenuBar()
 
 void wxMenuBar::EnableTop(size_t WXUNUSED(pos), bool WXUNUSED(flag))
 {
-    wxFAIL_MSG("TODO");
+  //    wxFAIL_MSG("TODO");
+//  wxLogWarning("wxMenuBar::EnableTop not yet implemented.");
 }
 
 void wxMenuBar::SetLabelTop(size_t pos, const wxString& label)
@@ -385,6 +386,9 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent)
             XtVaSetValues(GetWidget(menu),
                           XmNtearOffModel, XmTEAR_OFF_ENABLED,
                           NULL);
+            Widget tearOff = XmGetTearOffControl(GetWidget(menu));
+            wxDoChangeForegroundColour((Widget) tearOff, m_foregroundColour);
+            wxDoChangeBackgroundColour((Widget) tearOff, m_backgroundColour, TRUE);
 #endif
         }
     }