X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fctsim.cpp;h=e2e3f2766a4cea7fee821e4ab1a98fb3210977d7;hb=5abb3194d9903b561f910139a534b23598ef3e17;hp=9befa24c35cbc67c036c3e0d36df8b51d6adf6a5;hpb=52e0918dbbadcf53d4f4a9d1ec1748f854a4e4bf;p=ctsim.git diff --git a/src/ctsim.cpp b/src/ctsim.cpp index 9befa24..e2e3f27 100644 --- a/src/ctsim.cpp +++ b/src/ctsim.cpp @@ -93,18 +93,18 @@ CTSimApp::CTSimApp() void CTSimApp::OnInitCmdLine(wxCmdLineParser& parser) { static const wxCmdLineEntryDesc cmdLineDesc[] = { - { wxCMD_LINE_SWITCH, _T("l"), _T("verbose"), _T("verbose logging") }, - { wxCMD_LINE_SWITCH, _T("v"), _T("version"), _T("print version") }, - { wxCMD_LINE_SWITCH, _T("p"), _T("print"), _T("print images from command line"), + { wxCMD_LINE_SWITCH, wxT_2("l"), wxT_2("verbose"), wxT_2("verbose logging") }, + { wxCMD_LINE_SWITCH, wxT_2("v"), wxT_2("version"), wxT_2("print version") }, + { wxCMD_LINE_SWITCH, wxT_2("p"), wxT_2("print"), wxT_2("print images from command line"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL }, - { wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("print this help message"), + { wxCMD_LINE_SWITCH, wxT_2("h"), wxT_2("help"), wxT_2("print this help message"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_OPTION_HELP }, - { wxCMD_LINE_PARAM, NULL, NULL, _T("input file"), + { wxCMD_LINE_PARAM, NULL, NULL, wxT_2("input file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE }, - { wxCMD_LINE_NONE } + wxCMD_LINE_DESC_END }; parser.SetDesc(cmdLineDesc); @@ -247,10 +247,11 @@ CTSimApp::OnInit() m_docManager->OnFileClose (nullEvent); } } + if (m_bPrintCmdLineImages) { wxCommandEvent closeEvent; closeEvent.SetInt (MAINMENU_FILE_EXIT); - m_pFrame->AddPendingEvent(closeEvent); + m_pFrame->GetEventHandler()->ProcessEvent(closeEvent); } if (getStartupTips()) @@ -388,7 +389,9 @@ EVT_MENU(MAINMENU_HELP_SECONDARY, MainFrame::OnHelpSecondary) EVT_MENU(MAINMENU_FILE_CREATE_PHANTOM, MainFrame::OnCreatePhantom) EVT_MENU(MAINMENU_FILE_CREATE_FILTER, MainFrame::OnCreateFilter) EVT_MENU(MAINMENU_FILE_EXIT, MainFrame::OnExit) + EVT_MENU_RANGE(wxID_FILE1, wxID_FILE9, MainFrame::OnMRUFile) + EVT_MENU(MAINMENU_WINDOW_BASE, MainFrame::OnWindowMenu0) EVT_MENU(MAINMENU_WINDOW_BASE+1, MainFrame::OnWindowMenu1) EVT_MENU(MAINMENU_WINDOW_BASE+2, MainFrame::OnWindowMenu2) @@ -891,7 +894,7 @@ public: }; BitmapDialog::BitmapDialog (wxBitmap* pBitmap, char const* pszTitle) - : wxDialog(theApp->getMainFrame(), -1, wxString(pszTitle,*wxConvCurrent), wxDefaultPosition, wxDefaultSize, wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE) + : wxDialog(theApp->getMainFrame(), -1, wxString(pszTitle,*wxConvCurrent)) { wxBoxSizer* pTopSizer = new wxBoxSizer (wxVERTICAL); @@ -961,7 +964,7 @@ MainFrame::OnImport (wxCommandEvent& WXUNUSED(event) ) } wxString strFilename = wxFileSelector (wxString(wxConvUTF8.cMB2WX("Import Filename")), wxString(wxConvUTF8.cMB2WX("")), - wxString(wxConvUTF8.cMB2WX("")), strExt, strWildcard, wxOPEN); + wxString(wxConvUTF8.cMB2WX("")), strExt, strWildcard, wxFD_OPEN); if (! strFilename.IsEmpty()) { if (m_iDefaultImportFormat == ImageFile::IMPORT_FORMAT_PPM || m_iDefaultImportFormat == ImageFile::IMPORT_FORMAT_PNG) {