File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Plugins/Flow.Launcher.Plugin.BrowserBookmark/ViewModels Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 66using System ;
77using System . ComponentModel ;
88using System . IO ;
9- using Microsoft . Win32 ;
109
1110namespace Flow . Launcher . Plugin . BrowserBookmark . ViewModels ;
1211
@@ -86,22 +85,20 @@ private void Cancel()
8685 [ RelayCommand ]
8786 private void BrowseDataDirectory ( )
8887 {
89- var dialog = new OpenFileDialog
88+ var dialog = new System . Windows . Forms . FolderBrowserDialog
9089 {
91- ValidateNames = false ,
92- CheckFileExists = false ,
93- CheckPathExists = true ,
94- FileName = "Folder Selection."
90+ Description = "Select the browser's profile data directory." ,
91+ UseDescriptionForTitle = true
9592 } ;
9693
9794 if ( ! string . IsNullOrEmpty ( EditableBrowser . DataDirectoryPath ) && Directory . Exists ( EditableBrowser . DataDirectoryPath ) )
9895 {
99- dialog . InitialDirectory = EditableBrowser . DataDirectoryPath ;
96+ dialog . SelectedPath = EditableBrowser . DataDirectoryPath ;
10097 }
10198
102- if ( dialog . ShowDialog ( ) == true )
99+ if ( dialog . ShowDialog ( ) == System . Windows . Forms . DialogResult . OK )
103100 {
104- var path = Path . GetDirectoryName ( dialog . FileName ) ;
101+ var path = dialog . SelectedPath ;
105102 if ( ! string . IsNullOrEmpty ( path ) )
106103 {
107104 EditableBrowser . DataDirectoryPath = path ;
You can’t perform that action at this time.
0 commit comments