projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wxSizerFlags name fix, accessors only available to wxSizer (supposively :))
[wxWidgets.git]
/
src
/
os2
/
menu.cpp
diff --git
a/src/os2/menu.cpp
b/src/os2/menu.cpp
index a834dd5e855bbd9d46248f215f862e53b9dc3beb..ca8af4aa8e39287bbb6751d70f10733184312863 100644
(file)
--- a/
src/os2/menu.cpp
+++ b/
src/os2/menu.cpp
@@
-47,7
+47,7
@@
extern wxMenu* wxCurrentPopupMenu;
//
// The (popup) menu title has this special id
//
//
// The (popup) menu title has this special id
//
-static const int idMenuTitle = -
2
;
+static const int idMenuTitle = -
3
;
//
// The unique ID for Menus
//
// The unique ID for Menus
@@
-280,7
+280,7
@@
bool wxMenu::DoInsertOrAppend(
rItem.id = pItem->GetId();
}
rItem.id = pItem->GetId();
}
- BYTE* pData;
+ BYTE* pData
=NULL
;
#if wxUSE_OWNER_DRAWN
if (pItem->IsOwnerDrawn())
#if wxUSE_OWNER_DRAWN
if (pItem->IsOwnerDrawn())
@@
-304,10
+304,18
@@
bool wxMenu::DoInsertOrAppend(
}
else
{
}
else
{
- //
- // Menu is just a normal string (passed in data parameter)
- //
- rItem.afStyle |= MIS_TEXT;
+ if (pItem->GetId() == idMenuTitle)
+ {
+ // Item is an unselectable title to be passed via pData
+ rItem.afStyle = MIS_STATIC;
+ }
+ else
+ {
+ //
+ // Menu is just a normal string (passed in data parameter)
+ //
+ rItem.afStyle |= MIS_TEXT;
+ }
pData = (char*)pItem->GetText().c_str();
}
pData = (char*)pItem->GetText().c_str();
}