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:
Seth Hillbrand
2026-01-29 12:43:20 -08:00
parent 690bdc65dd
commit 8eb3f3c618
70 changed files with 283 additions and 2 deletions
+11
View File
@@ -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;