mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge branch 'rename-file' of https://github.com/Koisu-unavailable/Flow.Launcher into rename-file
This commit is contained in:
commit
0aff9e33de
2 changed files with 11 additions and 2 deletions
|
|
@ -5,7 +5,7 @@
|
|||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:Flow.Launcher.Plugin.Explorer.Views"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
Title="{DynamicResource plugin_explorer_manageactionkeywords_header}"
|
||||
Title=""
|
||||
Height="180"
|
||||
MaxWidth="600"
|
||||
Background="{DynamicResource PopuBGColor}"
|
||||
|
|
|
|||
|
|
@ -39,6 +39,14 @@ namespace Flow.Launcher.Plugin.Explorer.Views
|
|||
|
||||
ShowInTaskbar = false;
|
||||
RenameTb.Focus();
|
||||
var window = Window.GetWindow(this);
|
||||
window.KeyDown += (s, e) =>
|
||||
{
|
||||
if (e.Key == Key.Escape)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -55,10 +63,11 @@ namespace Flow.Launcher.Plugin.Explorer.Views
|
|||
else if (_info is FileInfo info)
|
||||
{
|
||||
string properName = Path.GetFileNameWithoutExtension(info.Name);
|
||||
Application.Current.Dispatcher.Invoke(textBox.Select, DispatcherPriority.Background, textBox.Text.IndexOf(properName), properName.Length );
|
||||
Application.Current.Dispatcher.Invoke(textBox.Select, DispatcherPriority.Background, textBox.Text.IndexOf(properName), properName.Length);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void OnDoneButtonClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RenameThing.Rename(NewFileName, _info, _api);
|
||||
|
|
|
|||
Loading…
Reference in a new issue