private:
// common part of all ctors
- void Init();
+ void Init(const wxString& text);
// DoSetText() transforms the accel mnemonics in our label from MSW/wxWin
// style to GTK+ and is called from ctor and SetText()
private:
// common part of all ctors
- void Init();
+ void Init(const wxString& text);
// DoSetText() transforms the accel mnemonics in our label from MSW/wxWin
// style to GTK+ and is called from ctor and SetText()
wxMenu *subMenu)
: wxMenuItemBase(parentMenu, id, text, help, kind, subMenu)
{
- Init();
+ Init(text);
}
wxMenuItem::wxMenuItem(wxMenu *parentMenu,
: wxMenuItemBase(parentMenu, id, text, help,
isCheckable ? wxITEM_CHECK : wxITEM_NORMAL, subMenu)
{
- Init();
+ Init(text);
}
-void wxMenuItem::Init()
+void wxMenuItem::Init(const wxString& text)
{
m_labelWidget = (GtkWidget *) NULL;
m_menuItem = (GtkWidget *) NULL;
- DoSetText(m_text);
+ DoSetText(text);
}
wxMenuItem::~wxMenuItem()
wxMenu *subMenu)
: wxMenuItemBase(parentMenu, id, text, help, kind, subMenu)
{
- Init();
+ Init(text);
}
wxMenuItem::wxMenuItem(wxMenu *parentMenu,
: wxMenuItemBase(parentMenu, id, text, help,
isCheckable ? wxITEM_CHECK : wxITEM_NORMAL, subMenu)
{
- Init();
+ Init(text);
}
-void wxMenuItem::Init()
+void wxMenuItem::Init(const wxString& text)
{
m_labelWidget = (GtkWidget *) NULL;
m_menuItem = (GtkWidget *) NULL;
- DoSetText(m_text);
+ DoSetText(text);
}
wxMenuItem::~wxMenuItem()