X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab1ca7b3dda18b48e83f9ad2f5f3ea9b22247197..b2644cc3ccb41de07e2160857f1cc0c2a2069d79:/samples/toolbar/toolbar.cpp?ds=inline diff --git a/samples/toolbar/toolbar.cpp b/samples/toolbar/toolbar.cpp index 66aaa9f85e..b08c9cae87 100644 --- a/samples/toolbar/toolbar.cpp +++ b/samples/toolbar/toolbar.cpp @@ -298,8 +298,8 @@ void MyFrame::RecreateToolbar() toolBar->AddTool(wxID_NEW, _T("New"), toolBarBitmaps[0], _T("New file")); toolBar->AddTool(wxID_OPEN, _T("Open"), toolBarBitmaps[1], _T("Open file")); - // neither the generic nor Motif native toolbars really support this -#if (wxUSE_TOOLBAR_NATIVE && !USE_GENERIC_TBAR) && !defined(__WXMOTIF__) && !defined(__WXX11__) + // the generic toolbar doesn't really support this +#if (wxUSE_TOOLBAR_NATIVE && !USE_GENERIC_TBAR) && !defined(__WXX11__) || defined(__WXUNIVERSAL__) // adding a combo to a vertical toolbar is not very smart if ( m_horzToolbar ) { @@ -532,8 +532,13 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) Close(TRUE); } -void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) +void MyFrame::OnAbout(wxCommandEvent& event) { + if ( event.IsChecked() ) + m_textWindow->WriteText( _T("Help button down now.\n") ); + else + m_textWindow->WriteText( _T("Help button up now.\n") ); + (void)wxMessageBox(_T("wxWindows toolbar sample"), _T("About wxToolBar")); } @@ -543,14 +548,6 @@ void MyFrame::OnToolLeftClick(wxCommandEvent& event) str.Printf( _T("Clicked on tool %d\n"), event.GetId()); m_textWindow->WriteText( str ); - if (event.GetId() == wxID_HELP) - { - if ( event.GetExtraLong() != 0 ) - m_textWindow->WriteText( _T("Help button down now.\n") ); - else - m_textWindow->WriteText( _T("Help button up now.\n") ); - } - if (event.GetId() == wxID_COPY) { DoEnablePrint();