From 15b845f277e2d0a8eb5c6688de84713914302df5 Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Sat, 1 May 2004 17:08:23 +0000 Subject: [PATCH] Fixed menu separators. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/motif/menu.cpp | 2 +- src/motif/menuitem.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/motif/menu.cpp b/src/motif/menu.cpp index e2cefa286f..1ec07c6b31 100644 --- a/src/motif/menu.cpp +++ b/src/motif/menu.cpp @@ -83,7 +83,7 @@ void wxMenu::Init() if ( !!m_title ) { - Append(wxID_SEPARATOR, m_title) ; + Append(-3, m_title) ; AppendSeparator() ; } diff --git a/src/motif/menuitem.cpp b/src/motif/menuitem.cpp index e632f72dea..b77709f6d6 100644 --- a/src/motif/menuitem.cpp +++ b/src/motif/menuitem.cpp @@ -167,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); @@ -226,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); @@ -246,7 +246,7 @@ void wxMenuItem::CreateItem (WXWidget menu, wxMenuBar * menuBar, wxMenu * topMen void wxMenuItem::DestroyItem(bool full) { - if (GetId() == -2) + if (GetId() == -3) { ; // Nothing @@ -267,7 +267,7 @@ void wxMenuItem::DestroyItem(bool full) wxMenuItemDisarmCallback, (XtPointer) this); } } - else if (GetId() == -1) + else if (GetId() == wxID_SEPARATOR) { ; // Nothing -- 2.47.2