Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Flow.Launcher/Languages/en.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@

<!-- FileManager Setting Dialog -->
<system:String x:Key="fileManagerWindow">Select File Manager</system:String>
<system:String x:Key="fileManager_tips">Please specify the file location of the file manager you using and add arguments if necessary. The default arguments are &quot;%d&quot;, and a path is entered at that location. For example, If a command is required such as &quot;totalcmd.exe /A c:\windows&quot;, argument is /A &quot;%d&quot;.</system:String>
<system:String x:Key="fileManager_tips2">&quot;%f&quot; is an argument that represent the file path. It is used to emphasize the file/folder name when opening a specific file location in 3rd party file manager. This argument is only available in the &quot;Arg for File&quot; item. If the file manager does not have that function, you can use &quot;%d&quot;.</system:String>
<system:String x:Key="fileManager_tips">Please specify the file location of the file manager you using and add arguments as required. The &quot;%d&quot; represents the directory path to open for, used by the Arg for Folder field and for commands opening specific directories. The &quot;%f&quot; represents the file path to open for, used by the Arg for File field and for commands opening specific files.</system:String>
<system:String x:Key="fileManager_tips2">For example, if the file manager uses a command such as &quot;totalcmd.exe /A c:\windows&quot; to open the c:\windows directory, the File Manager Path will be totalcmd.exe, and the Arg For Folder will be /A &quot;%d&quot;. Certain file managers like QTTabBar may just require a path to be supplied, in this instance use &quot;%d&quot; as the File Manager Path and leave the rest of the fileds blank.</system:String>
<system:String x:Key="fileManager_name">File Manager</system:String>
<system:String x:Key="fileManager_profile_name">Profile Name</system:String>
<system:String x:Key="fileManager_path">File Manager Path</system:String>
Expand Down
3 changes: 2 additions & 1 deletion Flow.Launcher/PublicAPIInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,10 @@ public void OpenDirectory(string DirectoryPath, string FileNameOrFilePath = null
{
using var explorer = new Process();
var explorerInfo = _settingsVM.Settings.CustomExplorer;

explorer.StartInfo = new ProcessStartInfo
{
FileName = explorerInfo.Path,
FileName = explorerInfo.Path.Replace("%d", DirectoryPath),
UseShellExecute = true,
Arguments = FileNameOrFilePath is null
? explorerInfo.DirectoryArgument.Replace("%d", DirectoryPath)
Expand Down
50 changes: 22 additions & 28 deletions Flow.Launcher/SelectFileManagerWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@
</Button>
</Grid>
</StackPanel>
<StackPanel Margin="26,12,26,0">
<StackPanel Grid.Row="1" Margin="0,0,0,12">
<StackPanel Margin="26 12 26 0">
<StackPanel Grid.Row="1" Margin="0 0 0 12">
<TextBlock
Grid.Column="0"
Margin="0,0,0,0"
Margin="0 0 0 0"
FontSize="20"
FontWeight="SemiBold"
Text="{DynamicResource fileManagerWindow}"
Expand All @@ -73,12 +73,12 @@
Text="{DynamicResource fileManager_tips}"
TextAlignment="Left"
TextWrapping="WrapWithOverflow" />
<TextBlock Margin="0,14,0,0" FontSize="14">
<TextBlock Margin="0 14 0 0" FontSize="14">
<TextBlock Text="{DynamicResource fileManager_tips2}" TextWrapping="WrapWithOverflow" />
</TextBlock>
</StackPanel>

<StackPanel Margin="14,28,0,0" Orientation="Horizontal">
<StackPanel Margin="14 28 0 0" Orientation="Horizontal">
<TextBlock
Grid.Column="1"
HorizontalAlignment="Left"
Expand All @@ -89,7 +89,7 @@
Name="comboBox"
Width="200"
Height="35"
Margin="14,0,0,0"
Margin="14 0 0 0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
ItemsSource="{Binding CustomExplorers}"
Expand All @@ -101,22 +101,22 @@
</ComboBox.ItemTemplate>
</ComboBox>
<Button
Margin="10,0,0,0"
Margin="10 0 0 0"
Click="btnAdd_Click"
Content="{DynamicResource add}" />
<Button
Margin="10,0,0,0"
Margin="10 0 0 0"
Click="btnDelete_Click"
Content="{DynamicResource delete}"
IsEnabled="{Binding CustomExplorer.Editable}" />

</StackPanel>
<Rectangle
Height="1"
Margin="0,20,0,12"
Margin="0 20 0 12"
Fill="{StaticResource Color03B}" />
<StackPanel
Margin="0,0,0,0"
Margin="0 0 0 0"
HorizontalAlignment="Stretch"
DataContext="{Binding CustomExplorer}"
Orientation="Horizontal">
Expand All @@ -134,7 +134,7 @@
<TextBlock
Grid.Row="0"
Grid.Column="0"
Margin="14,5,20,0"
Margin="14 5 20 0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Expand All @@ -144,23 +144,23 @@
Grid.Row="0"
Grid.Column="1"
Width="Auto"
Margin="10,5,15,0"
Margin="10 5 15 0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
IsEnabled="{Binding Editable}"
Text="{Binding Name}" />
<TextBlock
Grid.Row="1"
Grid.Column="0"
Margin="14,10,20,0"
Margin="14 10 20 0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Text="{DynamicResource fileManager_path}" />
<DockPanel Grid.Row="1" Grid.Column="1">
<Button
Name="btnBrowseFile"
Margin="0,10,15,0"
Margin="0 10 15 0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Click="btnBrowseFile_Click"
Expand All @@ -178,7 +178,7 @@
</Button>
<TextBox
x:Name="PathTextBox"
Margin="10,10,10,0"
Margin="10 10 10 0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
IsEnabled="{Binding Editable}"
Expand All @@ -187,7 +187,7 @@
<TextBlock
Grid.Row="2"
Grid.Column="0"
Margin="14,10,20,0"
Margin="14 10 20 0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Expand All @@ -198,15 +198,15 @@
Grid.Row="2"
Grid.Column="1"
Width="Auto"
Margin="10,10,15,0"
Margin="10 10 15 0"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
IsEnabled="{Binding Editable}"
Text="{Binding DirectoryArgument}" />
<TextBlock
Grid.Row="3"
Grid.Column="0"
Margin="14,10,20,20"
Margin="14 10 20 20"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="14"
Expand All @@ -217,7 +217,7 @@
Grid.Row="3"
Grid.Column="1"
Width="Auto"
Margin="10,10,15,20"
Margin="10 10 15 20"
HorizontalAlignment="Stretch"
VerticalAlignment="Center"
IsEnabled="{Binding Editable}"
Expand All @@ -232,18 +232,18 @@
Grid.Row="2"
Background="{DynamicResource PopupButtonAreaBGColor}"
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
BorderThickness="0,1,0,0">
BorderThickness="0 1 0 0">
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
<Button
x:Name="btnCancel"
Width="145"
Margin="0,0,5,0"
Margin="0 0 5 0"
Click="btnCancel_Click"
Content="{DynamicResource cancel}" />
<Button
x:Name="btnDone"
Width="145"
Margin="5,0,0,0"
Margin="5 0 0 0"
Click="btnDone_Click"
Content="{DynamicResource done}"
ForceCursor="True">
Expand All @@ -256,12 +256,6 @@
<DataTrigger Binding="{Binding Text.Length, ElementName=PathTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
<Setter Property="IsEnabled" Value="False" />
</DataTrigger>
<DataTrigger Binding="{Binding Text.Length, ElementName=directoryArgTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
<Setter Property="IsEnabled" Value="False" />
</DataTrigger>
<DataTrigger Binding="{Binding Text.Length, ElementName=fileArgTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
<Setter Property="IsEnabled" Value="False" />
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
Expand Down