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);
// 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);
}
if ( wxPreferencesEditor::ShouldApplyChangesImmediately() )
{
- m_fulltext->Connect(wxEVT_COMMAND_CHECKBOX_CLICKED,
+ m_fulltext->Connect(wxEVT_CHECKBOX,
wxCommandEventHandler(PrefsPageTopicsPanel::ChangedFulltext),
NULL, this);
}
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);