SCRIPTING_TOOL::showPluginFolder(): fix wxWidgets3.14 compatibility (Linux mainly)

This commit is contained in:
jean-pierre charras 2021-06-15 18:14:19 +02:00
parent 3616a8f0ee
commit 142dd48c99
1 changed files with 3 additions and 15 deletions

View File

@ -35,6 +35,7 @@
#include <Python.h> #include <Python.h>
#include <wx/string.h> #include <wx/string.h>
#include <launch_ext.h>
using initfunc = PyObject* (*)(void); using initfunc = PyObject* (*)(void);
@ -124,21 +125,8 @@ pcbnew.LoadPlugins( sys_path, user_path )
int SCRIPTING_TOOL::showPluginFolder( const TOOL_EVENT& aEvent ) int SCRIPTING_TOOL::showPluginFolder( const TOOL_EVENT& aEvent )
{ {
#ifdef __WXMAC__ wxString pluginpath( SCRIPTING::PyPluginsPath( true ) );
wxString msg; LaunchExternal( pluginpath );
// Quote in case there are spaces in the path.
msg.Printf( "open \"%s\"", SCRIPTING::PyPluginsPath( true ) );
system( msg.c_str() );
#else
wxString pypath( SCRIPTING::PyPluginsPath( true ) );
// Quote in case there are spaces in the path.
AddDelimiterString( pypath );
wxLaunchDefaultApplication( pypath );
#endif
return 0; return 0;
} }