Enable GVFS/network filesystem visibility in file dialogs
On GTK, wxFileDialog defaults to local_only mode which hides GVFS-mounted filesystems like Google Drive, SMB shares, and external drives mounted through GVFS. This adds a platform-specific function that disables local_only mode to show these network/virtual filesystems. Apply AllowNetworkFileSystems to all file dialogs across KiCad to ensure directories on network filesystems are visible when browsing for files. Fixes https://gitlab.com/kicad/code/kicad/-/issues/14372
This commit is contained in:
@@ -58,6 +58,7 @@
|
||||
#include <widgets/wx_infobar.h>
|
||||
#include <widgets/wx_aui_utils.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <project_pcb.h>
|
||||
#include <toolbars_3d.h>
|
||||
|
||||
@@ -751,6 +752,8 @@ bool EDA_3D_VIEWER_FRAME::getExportFileName( EDA_3D_VIEWER_EXPORT_FORMAT& aForma
|
||||
m_defaultSaveScreenshotFileName.GetFullName(), wildcard,
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
// Set initial filter index based on current format
|
||||
dlg.SetFilterIndex( ( aFormat == EDA_3D_VIEWER_EXPORT_FORMAT::JPEG ) ? 0 : 1 );
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
|
||||
#define DEFAULT_DPI 300 // the image DPI used in formats that do not define a DPI
|
||||
@@ -401,6 +402,8 @@ void BITMAP2CMP_FRAME::OnLoadFile()
|
||||
wxFileDialog fileDlg( this, _( "Choose Image" ), path, wxEmptyString,
|
||||
FILEEXT::ImageFileWildcard(), wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &fileDlg );
|
||||
|
||||
if( fileDlg.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
||||
@@ -442,6 +445,8 @@ void BITMAP2CMP_FRAME::ExportDrawingSheetFormat()
|
||||
wxFileDialog fileDlg( this, _( "Create Drawing Sheet File" ), path, wxEmptyString,
|
||||
FILEEXT::DrawingSheetFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &fileDlg );
|
||||
|
||||
if( fileDlg.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
||||
@@ -475,6 +480,8 @@ void BITMAP2CMP_FRAME::ExportPostScriptFormat()
|
||||
wxFileDialog fileDlg( this, _( "Create PostScript File" ), path, wxEmptyString,
|
||||
FILEEXT::PSFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &fileDlg );
|
||||
|
||||
if( fileDlg.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
||||
@@ -509,6 +516,8 @@ void BITMAP2CMP_FRAME::ExportEeschemaFormat()
|
||||
FILEEXT::KiCadSymbolLibFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &fileDlg );
|
||||
|
||||
if( fileDlg.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
||||
@@ -542,6 +551,8 @@ void BITMAP2CMP_FRAME::ExportPcbnewFormat()
|
||||
FILEEXT::KiCadFootprintLibFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &fileDlg );
|
||||
|
||||
if( fileDlg.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
#include <wx/dcmemory.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <confirm.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#define MAX_PAGE_EXAMPLE_SIZE 200
|
||||
|
||||
@@ -710,6 +711,8 @@ void DIALOG_PAGES_SETTINGS::OnWksFileSelection( wxCommandEvent& event )
|
||||
if( m_embeddedFiles )
|
||||
fileDialog.SetCustomizeHook( customize );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &fileDialog );
|
||||
|
||||
if( fileDialog.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
||||
|
||||
@@ -381,6 +381,8 @@ void PANEL_COMMON_SETTINGS::OnPDFViewerClick( wxCommandEvent& event )
|
||||
wxFileDialog dlg( topLevelParent, _( "Select Preferred PDF Viewer" ), fn.GetPath(),
|
||||
fn.GetFullPath(), wildcard, wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <dialogs/dialog_edit_library_tables.h>
|
||||
#include <dialogs/dialog_plugin_options.h>
|
||||
#include <kiway.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <kiway_express.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <settings/kicad_settings.h>
|
||||
@@ -686,6 +687,8 @@ void PANEL_DESIGN_BLOCK_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event
|
||||
wxFileDialog dlg( topLevelParent, title, *lastDir, wxEmptyString, fileDesc.FileFilter(),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <wx/menu.h>
|
||||
#include <wx/wfstream.h>
|
||||
#include <wx/wupdlock.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
/* ---------- GRID_TRICKS for embedded files grid ---------- */
|
||||
|
||||
@@ -395,6 +396,8 @@ void PANEL_EMBEDDED_FILES::onAddEmbeddedFiles( wxCommandEvent& event )
|
||||
_( "All Files" ) + wxT( " (*.*)|*.*" ),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &fileDialog );
|
||||
|
||||
if( fileDialog.ShowModal() == wxID_OK )
|
||||
{
|
||||
wxArrayString paths;
|
||||
|
||||
@@ -1245,6 +1245,8 @@ bool EDA_DRAW_FRAME::LibraryFileBrowser( const wxString& aTitle, bool doOpen, wx
|
||||
if( aFileDlgHook )
|
||||
dlg.SetCustomizeHook( *aFileDlgHook );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return false;
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/intl.h>
|
||||
#include <eda_doc.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <wx/button.h>
|
||||
#include <wx/bmpbuttn.h>
|
||||
@@ -600,6 +601,8 @@ bool PG_URL_EDITOR::OnEvent( wxPropertyGrid* aGrid, wxPGProperty* aProperty, wxW
|
||||
_( "All Files" ) + wxS( " (*.*)|*.*" ),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &openFileDialog );
|
||||
|
||||
if( openFileDialog.ShowModal() == wxID_OK )
|
||||
{
|
||||
filename = openFileDialog.GetPath();
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
#include <bitmaps.h>
|
||||
#include <embedded_files.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <kiway.h>
|
||||
#include <kiway_player.h>
|
||||
#include <kiway_express.h>
|
||||
@@ -256,6 +257,8 @@ protected:
|
||||
|
||||
openFileDialog.SetCustomizeHook( customize );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &openFileDialog );
|
||||
|
||||
if( openFileDialog.ShowModal() == wxID_OK )
|
||||
{
|
||||
filename = openFileDialog.GetPath();
|
||||
@@ -392,6 +395,8 @@ protected:
|
||||
if( m_embedCallback )
|
||||
dlg.SetCustomizeHook( customize );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK )
|
||||
{
|
||||
wxString filePath = dlg.GetPath();
|
||||
|
||||
@@ -315,6 +315,8 @@ void WX_HTML_REPORT_PANEL::onBtnSaveToFile( wxCommandEvent& event )
|
||||
wxFileDialog dlg( topLevelParent, _( "Save Report File" ), fn.GetPath(), fn.GetFullName(),
|
||||
FILEEXT::TextFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
|
||||
DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES( wxWindow* aParent ) :
|
||||
@@ -214,6 +215,8 @@ void DIALOG_CONFIG_EQUFILES::OnAddFiles( wxCommandEvent& event )
|
||||
wxFileDialog dlg( this, _( "Footprint Association File" ), libpath, wxEmptyString,
|
||||
FILEEXT::EquFileWildcard(), wxFD_DEFAULT_STYLE | wxFD_MULTIPLE );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
||||
|
||||
@@ -1121,6 +1121,8 @@ void DIALOG_ERC::OnSaveReport( wxCommandEvent& aEvent )
|
||||
FILEEXT::ReportFileWildcard() + wxS( "|" ) + FILEEXT::JsonFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <netlist_exporters/netlist_exporter_spice.h>
|
||||
#include <paths.h>
|
||||
#include <jobs/job_export_sch_netlist.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <eeschema_id.h>
|
||||
#include <wx/checkbox.h>
|
||||
@@ -563,6 +564,8 @@ bool DIALOG_EXPORT_NETLIST::TransferDataFromWindow()
|
||||
// full name does not and should not include the path, per wx docs.
|
||||
wxFileDialog dlg( this, title, path, fullname, fileWildcard, wxFD_SAVE );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return false;
|
||||
|
||||
|
||||
@@ -1014,6 +1014,8 @@ private:
|
||||
wxFileDialog dlg( &m_frame, _( "Select pin data file" ), "", "", FILEEXT::CsvTsvFileWildcard(),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return wxEmptyString;
|
||||
|
||||
@@ -1546,6 +1548,8 @@ void DIALOG_LIB_EDIT_PIN_TABLE::OnExportButtonClick( wxCommandEvent& event )
|
||||
wxFileDialog dlg( this, _( "Select pin data file" ), "", fn.GetFullName(), FILEEXT::CsvFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <confirm.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <dialog_sch_import_settings.h>
|
||||
|
||||
@@ -52,6 +53,8 @@ void DIALOG_SCH_IMPORT_SETTINGS::OnBrowseClicked( wxCommandEvent& event )
|
||||
wxFileDialog dlg( this, _( "Import Settings From" ), fn.GetPath(), fn.GetFullName(),
|
||||
FILEEXT::ProjectFileWildcard(), wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK )
|
||||
m_filePathCtrl->SetValue( dlg.GetPath() );
|
||||
}
|
||||
|
||||
@@ -1287,6 +1287,8 @@ void DIALOG_SIM_MODEL<T>::onBrowseButtonClick( wxCommandEvent& aEvent )
|
||||
|
||||
dlg.SetCustomizeHook( customize );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -1399,6 +1399,8 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnOutputFileBrowseClicked( wxCommandEvent& even
|
||||
wxFileDialog saveDlg( this, _( "Bill of Materials Output File" ), path, fn.GetFullName(),
|
||||
FILEEXT::CsvFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &saveDlg );
|
||||
|
||||
if( saveDlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <sch_edit_frame.h>
|
||||
#include <kiway.h>
|
||||
#include <paths.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <pgm_base.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <wx/dir.h>
|
||||
@@ -556,6 +557,8 @@ void PANEL_SYM_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
||||
wxFileDialog dlg( topLevelParent, title, *lastDir, wxEmptyString, fileDesc.FileFilter(),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <id.h>
|
||||
#include <kiface_base.h>
|
||||
#include <kiplatform/app.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <libraries/legacy_symbol_library.h>
|
||||
#include <libraries/symbol_library_adapter.h>
|
||||
#include <local_history.h>
|
||||
@@ -892,6 +893,8 @@ void SCH_EDIT_FRAME::OnImportProject( wxCommandEvent& aEvent )
|
||||
FILEDLG_IMPORT_NON_KICAD importOptions( eeconfig()->m_System.show_import_issues );
|
||||
dlg.SetCustomizeHook( importOptions );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
@@ -1183,6 +1186,8 @@ bool SCH_EDIT_FRAME::SaveProject( bool aSaveAs )
|
||||
dlg.SetCustomizeHook( newProjectHook );
|
||||
}
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return false;
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <dialogs/html_message_box.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
@@ -164,6 +165,8 @@ void DIALOG_IMPORT_GFX_SCH::onBrowseFiles( wxCommandEvent& event )
|
||||
wxFileDialog dlg( m_parent, _( "Import Graphics" ), path, filename, wildcardsDesc,
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK && !dlg.GetPath().IsEmpty() )
|
||||
m_textCtrlFileName->SetValue( dlg.GetPath() );
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
#include <string_utils.h>
|
||||
#include <kiface_base.h>
|
||||
#include <kiplatform/app.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <kiway.h>
|
||||
#include <symbol_edit_frame.h>
|
||||
#include <symbol_viewer_frame.h>
|
||||
@@ -1406,6 +1407,8 @@ void SCH_EDIT_FRAME::NewProject()
|
||||
wxFileDialog dlg( this, _( "New Schematic" ), pro_dir, wxEmptyString,
|
||||
FILEEXT::KiCadSchematicFileWildcard(), wxFD_SAVE );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() != wxID_CANCEL )
|
||||
{
|
||||
// Enforce the extension, wxFileDialog is inept.
|
||||
@@ -1443,6 +1446,8 @@ void SCH_EDIT_FRAME::LoadProject()
|
||||
wxFileDialog dlg( this, _( "Open Schematic" ), pro_dir, wxEmptyString,
|
||||
wildcards, wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() != wxID_CANCEL )
|
||||
{
|
||||
OpenProjectFiles( std::vector<wxString>( 1, dlg.GetPath() ) );
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/log.h>
|
||||
#include <project_sch.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <string_utils.h>
|
||||
#include "symbol_saveas_type.h"
|
||||
#include <widgets/symbol_library_save_as_filedlg_hook.h>
|
||||
@@ -1078,6 +1079,8 @@ void SYMBOL_EDIT_FRAME::ExportSymbol()
|
||||
wxFileDialog dlg( this, _( "Export Symbol" ), m_mruPath, fn.GetFullName(),
|
||||
FILEEXT::KiCadSymbolLibFileWildcard(), wxFD_SAVE );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
@@ -1546,6 +1549,8 @@ bool SYMBOL_EDIT_FRAME::saveLibrary( const wxString& aLibrary, bool aNewFile )
|
||||
SYMBOL_LIBRARY_SAVE_AS_FILEDLG_HOOK saveAsHook( type );
|
||||
dlg.SetCustomizeHook( saveAsHook );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return false;
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <wx/filename.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <string_utils.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
|
||||
void SYMBOL_EDIT_FRAME::ImportSymbol()
|
||||
@@ -78,6 +79,8 @@ void SYMBOL_EDIT_FRAME::ImportSymbol()
|
||||
wxFileDialog fileDlg( this, _( "Import Symbol" ), m_mruPath, wxEmptyString, fileFiltersStr,
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &fileDlg );
|
||||
|
||||
if( fileDlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
#include <wx/choicdlg.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
|
||||
void SCH_EDITOR_CONTROL::AssignFootprints( const std::string& aChangedSetOfReferences )
|
||||
@@ -209,6 +210,8 @@ int SCH_EDITOR_CONTROL::ImportFPAssignments( const TOOL_EVENT& aEvent )
|
||||
FILEEXT::FootprintAssignmentFileWildcard(),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -940,6 +940,8 @@ int SCH_DRAWING_TOOLS::ImportSheet( const TOOL_EVENT& aEvent )
|
||||
FILEDLG_IMPORT_SHEET_CONTENTS dlgHook( cfg );
|
||||
dlg.SetCustomizeHook( dlgHook );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return 0;
|
||||
|
||||
@@ -1186,6 +1188,8 @@ int SCH_DRAWING_TOOLS::PlaceImage( const TOOL_EVENT& aEvent )
|
||||
wxFileDialog dlg( m_frame, _( "Choose Image" ), m_mruPath, wxEmptyString,
|
||||
FILEEXT::ImageFileWildcard(), wxFD_OPEN );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
bool cancelled = false;
|
||||
|
||||
RunMainStack(
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <dialogs/dialog_table_properties.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <fstream>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <sch_sheet_path.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
@@ -121,6 +122,8 @@ int SCH_EDIT_TABLE_TOOL::ExportTableToCSV( const TOOL_EVENT& aEvent )
|
||||
_( "CSV files (*.csv)|*.csv" ),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &saveDialog );
|
||||
|
||||
if( saveDialog.ShowModal() == wxID_CANCEL )
|
||||
{
|
||||
if( clearSelection )
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include <locale_io.h>
|
||||
#include <string_utils.h>
|
||||
#include <kiway.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <netlist_exporters/netlist_exporter_spice.h>
|
||||
#include <paths.h>
|
||||
#include <pgm_base.h>
|
||||
@@ -398,6 +399,8 @@ int SCH_EDITOR_CONTROL::SaveCurrSheetCopyAs( const TOOL_EVENT& aEvent )
|
||||
wxFileDialog dlg( m_frame, _( "Schematic Files" ), curr_fn.GetPath(), curr_fn.GetFullName(),
|
||||
FILEEXT::KiCadSchematicFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return false;
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include <wx/ffile.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx_filename.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <wx/stc/stc.h>
|
||||
|
||||
#include <kiway.h>
|
||||
@@ -109,6 +110,8 @@ int SIMULATOR_CONTROL::OpenWorkbook( const TOOL_EVENT& aEvent )
|
||||
wxFileDialog openDlg( m_simulatorFrame, _( "Open Simulation Workbook" ), getDefaultPath(), "",
|
||||
FILEEXT::WorkbookFileWildcard(), wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &openDlg );
|
||||
|
||||
if( openDlg.ShowModal() == wxID_CANCEL )
|
||||
return -1;
|
||||
|
||||
@@ -163,6 +166,8 @@ int SIMULATOR_CONTROL::SaveWorkbook( const TOOL_EVENT& aEvent )
|
||||
FILEEXT::WorkbookFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &saveAsDlg );
|
||||
|
||||
if( saveAsDlg.ShowModal() == wxID_CANCEL )
|
||||
return -1;
|
||||
|
||||
@@ -181,6 +186,8 @@ int SIMULATOR_CONTROL::ExportPlotAsPNG( const TOOL_EVENT& aEvent )
|
||||
wxFileDialog saveDlg( m_simulatorFrame, _( "Save Plot as Image" ), "", "",
|
||||
FILEEXT::PngFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &saveDlg );
|
||||
|
||||
if( saveDlg.ShowModal() == wxID_CANCEL )
|
||||
return -1;
|
||||
|
||||
@@ -288,6 +295,8 @@ int SIMULATOR_CONTROL::ExportPlotAsCSV( const TOOL_EVENT& aEvent )
|
||||
FILEEXT::CsvFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &saveDlg );
|
||||
|
||||
if( saveDlg.ShowModal() == wxID_CANCEL )
|
||||
return -1;
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <wildcards_and_files_ext.h>
|
||||
|
||||
#include <wx/filedlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
|
||||
bool SYMBOL_EDITOR_CONTROL::Init()
|
||||
@@ -779,6 +780,8 @@ int SYMBOL_EDITOR_CONTROL::ExportView( const TOOL_EVENT& aEvent )
|
||||
wxFileDialog dlg( editFrame, _( "Export View as PNG" ), projectPath, fn.GetFullName(),
|
||||
FILEEXT::PngFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK && !dlg.GetPath().IsEmpty() )
|
||||
{
|
||||
// calling wxYield is mandatory under Linux, after closing the file selector dialog
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <widgets/wx_progress_reporters.h>
|
||||
#include "widgets/gerbview_layer_widget.h"
|
||||
#include <tool/tool_manager.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
// HTML Messages used more than one time:
|
||||
#define MSG_NO_MORE_LAYER _( "<b>No more available layers</b> in GerbView to load files" )
|
||||
@@ -150,6 +151,8 @@ bool GERBVIEW_FRAME::LoadFileOrShowDialog( const wxString& aFileName,
|
||||
wxFileDialog dlg( this, dialogTitle, currentPath, filename.GetFullName(), dialogFiletypes,
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE | wxFD_CHANGE_DIR );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
wxArrayString dummy1, dummy2;
|
||||
const int nWildcards = wxParseCommonDialogsFilter( dialogFiletypes, dummy1, dummy2 );
|
||||
|
||||
@@ -659,6 +662,8 @@ bool GERBVIEW_FRAME::LoadZipArchiveFile( const wxString& aFullFileName )
|
||||
FILEEXT::ZipFileWildcard(),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return false;
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <dialogs/html_message_box.h>
|
||||
#include <view/view.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
|
||||
using json = nlohmann::json;
|
||||
@@ -192,6 +193,8 @@ bool GERBVIEW_FRAME::LoadGerberJobFile( const wxString& aFullFileName )
|
||||
FILEEXT::GerberJobFileWildcard(),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_CHANGE_DIR );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return false;
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include <view/view.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include "gerbview_actions.h"
|
||||
#include "gerbview_control.h"
|
||||
@@ -126,6 +127,8 @@ int GERBVIEW_CONTROL::ExportToPcbnew( const TOOL_EVENT& aEvent )
|
||||
wxFileDialog filedlg( m_frame, _( "Export as KiCad Board File" ), path, fileDialogName,
|
||||
FILEEXT::PcbFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &filedlg );
|
||||
|
||||
if( filedlg.ShowModal() == wxID_CANCEL )
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include <wx/dirdlg.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
#include <widgets/wx_grid.h>
|
||||
@@ -99,6 +100,8 @@ void DIALOG_DESTINATION::onOutputPathBrowseClicked(wxCommandEvent& event)
|
||||
fileWildcard,
|
||||
wxFD_OVERWRITE_PROMPT | wxFD_SAVE );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/dirdlg.h>
|
||||
|
||||
#include <kiplatform/ui.h>
|
||||
#include <kiway.h>
|
||||
#include <project/project_archiver.h>
|
||||
#include <reporter.h>
|
||||
@@ -60,6 +61,8 @@ void KICAD_MANAGER_FRAME::UnarchiveFiles()
|
||||
wxFileDialog zipfiledlg( this, _( "Unzip Project" ), fn.GetPath(), fn.GetFullName(),
|
||||
FILEEXT::ZipFileWildcard(), wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &zipfiledlg );
|
||||
|
||||
if( zipfiledlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <confirm.h>
|
||||
#include <kidialog.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
|
||||
#include <sch_io/sch_io_mgr.h>
|
||||
@@ -55,6 +56,8 @@ void KICAD_MANAGER_FRAME::ImportNonKiCadProject( const wxString& aWindowTitle,
|
||||
|
||||
wxFileDialog inputdlg( this, aWindowTitle, default_dir, wxEmptyString, aFilesWildcard, style );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &inputdlg );
|
||||
|
||||
if( inputdlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <gestfich.h>
|
||||
#include <kiplatform/app.h>
|
||||
#include <kiplatform/environment.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <kiplatform/policy.h>
|
||||
#include <build_version.h>
|
||||
#include <kiway.h>
|
||||
@@ -1127,6 +1128,8 @@ void KICAD_MANAGER_FRAME::OnOpenFileInTextEditor( wxCommandEvent& event )
|
||||
wxFileDialog dlg( this, _( "Edit File in Text Editor" ), default_dir, wxEmptyString, wildcard,
|
||||
wxFD_OPEN );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "widgets/wx_grid.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <launch_ext.h>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
@@ -303,6 +304,8 @@ void DIALOG_PCM::OnInstallFromFileClicked( wxCommandEvent& event )
|
||||
wxFileDialog open_file_dialog( this, _( "Install Package" ), wxEmptyString, wxEmptyString,
|
||||
wxT( "Zip files (*.zip)|*.zip" ), wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &open_file_dialog );
|
||||
|
||||
if( open_file_dialog.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -518,6 +518,8 @@ void PANEL_PACKAGES_VIEW::OnDownloadVersionClicked( wxCommandEvent& event )
|
||||
wxString::Format( wxT( "%s_v%s.zip" ), package.identifier, version ),
|
||||
wxT( "ZIP files (*.zip)|*.zip" ), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dialog );
|
||||
|
||||
if( dialog.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <kicad_manager_frame.h>
|
||||
#include <kiplatform/policy.h>
|
||||
#include <kiplatform/secrets.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <confirm.h>
|
||||
#include <kidialog.h>
|
||||
#include <project/project_file.h>
|
||||
@@ -87,6 +88,8 @@ wxFileName KICAD_MANAGER_CONTROL::newProjectDirectory( wxString* aFileName, bool
|
||||
FILEDLG_NEW_PROJECT newProjectHook;
|
||||
dlg.SetCustomizeHook( newProjectHook );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return wxFileName();
|
||||
|
||||
@@ -281,6 +284,8 @@ int KICAD_MANAGER_CONTROL::NewProject( const TOOL_EVENT& aEvent )
|
||||
FILEDLG_NEW_PROJECT newProjectHook;
|
||||
dlg.SetCustomizeHook( newProjectHook );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return -1;
|
||||
|
||||
@@ -435,6 +440,8 @@ int KICAD_MANAGER_CONTROL::NewJobsetFile( const TOOL_EVENT& aEvent )
|
||||
wxFileDialog dlg( m_frame, _( "Create New Jobset" ), default_dir, wxEmptyString, FILEEXT::JobsetFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return -1;
|
||||
|
||||
@@ -471,6 +478,8 @@ int KICAD_MANAGER_CONTROL::openProject( const wxString& aDefaultDir )
|
||||
|
||||
dlg.AddShortcut( PATHS::GetDefaultUserProjectsPath() );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return -1;
|
||||
|
||||
@@ -511,6 +520,8 @@ int KICAD_MANAGER_CONTROL::OpenJobsetFile( const TOOL_EVENT& aEvent )
|
||||
wxFileDialog dlg( m_frame, _( "Open Jobset" ), default_dir, wxEmptyString, FILEEXT::JobsetFileWildcard(),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return -1;
|
||||
|
||||
@@ -546,6 +557,8 @@ int KICAD_MANAGER_CONTROL::ArchiveProject( const TOOL_EVENT& aEvent )
|
||||
wxFileDialog dlg( m_frame, _( "Archive Project Files" ), fileName.GetPath(), fileName.GetFullName(),
|
||||
FILEEXT::ZipFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return 0;
|
||||
|
||||
@@ -629,6 +642,8 @@ int KICAD_MANAGER_CONTROL::SaveProjectAs( const TOOL_EVENT& aEvent )
|
||||
|
||||
dlg.AddShortcut( PATHS::GetDefaultUserProjectsPath() );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return -1;
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <wx/cursor.h>
|
||||
|
||||
class wxChoice;
|
||||
class wxDialog;
|
||||
class wxNonOwnedWindow;
|
||||
class wxTopLevelWindow;
|
||||
class wxWindow;
|
||||
@@ -210,6 +211,23 @@ namespace KIPLATFORM
|
||||
* above other windows.
|
||||
*/
|
||||
void ReleaseChildWindow( wxNonOwnedWindow* aWindow );
|
||||
|
||||
/**
|
||||
* Configure a file dialog to show network and virtual file systems.
|
||||
*
|
||||
* On GTK, file dialogs default to showing only local files, which excludes
|
||||
* GVFS-mounted filesystems like Google Drive, SMB shares, SFTP connections,
|
||||
* and removable media mounted through GVFS. This function configures the
|
||||
* dialog to also show these non-local filesystems.
|
||||
*
|
||||
* This function must be called after creating the dialog but before calling
|
||||
* ShowModal().
|
||||
*
|
||||
* This is a NOP on Windows and macOS where network filesystems are shown by default.
|
||||
*
|
||||
* @param aDialog is the file dialog to configure
|
||||
*/
|
||||
void AllowNetworkFileSystems( wxDialog* aDialog );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <wx/choice.h>
|
||||
#include <wx/dialog.h>
|
||||
#include <wx/nonownedwnd.h>
|
||||
#include <wx/settings.h>
|
||||
#include <wx/window.h>
|
||||
@@ -712,4 +713,13 @@ void KIPLATFORM::UI::ReleaseChildWindow( wxNonOwnedWindow* aWindow )
|
||||
// Not needed on this platform
|
||||
}
|
||||
|
||||
|
||||
void KIPLATFORM::UI::AllowNetworkFileSystems( wxDialog* aDialog )
|
||||
{
|
||||
GtkWidget* widget = static_cast<GtkWidget*>( aDialog->GetHandle() );
|
||||
|
||||
if( widget && GTK_IS_FILE_CHOOSER( widget ) )
|
||||
gtk_file_chooser_set_local_only( GTK_FILE_CHOOSER( widget ), FALSE );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <wx/cursor.h>
|
||||
#include <wx/dialog.h>
|
||||
#include <wx/nonownedwnd.h>
|
||||
#include <wx/window.h>
|
||||
#include <wx/msw/registry.h>
|
||||
@@ -209,4 +210,10 @@ void KIPLATFORM::UI::SetFloatLevel( wxWindow* aWindow )
|
||||
void KIPLATFORM::UI::ReleaseChildWindow( wxNonOwnedWindow* aWindow )
|
||||
{
|
||||
// Not needed on this platform
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void KIPLATFORM::UI::AllowNetworkFileSystems( wxDialog* aDialog )
|
||||
{
|
||||
// Not needed on Windows - file dialogs show network filesystems by default
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
#include <wx/dialog.h>
|
||||
#include <wx/nonownedwnd.h>
|
||||
#include <wx/toplevel.h>
|
||||
#include <wx/button.h>
|
||||
@@ -252,4 +253,10 @@ void KIPLATFORM::UI::ReleaseChildWindow( wxNonOwnedWindow* aWindow )
|
||||
[theWindow setLevel:NSFloatingWindowLevel];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void KIPLATFORM::UI::AllowNetworkFileSystems( wxDialog* aDialog )
|
||||
{
|
||||
// Not needed on macOS - file dialogs show network filesystems by default
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/stdpaths.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
bool PL_EDITOR_FRAME::saveCurrentPageLayout()
|
||||
{
|
||||
@@ -132,6 +133,8 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
|
||||
wxEmptyString, wxEmptyString,
|
||||
FILEEXT::DrawingSheetFileWildcard(), wxFD_OPEN );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &openFileDialog );
|
||||
|
||||
if( openFileDialog.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
@@ -158,6 +161,8 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
|
||||
wxFileDialog openFileDialog( this, _( "Open Drawing Sheet" ), wxEmptyString, wxEmptyString,
|
||||
FILEEXT::DrawingSheetFileWildcard(), wxFD_OPEN );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &openFileDialog );
|
||||
|
||||
if( openFileDialog.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
@@ -199,6 +204,8 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
|
||||
FILEEXT::DrawingSheetFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &openFileDialog );
|
||||
|
||||
if( openFileDialog.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -64,6 +64,7 @@
|
||||
#include <wx/treebook.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/log.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#ifndef __linux__
|
||||
#include <navlib/nl_pl_editor_plugin.h>
|
||||
@@ -845,6 +846,8 @@ DS_DATA_ITEM* PL_EDITOR_FRAME::AddDrawingSheetItem( int aType )
|
||||
wxFileDialog fileDlg( this, _( "Choose Image" ), m_mruImagePath, wxEmptyString,
|
||||
FILEEXT::ImageFileWildcard(), wxFD_OPEN );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &fileDlg );
|
||||
|
||||
if( fileDlg.ShowModal() != wxID_OK )
|
||||
return nullptr;
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/clipbrd.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <bitmaps.h>
|
||||
#include <calculator_panels/panel_regulator.h>
|
||||
@@ -196,6 +197,8 @@ void PANEL_REGULATOR::OnDataFileSelection( wxCommandEvent& event )
|
||||
wxFileDialog dlg( topLevelParent, _( "Select PCB Calculator Data File" ), wxEmptyString,
|
||||
fullfilename, wildcard, wxFD_SAVE );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <tools/board_editor_control.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <vector>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
|
||||
/* creates a BOM list from board
|
||||
@@ -86,6 +87,8 @@ int BOARD_EDITOR_CONTROL::GenBOMFileFromBoard( const TOOL_EVENT& aEvent )
|
||||
wxFileDialog dlg( m_frame, _( "Save Bill of Materials" ), pro_dir, fn.GetFullName(),
|
||||
FILEEXT::CsvFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -453,6 +453,8 @@ void DIALOG_BOARD_STATISTICS::saveReportClicked( wxCommandEvent& aEvent )
|
||||
s_savedDialogState.saveReportName, FILEEXT::TextFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -1075,6 +1075,8 @@ void DIALOG_DRC::OnSaveReport( wxCommandEvent& aEvent )
|
||||
FILEEXT::ReportFileWildcard() + wxS( "|" ) + FILEEXT::JsonFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/filefn.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <board.h>
|
||||
#include <footprint.h>
|
||||
@@ -101,6 +102,8 @@ void DIALOG_EXPORT_2581::onBrowseClicked( wxCommandEvent& event )
|
||||
m_cbCompress->IsChecked() ? compressed_files : ipc_files,
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <wx/dir.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/wfstream.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <wx/zipstrm.h>
|
||||
#include <wx/tarstrm.h>
|
||||
#include <wx/zstream.h>
|
||||
@@ -135,6 +136,8 @@ void DIALOG_EXPORT_ODBPP::onBrowseClicked( wxCommandEvent& event )
|
||||
|
||||
wxFileDialog dlg( this, _( "Export ODB++ File" ), fn.GetPath(), fileDialogName, filter, wxFD_SAVE );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <wx/process.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <pgm_base.h>
|
||||
#include <board.h>
|
||||
@@ -274,6 +275,8 @@ void DIALOG_EXPORT_STEP::onBrowseClicked( wxCommandEvent& aEvent )
|
||||
|
||||
wxFileDialog dlg( this, _( "3D Model Output File" ), fn.GetPath(), fn.GetFullName(), filter, wxFD_SAVE );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
#include <pcb_edit_frame.h>
|
||||
#include <kidialog.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
#include <string_utils.h>
|
||||
@@ -120,6 +121,9 @@ void DIALOG_GENCAD_EXPORT_OPTIONS::onBrowseClicked( wxCommandEvent& aEvent )
|
||||
|
||||
wxFileDialog dlg( this, _( "Export GenCAD File" ), fn.GetPath(), fileDialogName,
|
||||
FILEEXT::GencadFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK )
|
||||
m_outputFileName->SetValue( dlg.GetPath() );
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <wx/msgdlg.h>
|
||||
#include <wx/dirdlg.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <confirm.h>
|
||||
#include <core/arraydim.h>
|
||||
@@ -398,6 +399,8 @@ void DIALOG_GENDRILL::onGenReportFile( wxCommandEvent& event )
|
||||
wxFileDialog dlg( this, _( "Save Drill Report File" ), defaultPath, fn.GetFullName(),
|
||||
FILEEXT::ReportFileWildcard(), wxFD_SAVE );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <project/project_file.h> // LAST_PATH_TYPE
|
||||
#include <dialog_import_netlist.h>
|
||||
#include <widgets/wx_html_report_panel.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <view/view_controls.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/msgdlg.h>
|
||||
@@ -112,6 +113,8 @@ void DIALOG_IMPORT_NETLIST::onBrowseNetlistFiles( wxCommandEvent& event )
|
||||
wxFileDialog FilesDialog( this, _( "Import Netlist" ), dirPath, filename, FILEEXT::NetlistFileWildcard(),
|
||||
wxFD_DEFAULT_STYLE | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &FilesDialog );
|
||||
|
||||
if( FilesDialog.ShowModal() != wxID_OK )
|
||||
return;
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include <confirm.h>
|
||||
#include <widgets/std_bitmap_button.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <dialog_import_settings.h>
|
||||
|
||||
@@ -117,6 +118,8 @@ void DIALOG_IMPORT_SETTINGS::OnBrowseClicked( wxCommandEvent& event )
|
||||
FILEEXT::PcbFileWildcard(),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK )
|
||||
m_filePathCtrl->SetValue( dlg.GetPath() );
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <lib_table_notebook_panel.h>
|
||||
#include <confirm.h>
|
||||
#include <lib_table_grid_data_model.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <pgm_base.h>
|
||||
#include <pcb_edit_frame.h>
|
||||
@@ -624,6 +625,8 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
||||
wxFileDialog dlg( m_parent, title, *lastDir, wxEmptyString, fileDesc.FileFilter(),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/filedlgcustomize.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <confirm.h>
|
||||
#include <gestfich.h>
|
||||
@@ -445,6 +446,8 @@ int BOARD_EDITOR_CONTROL::GenD356File( const TOOL_EVENT& aEvent )
|
||||
D365_CUSTOMIZE_HOOK customizeHook( m_frame->GetPcbNewSettings()->m_ExportD356.doNotExportUnconnectedPads );
|
||||
dlg.SetCustomizeHook( customizeHook );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <tools/board_editor_control.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
|
||||
|
||||
@@ -76,6 +77,8 @@ int BOARD_EDITOR_CONTROL::ExportCmpFile( const TOOL_EVENT& aEvent )
|
||||
FILEEXT::FootprintAssignmentFileWildcard(),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <wx/log.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <kiface_base.h>
|
||||
#include <macros.h>
|
||||
@@ -677,6 +678,8 @@ int BOARD_EDITOR_CONTROL::ExportHyperlynx( const TOOL_EVENT& aEvent )
|
||||
wxFileDialog dlg( m_frame, _( "Export Hyperlynx Layout" ), fn.GetPath(), fn.GetFullName(),
|
||||
wildcard, wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK )
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
#include <tool/tool_manager.h>
|
||||
#include <board.h>
|
||||
#include <kiplatform/app.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <widgets/appearance_controls.h>
|
||||
#include <widgets/wx_infobar.h>
|
||||
#include <widgets/wx_progress_reporters.h>
|
||||
@@ -188,6 +189,8 @@ bool AskLoadBoardFileName( PCB_EDIT_FRAME* aParent, wxString* aFileName, int aCt
|
||||
if( !kicadFormat )
|
||||
dlg.SetCustomizeHook( importOptions );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK )
|
||||
{
|
||||
*aFileName = dlg.GetPath();
|
||||
@@ -230,6 +233,8 @@ bool AskSaveBoardFileName( PCB_EDIT_FRAME* aParent, wxString* aFileName, bool* a
|
||||
if( Kiface().IsSingle() && aParent->Prj().IsNullProject() )
|
||||
dlg.SetCustomizeHook( newProjectHook );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK )
|
||||
return false;
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
#include <gal/graphics_abstraction_layer.h>
|
||||
#include <kiface_base.h>
|
||||
#include <kiplatform/app.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <kiway.h>
|
||||
#include <macros.h>
|
||||
#include <pcbnew_id.h>
|
||||
@@ -1539,6 +1540,8 @@ void FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng( wxCommandEvent& event )
|
||||
wxFileDialog dlg( this, _( "Export View as PNG" ), projectPath, fn.GetFullName(),
|
||||
FILEEXT::PngFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL || dlg.GetPath().IsEmpty() )
|
||||
return;
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <env_paths.h>
|
||||
#include <paths.h>
|
||||
#include <settings/settings_manager.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <project_pcb.h>
|
||||
#include <project/project_file.h>
|
||||
#include <footprint_editor_settings.h>
|
||||
@@ -134,6 +135,8 @@ FOOTPRINT* FOOTPRINT_EDIT_FRAME::ImportFootprint( const wxString& aName )
|
||||
if( lastFilterIndex >= 0 && lastFilterIndex < nWildcards )
|
||||
dlg.SetFilterIndex( lastFilterIndex );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return nullptr;
|
||||
|
||||
@@ -249,6 +252,8 @@ void FOOTPRINT_EDIT_FRAME::ExportFootprint( FOOTPRINT* aFootprint )
|
||||
wxFileDialog dlg( this, _( "Export Footprint" ), fn.GetPath(), fn.GetFullName(),
|
||||
wildcard, wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <footprint.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -163,6 +164,8 @@ void DIALOG_IMPORT_GRAPHICS::onBrowseFiles( wxCommandEvent& event )
|
||||
wxFileDialog dlg( m_parent, _( "Import Graphics" ), path, filename, wildcardsDesc,
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_OK && !dlg.GetPath().IsEmpty() )
|
||||
m_textCtrlFileName->SetValue( dlg.GetPath() );
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/hyperlink.h>
|
||||
#include <advanced_config.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <functional>
|
||||
#include <iomanip>
|
||||
@@ -675,6 +676,8 @@ void ROUTER_TOOL::saveRouterDebugLog()
|
||||
"PNS log files" + AddFileExtListToFilter( { "log" } ),
|
||||
wxFD_OVERWRITE_PROMPT | wxFD_SAVE );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() != wxID_OK )
|
||||
{
|
||||
lastLoggerSize = logger->GetEvents().size(); // prevent re-entry
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
#include <project.h>
|
||||
#include <project/project_file.h> // LAST_PATH_TYPE
|
||||
#include <settings/settings_manager.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <pcbnew_settings.h>
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tool/tool_event.h>
|
||||
@@ -470,6 +471,8 @@ int BOARD_EDITOR_CONTROL::ExportNetlist( const TOOL_EVENT& aEvent )
|
||||
|
||||
dlg.SetExtraControlCreator( &LEGACYFILEDLG_NETLIST_OPTIONS::Create );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <tool/tool_manager.h>
|
||||
#include <tools/pcb_actions.h>
|
||||
#include <tools/pcb_grid_helper.h>
|
||||
#include <kiplatform/ui.h>
|
||||
#include <tools/pcb_selection_tool.h>
|
||||
#include <pcb_barcode.h>
|
||||
#include <tools/tool_event_utils.h>
|
||||
@@ -751,6 +752,9 @@ int DRAWING_TOOL::PlaceReferenceImage( const TOOL_EVENT& aEvent )
|
||||
|
||||
wxFileDialog dlg( m_frame, _( "Choose Image" ), wxEmptyString, wxEmptyString,
|
||||
FILEEXT::ImageFileWildcard(), wxFD_OPEN );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
bool cancelled = false;
|
||||
|
||||
RunMainStack(
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/msgdlg.h>
|
||||
#include <fstream>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
|
||||
PCB_EDIT_TABLE_TOOL::PCB_EDIT_TABLE_TOOL() :
|
||||
@@ -162,6 +163,8 @@ int PCB_EDIT_TABLE_TOOL::ExportTableToCSV( const TOOL_EVENT& aEvent )
|
||||
_( "CSV files (*.csv)|*.csv" ),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &saveDialog );
|
||||
|
||||
if( saveDialog.ShowModal() == wxID_CANCEL )
|
||||
{
|
||||
if( clearSelection )
|
||||
|
||||
@@ -40,6 +40,7 @@
|
||||
|
||||
#include <wx/wupdlock.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <thread_pool.h>
|
||||
@@ -1407,6 +1408,8 @@ void PCB_NET_INSPECTOR_PANEL::generateReport()
|
||||
_( "Report file" ) + AddFileExtListToFilter( { "csv" } ),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() == wxID_CANCEL )
|
||||
return;
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <view/view_overlay.h>
|
||||
#include <view/view_controls.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <kiplatform/ui.h>
|
||||
|
||||
|
||||
#include "label_manager.h"
|
||||
@@ -417,6 +418,8 @@ void PNS_LOG_VIEWER_FRAME::onOpen( wxCommandEvent& event )
|
||||
"PNS log files" + AddFileExtListToFilter( { "log" } ),
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() != wxID_CANCEL )
|
||||
{
|
||||
wxString logPath = dlg.GetPath();
|
||||
@@ -438,6 +441,8 @@ void PNS_LOG_VIEWER_FRAME::onSaveAs( wxCommandEvent& event )
|
||||
"PNS log files" + AddFileExtListToFilter( { "log" } ),
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
KIPLATFORM::UI::AllowNetworkFileSystems( &dlg );
|
||||
|
||||
if( dlg.ShowModal() != wxID_CANCEL )
|
||||
{
|
||||
// Enforce the extension, wxFileDialog is inept.
|
||||
|
||||
Reference in New Issue
Block a user