mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge branch 'dev' into rename-file
This commit is contained in:
commit
9806997f31
6 changed files with 21 additions and 10 deletions
|
|
@ -153,13 +153,13 @@
|
|||
Style="{StaticResource AccentButtonStyle}">
|
||||
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<TextBlock
|
||||
x:Name="lblAdd"
|
||||
x:Name="tbAdd"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="{DynamicResource done}"
|
||||
Visibility="Collapsed" />
|
||||
<TextBlock
|
||||
x:Name="lblUpdate"
|
||||
x:Name="tbUpdate"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="{DynamicResource update}"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Flow.Launcher
|
|||
public CustomQueryHotkeySetting()
|
||||
{
|
||||
InitializeComponent();
|
||||
lblAdd.Visibility = Visibility.Visible;
|
||||
tbAdd.Visibility = Visibility.Visible;
|
||||
}
|
||||
|
||||
public CustomQueryHotkeySetting(CustomPluginHotkey hotkey)
|
||||
|
|
@ -25,7 +25,7 @@ namespace Flow.Launcher
|
|||
update = true;
|
||||
ActionKeyword = originalCustomHotkey.ActionKeyword;
|
||||
InitializeComponent();
|
||||
lblUpdate.Visibility = Visibility.Visible;
|
||||
tbUpdate.Visibility = Visibility.Visible;
|
||||
HotkeyControl.SetHotkey(originalCustomHotkey.Hotkey, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
<system:String x:Key="runtimeExecutableInvalidChooseDownload">
|
||||
Your selected {0} executable is invalid.
|
||||
{2}{2}
|
||||
Click yes if you would like select the {0} executable agian. Click no if you would like to download {1}
|
||||
Click yes if you would like select the {0} executable again. Click no if you would like to download {1}
|
||||
</system:String>
|
||||
<system:String x:Key="runtimePluginUnableToSetExecutablePath">Unable to set {0} executable path, please try from Flow's settings (scroll down to the bottom).</system:String>
|
||||
<system:String x:Key="failedToInitializePluginsTitle">Fail to Init Plugins</system:String>
|
||||
|
|
@ -413,7 +413,7 @@
|
|||
<system:String x:Key="fileManagerWindow">Select File Manager</system:String>
|
||||
<system:String x:Key="fileManager_learnMore">Learn more</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 "%d" represents the directory path to open for, used by the Arg for Folder field and for commands opening specific directories. The "%f" 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 "totalcmd.exe /A c:\windows" to open the c:\windows directory, the File Manager Path will be totalcmd.exe, and the Arg For Folder will be /A "%d". Certain file managers like QTTabBar may just require a path to be supplied, in this instance use "%d" as the File Manager Path and leave the rest of the fileds blank.</system:String>
|
||||
<system:String x:Key="fileManager_tips2">For example, if the file manager uses a command such as "totalcmd.exe /A c:\windows" to open the c:\windows directory, the File Manager Path will be totalcmd.exe, and the Arg For Folder will be /A "%d". Certain file managers like QTTabBar may just require a path to be supplied, in this instance use "%d" as the File Manager Path and leave the rest of the fields 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>
|
||||
|
|
|
|||
|
|
@ -284,6 +284,10 @@ namespace Flow.Launcher
|
|||
break;
|
||||
case nameof(Settings.Language):
|
||||
UpdateNotifyIconText();
|
||||
if (_settings.ShowHomePage && _viewModel.QueryResultsSelected() && string.IsNullOrEmpty(_viewModel.QueryText))
|
||||
{
|
||||
_viewModel.QueryResults();
|
||||
}
|
||||
break;
|
||||
case nameof(Settings.Hotkey):
|
||||
UpdateNotifyIconText();
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
return Context.API.GetTranslation("plugin_explorer_plugin_description");
|
||||
}
|
||||
|
||||
private void FillQuickAccessLinkNames()
|
||||
private static void FillQuickAccessLinkNames()
|
||||
{
|
||||
// Legacy version does not have names for quick access links, so we fill them with the path name.
|
||||
foreach (var link in Settings.QuickAccessLinks)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
|
|
@ -14,6 +15,8 @@ namespace Flow.Launcher.Plugin.Explorer.Views;
|
|||
[INotifyPropertyChanged]
|
||||
public partial class QuickAccessLinkSettings
|
||||
{
|
||||
private static readonly string ClassName = nameof(QuickAccessLinkSettings);
|
||||
|
||||
private string _selectedPath;
|
||||
public string SelectedPath
|
||||
{
|
||||
|
|
@ -27,6 +30,9 @@ public partial class QuickAccessLinkSettings
|
|||
if (string.IsNullOrEmpty(_selectedName))
|
||||
{
|
||||
SelectedName = _selectedPath.GetPathName();
|
||||
}
|
||||
if (!string.IsNullOrEmpty(_selectedPath))
|
||||
{
|
||||
_accessLinkType = GetResultType(_selectedPath);
|
||||
}
|
||||
}
|
||||
|
|
@ -187,13 +193,13 @@ public partial class QuickAccessLinkSettings
|
|||
private static ResultType GetResultType(string path)
|
||||
{
|
||||
// Check if the path is a file or folder
|
||||
if (System.IO.File.Exists(path))
|
||||
if (File.Exists(path))
|
||||
{
|
||||
return ResultType.File;
|
||||
}
|
||||
else if (System.IO.Directory.Exists(path))
|
||||
else if (Directory.Exists(path))
|
||||
{
|
||||
if (string.Equals(System.IO.Path.GetPathRoot(path), path, StringComparison.OrdinalIgnoreCase))
|
||||
if (string.Equals(Path.GetPathRoot(path), path, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return ResultType.Volume;
|
||||
}
|
||||
|
|
@ -205,6 +211,7 @@ public partial class QuickAccessLinkSettings
|
|||
else
|
||||
{
|
||||
// This should not happen, but just in case, we assume it's a folder
|
||||
Main.Context.API.LogError(ClassName, $"The path '{path}' does not exist or is invalid. Defaulting to Folder type.");
|
||||
return ResultType.Folder;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue