X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6bf921176c7ca7a738e057648dde7fbc57f3e682..f46e6a1ef9541a3d13c38a114870658d3b4e004b:/samples/preferences/preferences.cpp?ds=sidebyside diff --git a/samples/preferences/preferences.cpp b/samples/preferences/preferences.cpp index 87fbcccd86..990fb0d437 100644 --- a/samples/preferences/preferences.cpp +++ b/samples/preferences/preferences.cpp @@ -58,10 +58,10 @@ public: SetMenuBar(menuBar); Connect(wxID_PREFERENCES, - wxEVT_COMMAND_MENU_SELECTED, + wxEVT_MENU, wxCommandEventHandler(MyFrame::OnPref), NULL, this); Connect(wxID_EXIT, - wxEVT_COMMAND_MENU_SELECTED, + wxEVT_MENU, wxCommandEventHandler(MyFrame::OnExit), NULL, this); Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(MyFrame::OnClose), NULL, this); @@ -104,10 +104,10 @@ public: // immediately rather than after the OK or Apply button is pressed. if ( wxPreferencesEditor::ShouldApplyChangesImmediately() ) { - m_useMarkdown->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, + m_useMarkdown->Connect(wxEVT_CHECKBOX, wxCommandEventHandler(PrefsPageGeneralPanel::ChangedUseMarkdown), NULL, this); - m_spellcheck->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, + m_spellcheck->Connect(wxEVT_CHECKBOX, wxCommandEventHandler(PrefsPageGeneralPanel::ChangedSpellcheck), NULL, this); } @@ -173,7 +173,7 @@ public: if ( wxPreferencesEditor::ShouldApplyChangesImmediately() ) { - m_fulltext->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, + m_fulltext->Connect(wxEVT_CHECKBOX, wxCommandEventHandler(PrefsPageTopicsPanel::ChangedFulltext), NULL, this); } @@ -224,6 +224,11 @@ bool MyApp::OnInit() if ( !wxApp::OnInit() ) return false; + // This will be used in the title of the preferences dialog under some + // platforms, don't leave it as default "Preferences" because this would + // result in rather strange "Preferences Preferences" title. + SetAppDisplayName("wxWidgets Sample"); + MyFrame *frame = new MyFrame(); frame->Show(true);