]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/toolbar/toolbar.cpp
compilation fix (extra semicolon)
[wxWidgets.git] / samples / toolbar / toolbar.cpp
index 0a849c5b3fb17d82135b6b3759613767a1910dbd..b08c9cae8750f29249b3cd944cefc333a773db50 100644 (file)
@@ -89,7 +89,7 @@ class MyFrame: public wxFrame
 public:
     MyFrame(wxFrame *parent,
             wxWindowID id = -1,
-            const wxString& title = "wxToolBar Sample",
+            const wxString& title = _T("wxToolBar Sample"),
             const wxPoint& pos = wxDefaultPosition,
             const wxSize& size = wxDefaultSize,
             long style = wxDEFAULT_FRAME_STYLE);
@@ -232,12 +232,12 @@ bool MyApp::OnInit()
 {
     // Create the main frame window
     MyFrame* frame = new MyFrame((wxFrame *) NULL, -1,
-                                 "wxToolBar Sample",
+                                 _T("wxToolBar Sample"),
                                  wxPoint(100, 100), wxSize(550, 300));
 
     frame->Show(TRUE);
 
-    frame->SetStatusText("Hello, wxWindows");
+    frame->SetStatusText(_T("Hello, wxWindows"));
 
     SetTopWindow(frame);
 
@@ -298,12 +298,12 @@ 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 )
     {
-        wxComboBox *combo = new wxComboBox(toolBar, ID_COMBO, "", wxDefaultPosition, wxSize(200,-1) );
+        wxComboBox *combo = new wxComboBox(toolBar, ID_COMBO, _T(""), wxDefaultPosition, wxSize(200,-1) );
         combo->Append(_T("This"));
         combo->Append(_T("is a"));
         combo->Append(_T("combobox"));
@@ -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();