Open file chooser in better places / fallback
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/TransactionBroadcasterViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/TransactionBroadcasterViewModel.cs
@@ -10,6 +10,7 @@ using System.Linq;
using System.Reactive;
using System.Reactive.Disposables;
using System.Reactive.Linq;
+using System.Runtime.InteropServices;
using System.Threading.Tasks;
using WalletWasabi.Gui.Models;
using WalletWasabi.Gui.ViewModels;
@@ -82,6 +83,20 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
Title = "Import Transaction"
};
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ {
+ var initailDirectory = Path.Combine("/media", Environment.UserName);;
+ if (!Directory.Exists(initailDirectory))
+ {
+ initailDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
+ }
+ ofd.InitialDirectory = initailDirectory;
+ }
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ {
+ ofd.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
+ }
+
var selected = await ofd.ShowAsync(Application.Current.MainWindow, fallBack: true);
if (selected != null && selected.Any())
{

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/TransactionViewerViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/TransactionViewerViewModel.cs
@@ -73,7 +73,16 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
Title = "Export Binary PSBT"
};
- if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ {
+ var initailDirectory = Path.Combine("/media", Environment.UserName);;
+ if (!Directory.Exists(initailDirectory))
+ {
+ initailDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
+ }
+ sfd.InitialDirectory = initailDirectory;
+ }
+ else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
sfd.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
}

Open file chooser in better places / fallback