From 4d9b612ea3b0eacb2cbc47d9b57affc96ddfa8c3 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Mon, 25 Sep 2017 13:29:56 +0200 Subject: [PATCH] #3132 bbGEditor Feature New Normal - branch changeWx28to30 compilation with wxWidgets3 --- appli/bbEditor/bbEditor.cxx | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/appli/bbEditor/bbEditor.cxx b/appli/bbEditor/bbEditor.cxx index 517b72d..497d60f 100644 --- a/appli/bbEditor/bbEditor.cxx +++ b/appli/bbEditor/bbEditor.cxx @@ -54,13 +54,27 @@ protected: -static const wxCmdLineEntryDesc cmdLineDesc[] = -{ -{ wxCMD_LINE_PARAM, NULL, NULL, _T("file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, -{ wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("Prints this help") }, -//{ wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("Message all 9") }, -{ wxCMD_LINE_NONE } -}; + +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0 +#if wxMAJOR_VERSION <= 2 + static const wxCmdLineEntryDesc cmdLineDesc[] = + { + { wxCMD_LINE_PARAM, NULL, NULL, _T("file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, + { wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("Prints this help") }, + //{ wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("Message all 9") }, + { wxCMD_LINE_NONE } + }; +#else + static const wxCmdLineEntryDesc cmdLineDesc[] = + { + { wxCMD_LINE_PARAM, NULL, NULL, "file", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, + { wxCMD_LINE_SWITCH, "h", "help", "Prints this help" }, + //{ wxCMD_LINE_SWITCH, _T("d"), _T("debug"), _T("Message all 9") }, + { wxCMD_LINE_NONE } + }; +#endif + + class wxBBEditorApp : public wxApp -- 2.45.1