From 142dd48c9919e8fc736ec8d8b33ff6ad86e62d39 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 15 Jun 2021 18:14:19 +0200 Subject: [PATCH] SCRIPTING_TOOL::showPluginFolder(): fix wxWidgets3.14 compatibility (Linux mainly) --- pcbnew/python/scripting/pcb_scripting_tool.cpp | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/pcbnew/python/scripting/pcb_scripting_tool.cpp b/pcbnew/python/scripting/pcb_scripting_tool.cpp index 79f4fe921d..37faf7e691 100644 --- a/pcbnew/python/scripting/pcb_scripting_tool.cpp +++ b/pcbnew/python/scripting/pcb_scripting_tool.cpp @@ -35,6 +35,7 @@ #include #include +#include using initfunc = PyObject* (*)(void); @@ -124,21 +125,8 @@ pcbnew.LoadPlugins( sys_path, user_path ) int SCRIPTING_TOOL::showPluginFolder( const TOOL_EVENT& aEvent ) { -#ifdef __WXMAC__ - wxString msg; - - // 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 + wxString pluginpath( SCRIPTING::PyPluginsPath( true ) ); + LaunchExternal( pluginpath ); return 0; }