X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6bf921176c7ca7a738e057648dde7fbc57f3e682..ac687ddffb6f199603abc2415f7bcf0d051f1eca:/samples/preferences/preferences.cpp?ds=sidebyside diff --git a/samples/preferences/preferences.cpp b/samples/preferences/preferences.cpp index 87fbcccd86..979cfe98ec 100644 --- a/samples/preferences/preferences.cpp +++ b/samples/preferences/preferences.cpp @@ -3,7 +3,6 @@ // Purpose: Sample demonstrating wxPreferencesEditor use. // Author: Vaclav Slavik // Created: 2013-02-19 -// RCS-ID: $Id$ // Copyright: (c) 2013 Vaclav Slavik // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -58,10 +57,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 +103,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 +172,7 @@ public: if ( wxPreferencesEditor::ShouldApplyChangesImmediately() ) { - m_fulltext->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED, + m_fulltext->Connect(wxEVT_CHECKBOX, wxCommandEventHandler(PrefsPageTopicsPanel::ChangedFulltext), NULL, this); } @@ -224,6 +223,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);