Fixed menu separators.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Mattia Barbon
2004-05-01 17:08:23 +00:00
parent 0c02f0701e
commit 15b845f277
2 changed files with 6 additions and 6 deletions

View File

@@ -83,7 +83,7 @@ void wxMenu::Init()
if ( !!m_title ) if ( !!m_title )
{ {
Append(wxID_SEPARATOR, m_title) ; Append(-3, m_title) ;
AppendSeparator() ; AppendSeparator() ;
} }

View File

@@ -167,9 +167,9 @@ void wxMenuItem::CreateItem (WXWidget menu, wxMenuBar * menuBar, wxMenu * topMen
m_menuBar = menuBar; m_menuBar = menuBar;
m_topMenu = topMenu; 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 m_buttonWidget = (WXWidget) XtVaCreateManagedWidget
(wxStripMenuCodes(m_text), (wxStripMenuCodes(m_text),
xmLabelGadgetClass, (Widget) menu, NULL); xmLabelGadgetClass, (Widget) menu, NULL);
@@ -226,7 +226,7 @@ void wxMenuItem::CreateItem (WXWidget menu, wxMenuBar * menuBar, wxMenu * topMen
(XtCallbackProc) wxMenuItemDisarmCallback, (XtCallbackProc) wxMenuItemDisarmCallback,
(XtPointer) this); (XtPointer) this);
} }
else if (GetId() == -1) else if (GetId() == wxID_SEPARATOR)
{ {
m_buttonWidget = (WXWidget) XtVaCreateManagedWidget ("separator", m_buttonWidget = (WXWidget) XtVaCreateManagedWidget ("separator",
xmSeparatorGadgetClass, (Widget) menu, NULL); xmSeparatorGadgetClass, (Widget) menu, NULL);
@@ -246,7 +246,7 @@ void wxMenuItem::CreateItem (WXWidget menu, wxMenuBar * menuBar, wxMenu * topMen
void wxMenuItem::DestroyItem(bool full) void wxMenuItem::DestroyItem(bool full)
{ {
if (GetId() == -2) if (GetId() == -3)
{ {
; // Nothing ; // Nothing
@@ -267,7 +267,7 @@ void wxMenuItem::DestroyItem(bool full)
wxMenuItemDisarmCallback, (XtPointer) this); wxMenuItemDisarmCallback, (XtPointer) this);
} }
} }
else if (GetId() == -1) else if (GetId() == wxID_SEPARATOR)
{ {
; // Nothing ; // Nothing