X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/092276a865b66caa5e1b5336dd96145701199e68..53701799b4f51179f9d1ebdc9afc0a1922a36974:/src/motif/menuitem.cpp diff --git a/src/motif/menuitem.cpp b/src/motif/menuitem.cpp index 6283b0bb93..b77709f6d6 100644 --- a/src/motif/menuitem.cpp +++ b/src/motif/menuitem.cpp @@ -13,7 +13,7 @@ // declarations // ============================================================================ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "menuitem.h" #endif @@ -21,6 +21,9 @@ // headers // ---------------------------------------------------------------------------- +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #include "wx/defs.h" #include "wx/menu.h" @@ -89,18 +92,6 @@ wxMenuItem::~wxMenuItem() { } -// misc -// ---- - -// delete the sub menu -void wxMenuItem::DeleteSubMenu() -{ - wxASSERT( m_subMenu != NULL ); - - delete m_subMenu; - m_subMenu = NULL; -} - // change item state // ----------------- @@ -176,9 +167,9 @@ void wxMenuItem::CreateItem (WXWidget menu, wxMenuBar * menuBar, wxMenu * topMen m_menuBar = menuBar; m_topMenu = topMenu; - if (GetId() == -2) + if (GetId() == -3) { - // Id=-2 identifies a Title item. + // Id=-3 identifies a Title item. m_buttonWidget = (WXWidget) XtVaCreateManagedWidget (wxStripMenuCodes(m_text), xmLabelGadgetClass, (Widget) menu, NULL); @@ -235,7 +226,7 @@ void wxMenuItem::CreateItem (WXWidget menu, wxMenuBar * menuBar, wxMenu * topMen (XtCallbackProc) wxMenuItemDisarmCallback, (XtPointer) this); } - else if (GetId() == -1) + else if (GetId() == wxID_SEPARATOR) { m_buttonWidget = (WXWidget) XtVaCreateManagedWidget ("separator", xmSeparatorGadgetClass, (Widget) menu, NULL); @@ -255,7 +246,7 @@ void wxMenuItem::CreateItem (WXWidget menu, wxMenuBar * menuBar, wxMenu * topMen void wxMenuItem::DestroyItem(bool full) { - if (GetId() == -2) + if (GetId() == -3) { ; // Nothing @@ -276,7 +267,7 @@ void wxMenuItem::DestroyItem(bool full) wxMenuItemDisarmCallback, (XtPointer) this); } } - else if (GetId() == -1) + else if (GetId() == wxID_SEPARATOR) { ; // Nothing