mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
polishing changes
This commit is contained in:
parent
82823041b2
commit
c943982684
4 changed files with 13 additions and 20 deletions
|
|
@ -192,14 +192,11 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
});
|
||||
contextMenus.Add(new Result
|
||||
{
|
||||
Title = "Rename",
|
||||
SubTitle = "Opens a dialogue to rename this",
|
||||
Title = Context.API.GetTranslation("plugin_explorer_rename_a_file"),
|
||||
SubTitle = Context.API.GetTranslation("plugin_explorer_rename_subtitle"),
|
||||
Action = _ =>
|
||||
{
|
||||
Type T;
|
||||
RenameFile window;
|
||||
|
||||
|
||||
switch (record.Type)
|
||||
{
|
||||
case ResultType.Folder:
|
||||
|
|
@ -209,19 +206,18 @@ namespace Flow.Launcher.Plugin.Explorer
|
|||
window = new RenameFile(Context.API, new FileInfo(record.FullPath));
|
||||
break;
|
||||
default:
|
||||
Context.API.ShowMsgError("Cannot rename this.");
|
||||
Context.API.ShowMsgError(Context.API.GetTranslation("plugin_explorer_cannot_rename"));
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
window.ShowDialog();
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
},
|
||||
// placeholder until real image is found
|
||||
IcoPath = Constants.ShowContextMenuImagePath,
|
||||
Glyph = new GlyphInfo(FontFamily: "/Resources/#Segoe Fluent Icons", Glyph: "\ue70f")
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace Flow.Launcher.Plugin.Explorer.Helper
|
|||
}
|
||||
else if (info is DirectoryInfo)
|
||||
{
|
||||
var invalidChars = Path.GetInvalidPathChars().ToList();
|
||||
List<char> invalidChars = Path.GetInvalidPathChars().ToList();
|
||||
invalidChars.Add('/');
|
||||
invalidChars.Add('\\');
|
||||
if (newName.IndexOfAny(invalidChars.ToArray()) >= 0)
|
||||
|
|
|
|||
|
|
@ -199,4 +199,6 @@
|
|||
<system:String x:Key="plugin_explorer_field_may_not_be_empty">{0} may not be empty.</system:String>
|
||||
<system:String x:Key="plugin_explorer_invalid_name">{0} is an invalid name.</system:String>
|
||||
<system:String x:Key="plugin_explorer_file_not_found">The specified file: {0} was not found</system:String>
|
||||
<system:String x:Key="plugin_explorer_rename_subtitle">Open a dialog to rename this.</system:String>
|
||||
<system:String x:Key="plugin_explorer_cannot_rename">This cannot be renamed.</system:String>
|
||||
</ResourceDictionary>
|
||||
|
|
|
|||
|
|
@ -115,11 +115,6 @@ namespace Flow.Launcher.Plugin.Explorer.Views
|
|||
btnDone.Focus();
|
||||
OnDoneButtonClick(sender, e);
|
||||
e.Handled = true;
|
||||
}
|
||||
if (e.Key == Key.Space)
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue