wxTinderbox warning fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: menu.cpp
|
// Name: src/gtk1/menu.cpp
|
||||||
// Purpose:
|
// Purpose:
|
||||||
// Author: Robert Roebling
|
// Author: Robert Roebling
|
||||||
// Id: $Id$
|
// Id: $Id$
|
||||||
@@ -140,7 +140,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxMenuBar,wxWindow)
|
|||||||
void wxMenuBar::Init(size_t n, wxMenu *menus[], const wxString titles[], long style)
|
void wxMenuBar::Init(size_t n, wxMenu *menus[], const wxString titles[], long style)
|
||||||
{
|
{
|
||||||
// the parent window is known after wxFrame::SetMenu()
|
// the parent window is known after wxFrame::SetMenu()
|
||||||
m_needParent = FALSE;
|
m_needParent = false;
|
||||||
m_style = style;
|
m_style = style;
|
||||||
m_invokingWindow = (wxWindow*) NULL;
|
m_invokingWindow = (wxWindow*) NULL;
|
||||||
|
|
||||||
@@ -289,7 +289,7 @@ void wxMenuBar::UnsetInvokingWindow( wxWindow *win )
|
|||||||
bool wxMenuBar::Append( wxMenu *menu, const wxString &title )
|
bool wxMenuBar::Append( wxMenu *menu, const wxString &title )
|
||||||
{
|
{
|
||||||
if ( !wxMenuBarBase::Append( menu, title ) )
|
if ( !wxMenuBarBase::Append( menu, title ) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
return GtkAppend(menu, title);
|
return GtkAppend(menu, title);
|
||||||
}
|
}
|
||||||
@@ -349,20 +349,20 @@ bool wxMenuBar::GtkAppend(wxMenu *menu, const wxString& title, int pos)
|
|||||||
frame->UpdateMenuBarSize();
|
frame->UpdateMenuBarSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
|
bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
|
||||||
{
|
{
|
||||||
if ( !wxMenuBarBase::Insert(pos, menu, title) )
|
if ( !wxMenuBarBase::Insert(pos, menu, title) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
if ( !GtkAppend(menu, title, (int)pos) )
|
if ( !GtkAppend(menu, title, (int)pos) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title)
|
wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title)
|
||||||
@@ -767,7 +767,7 @@ void wxMenuItem::SetText( const wxString& str )
|
|||||||
// Some optimization to avoid flicker
|
// Some optimization to avoid flicker
|
||||||
wxString oldLabel = m_text;
|
wxString oldLabel = m_text;
|
||||||
oldLabel = wxStripMenuCodes(oldLabel);
|
oldLabel = wxStripMenuCodes(oldLabel);
|
||||||
oldLabel.Replace(wxT("_"), wxT(""));
|
oldLabel.Replace(wxT("_"), wxEmptyString);
|
||||||
wxString label1 = wxStripMenuCodes(str);
|
wxString label1 = wxStripMenuCodes(str);
|
||||||
wxString oldhotkey = GetHotKey(); // Store the old hotkey in Ctrl-foo format
|
wxString oldhotkey = GetHotKey(); // Store the old hotkey in Ctrl-foo format
|
||||||
wxCharBuffer oldbuf = wxGTK_CONV( GetGtkHotKey(*this) ); // and as <control>foo
|
wxCharBuffer oldbuf = wxGTK_CONV( GetGtkHotKey(*this) ); // and as <control>foo
|
||||||
@@ -847,7 +847,7 @@ void wxMenuItem::DoSetText( const wxString& str )
|
|||||||
++pc;
|
++pc;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_hotKey = wxT("");
|
m_hotKey = wxEmptyString;
|
||||||
|
|
||||||
if(*pc == wxT('\t'))
|
if(*pc == wxT('\t'))
|
||||||
{
|
{
|
||||||
@@ -908,9 +908,9 @@ void wxMenuItem::Enable( bool enable )
|
|||||||
|
|
||||||
bool wxMenuItem::IsChecked() const
|
bool wxMenuItem::IsChecked() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( m_menuItem, FALSE, wxT("invalid menu item") );
|
wxCHECK_MSG( m_menuItem, false, wxT("invalid menu item") );
|
||||||
|
|
||||||
wxCHECK_MSG( IsCheckable(), FALSE,
|
wxCHECK_MSG( IsCheckable(), false,
|
||||||
wxT("can't get state of uncheckable item!") );
|
wxT("can't get state of uncheckable item!") );
|
||||||
|
|
||||||
return ((GtkCheckMenuItem*)m_menuItem)->active != 0;
|
return ((GtkCheckMenuItem*)m_menuItem)->active != 0;
|
||||||
@@ -972,7 +972,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem, int pos)
|
|||||||
GtkWidget *menuItem;
|
GtkWidget *menuItem;
|
||||||
|
|
||||||
wxString text;
|
wxString text;
|
||||||
GtkLabel* label;
|
GtkLabel* label = NULL;
|
||||||
|
|
||||||
if ( mitem->IsSeparator() )
|
if ( mitem->IsSeparator() )
|
||||||
{
|
{
|
||||||
@@ -1117,7 +1117,7 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem, int pos)
|
|||||||
// gtk_widget_lock_accelerators(mitem->GetMenuItem());
|
// gtk_widget_lock_accelerators(mitem->GetMenuItem());
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMenuItem* wxMenu::DoAppend(wxMenuItem *mitem)
|
wxMenuItem* wxMenu::DoAppend(wxMenuItem *mitem)
|
||||||
@@ -1551,4 +1551,3 @@ bool wxWindowGTK::DoPopupMenu( wxMenu *menu, int x, int y )
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_MENUS_NATIVE
|
#endif // wxUSE_MENUS_NATIVE
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user