Skip to content

Commit 7ef623a

Browse files
authored
Merge pull request #2803 from onesounds/240625-QtTabBar
Support QTTabBar
2 parents 2175f2b + 6476e54 commit 7ef623a

File tree

3 files changed

+26
-31
lines changed

3 files changed

+26
-31
lines changed

Flow.Launcher/Languages/en.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@
289289

290290
<!-- FileManager Setting Dialog -->
291291
<system:String x:Key="fileManagerWindow">Select File Manager</system:String>
292-
<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>
293-
<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>
292+
<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>
293+
<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>
294294
<system:String x:Key="fileManager_name">File Manager</system:String>
295295
<system:String x:Key="fileManager_profile_name">Profile Name</system:String>
296296
<system:String x:Key="fileManager_path">File Manager Path</system:String>

Flow.Launcher/PublicAPIInstance.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,10 @@ public void OpenDirectory(string DirectoryPath, string FileNameOrFilePath = null
230230
{
231231
using var explorer = new Process();
232232
var explorerInfo = _settingsVM.Settings.CustomExplorer;
233+
233234
explorer.StartInfo = new ProcessStartInfo
234235
{
235-
FileName = explorerInfo.Path,
236+
FileName = explorerInfo.Path.Replace("%d", DirectoryPath),
236237
UseShellExecute = true,
237238
Arguments = FileNameOrFilePath is null
238239
? explorerInfo.DirectoryArgument.Replace("%d", DirectoryPath)

Flow.Launcher/SelectFileManagerWindow.xaml

Lines changed: 22 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@
5757
</Button>
5858
</Grid>
5959
</StackPanel>
60-
<StackPanel Margin="26,12,26,0">
61-
<StackPanel Grid.Row="1" Margin="0,0,0,12">
60+
<StackPanel Margin="26 12 26 0">
61+
<StackPanel Grid.Row="1" Margin="0 0 0 12">
6262
<TextBlock
6363
Grid.Column="0"
64-
Margin="0,0,0,0"
64+
Margin="0 0 0 0"
6565
FontSize="20"
6666
FontWeight="SemiBold"
6767
Text="{DynamicResource fileManagerWindow}"
@@ -73,12 +73,12 @@
7373
Text="{DynamicResource fileManager_tips}"
7474
TextAlignment="Left"
7575
TextWrapping="WrapWithOverflow" />
76-
<TextBlock Margin="0,14,0,0" FontSize="14">
76+
<TextBlock Margin="0 14 0 0" FontSize="14">
7777
<TextBlock Text="{DynamicResource fileManager_tips2}" TextWrapping="WrapWithOverflow" />
7878
</TextBlock>
7979
</StackPanel>
8080

81-
<StackPanel Margin="14,28,0,0" Orientation="Horizontal">
81+
<StackPanel Margin="14 28 0 0" Orientation="Horizontal">
8282
<TextBlock
8383
Grid.Column="1"
8484
HorizontalAlignment="Left"
@@ -89,7 +89,7 @@
8989
Name="comboBox"
9090
Width="200"
9191
Height="35"
92-
Margin="14,0,0,0"
92+
Margin="14 0 0 0"
9393
HorizontalAlignment="Left"
9494
VerticalAlignment="Center"
9595
ItemsSource="{Binding CustomExplorers}"
@@ -101,22 +101,22 @@
101101
</ComboBox.ItemTemplate>
102102
</ComboBox>
103103
<Button
104-
Margin="10,0,0,0"
104+
Margin="10 0 0 0"
105105
Click="btnAdd_Click"
106106
Content="{DynamicResource add}" />
107107
<Button
108-
Margin="10,0,0,0"
108+
Margin="10 0 0 0"
109109
Click="btnDelete_Click"
110110
Content="{DynamicResource delete}"
111111
IsEnabled="{Binding CustomExplorer.Editable}" />
112112

113113
</StackPanel>
114114
<Rectangle
115115
Height="1"
116-
Margin="0,20,0,12"
116+
Margin="0 20 0 12"
117117
Fill="{StaticResource Color03B}" />
118118
<StackPanel
119-
Margin="0,0,0,0"
119+
Margin="0 0 0 0"
120120
HorizontalAlignment="Stretch"
121121
DataContext="{Binding CustomExplorer}"
122122
Orientation="Horizontal">
@@ -134,7 +134,7 @@
134134
<TextBlock
135135
Grid.Row="0"
136136
Grid.Column="0"
137-
Margin="14,5,20,0"
137+
Margin="14 5 20 0"
138138
HorizontalAlignment="Left"
139139
VerticalAlignment="Center"
140140
FontSize="14"
@@ -144,23 +144,23 @@
144144
Grid.Row="0"
145145
Grid.Column="1"
146146
Width="Auto"
147-
Margin="10,5,15,0"
147+
Margin="10 5 15 0"
148148
HorizontalAlignment="Stretch"
149149
VerticalAlignment="Center"
150150
IsEnabled="{Binding Editable}"
151151
Text="{Binding Name}" />
152152
<TextBlock
153153
Grid.Row="1"
154154
Grid.Column="0"
155-
Margin="14,10,20,0"
155+
Margin="14 10 20 0"
156156
HorizontalAlignment="Left"
157157
VerticalAlignment="Center"
158158
FontSize="14"
159159
Text="{DynamicResource fileManager_path}" />
160160
<DockPanel Grid.Row="1" Grid.Column="1">
161161
<Button
162162
Name="btnBrowseFile"
163-
Margin="0,10,15,0"
163+
Margin="0 10 15 0"
164164
HorizontalAlignment="Right"
165165
VerticalAlignment="Center"
166166
Click="btnBrowseFile_Click"
@@ -178,7 +178,7 @@
178178
</Button>
179179
<TextBox
180180
x:Name="PathTextBox"
181-
Margin="10,10,10,0"
181+
Margin="10 10 10 0"
182182
HorizontalAlignment="Stretch"
183183
VerticalAlignment="Center"
184184
IsEnabled="{Binding Editable}"
@@ -187,7 +187,7 @@
187187
<TextBlock
188188
Grid.Row="2"
189189
Grid.Column="0"
190-
Margin="14,10,20,0"
190+
Margin="14 10 20 0"
191191
HorizontalAlignment="Left"
192192
VerticalAlignment="Center"
193193
FontSize="14"
@@ -198,15 +198,15 @@
198198
Grid.Row="2"
199199
Grid.Column="1"
200200
Width="Auto"
201-
Margin="10,10,15,0"
201+
Margin="10 10 15 0"
202202
HorizontalAlignment="Stretch"
203203
VerticalAlignment="Center"
204204
IsEnabled="{Binding Editable}"
205205
Text="{Binding DirectoryArgument}" />
206206
<TextBlock
207207
Grid.Row="3"
208208
Grid.Column="0"
209-
Margin="14,10,20,20"
209+
Margin="14 10 20 20"
210210
HorizontalAlignment="Left"
211211
VerticalAlignment="Center"
212212
FontSize="14"
@@ -217,7 +217,7 @@
217217
Grid.Row="3"
218218
Grid.Column="1"
219219
Width="Auto"
220-
Margin="10,10,15,20"
220+
Margin="10 10 15 20"
221221
HorizontalAlignment="Stretch"
222222
VerticalAlignment="Center"
223223
IsEnabled="{Binding Editable}"
@@ -232,18 +232,18 @@
232232
Grid.Row="2"
233233
Background="{DynamicResource PopupButtonAreaBGColor}"
234234
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
235-
BorderThickness="0,1,0,0">
235+
BorderThickness="0 1 0 0">
236236
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
237237
<Button
238238
x:Name="btnCancel"
239239
Width="145"
240-
Margin="0,0,5,0"
240+
Margin="0 0 5 0"
241241
Click="btnCancel_Click"
242242
Content="{DynamicResource cancel}" />
243243
<Button
244244
x:Name="btnDone"
245245
Width="145"
246-
Margin="5,0,0,0"
246+
Margin="5 0 0 0"
247247
Click="btnDone_Click"
248248
Content="{DynamicResource done}"
249249
ForceCursor="True">
@@ -256,12 +256,6 @@
256256
<DataTrigger Binding="{Binding Text.Length, ElementName=PathTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
257257
<Setter Property="IsEnabled" Value="False" />
258258
</DataTrigger>
259-
<DataTrigger Binding="{Binding Text.Length, ElementName=directoryArgTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
260-
<Setter Property="IsEnabled" Value="False" />
261-
</DataTrigger>
262-
<DataTrigger Binding="{Binding Text.Length, ElementName=fileArgTextBox, UpdateSourceTrigger=PropertyChanged}" Value="0">
263-
<Setter Property="IsEnabled" Value="False" />
264-
</DataTrigger>
265259
</Style.Triggers>
266260
</Style>
267261
</Button.Style>

0 commit comments

Comments
 (0)