]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed menu separators.
authorMattia Barbon <mbarbon@cpan.org>
Sat, 1 May 2004 17:08:23 +0000 (17:08 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Sat, 1 May 2004 17:08:23 +0000 (17:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27038 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/motif/menu.cpp
src/motif/menuitem.cpp

index e2cefa286f7aeb1dd17868354b7da92f0e91a779..1ec07c6b31a4197ff0c9f75b7032015aa659db7c 100644 (file)
@@ -83,7 +83,7 @@ void wxMenu::Init()
 
     if ( !!m_title )
     {
-        Append(wxID_SEPARATOR, m_title) ;
+        Append(-3, m_title) ;
         AppendSeparator() ;
     }
 
index e632f72dea7141138884c4b4d427fb7dae617bc9..b77709f6d6b1fcd8ed7c619c116cd3f4f2b9951c 100644 (file)
@@ -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