projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more changes from 2.8.4 added
[wxWidgets.git]
/
src
/
motif
/
menu.cpp
diff --git
a/src/motif/menu.cpp
b/src/motif/menu.cpp
index 52a8343fff1b2a6a878d854b750e5586d0dba367..abbe28a36533d0a86ed3ff9184e1a5808c9b83a3 100644
(file)
--- a/
src/motif/menu.cpp
+++ b/
src/motif/menu.cpp
@@
-27,11
+27,10
@@
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/frame.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/frame.h"
+ #include "wx/settings.h"
+ #include "wx/menuitem.h"
#endif
#endif
-#include "wx/menuitem.h"
-#include "wx/settings.h"
-
#ifdef __VMS__
#pragma message disable nosimpint
#define XtDisplay XTDISPLAY
#ifdef __VMS__
#pragma message disable nosimpint
#define XtDisplay XTDISPLAY
@@
-319,20
+318,17
@@
wxMenu *wxMenuBar::Remove(size_t pos)
// Find the menu menuString, item itemString, and return the item id.
// Returns -1 if none found.
// Find the menu menuString, item itemString, and return the item id.
// Returns -1 if none found.
-int wxMenuBar::FindMenuItem
(const wxString& menuString, const wxString& itemString) const
+int wxMenuBar::FindMenuItem(const wxString& menuString, const wxString& itemString) const
{
{
- char buf1[200];
- char buf2[200];
- wxStripMenuCodes (wxConstCast(menuString.c_str(), char), buf1);
+ const wxString stripped = wxStripMenuCodes(menuString);
size_t menuCount = GetMenuCount();
for (size_t i = 0; i < menuCount; i++)
{
size_t menuCount = GetMenuCount();
for (size_t i = 0; i < menuCount; i++)
{
- wxStripMenuCodes (wxConstCast(m_titles[i].c_str(), char), buf2);
- if (strcmp (buf1, buf2) == 0)
+ if ( wxStripMenuCodes(m_titles[i]) == stripped )
return m_menus.Item(i)->GetData()->FindItem (itemString);
}
return m_menus.Item(i)->GetData()->FindItem (itemString);
}
- return
-1
;
+ return
wxNOT_FOUND
;
}
wxMenuItem *wxMenuBar::FindItem(int id, wxMenu ** itemMenu) const
}
wxMenuItem *wxMenuBar::FindItem(int id, wxMenu ** itemMenu) const