mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 07:34:00 +08:00
(MainWindow): [Ctrl+Ins] copies selected filenames to clipboard.
This commit is contained in:
parent
b3973db7f0
commit
2f4d258694
@ -277,6 +277,7 @@
|
||||
<KeyBinding Gesture="Ctrl+E" Command="{x:Static local:Commands.ExploreItem}"/>
|
||||
<KeyBinding Gesture="F2" Command="{x:Static local:Commands.RenameItem}"/>
|
||||
<KeyBinding Gesture="Space" Command="{x:Static local:Commands.NextItem}"/>
|
||||
<KeyBinding Gesture="Ctrl+Insert" Command="{x:Static local:Commands.CopyNames}"/>
|
||||
<MouseBinding Gesture="LeftDoubleClick" Command="{x:Static local:Commands.OpenItem}" />
|
||||
</ListView.InputBindings>
|
||||
<ListView.ItemContainerStyle>
|
||||
@ -380,6 +381,7 @@
|
||||
<CommandBinding Command="{x:Static local:Commands.OpenRecent}" Executed="OpenRecentExec" CanExecute="CanExecuteAlways"/>
|
||||
<CommandBinding Command="{x:Static local:Commands.AddSelection}" Executed="AddSelectionExec" CanExecute="CanExecuteAlways"/>
|
||||
<CommandBinding Command="{x:Static local:Commands.SelectAll}" Executed="SelectAllExec" CanExecute="CanExecuteAlways"/>
|
||||
<CommandBinding Command="{x:Static local:Commands.CopyNames}" Executed="CopyNamesExec" CanExecute="CanExecuteAlways"/>
|
||||
<CommandBinding Command="{x:Static local:Commands.NextItem}" Executed="NextItemExec" CanExecute="CanExecuteAlways"/>
|
||||
<CommandBinding Command="{x:Static local:Commands.ExtractItem}" Executed="ExtractItemExec" CanExecute="CanExecuteExtract"/>
|
||||
<CommandBinding Command="{x:Static local:Commands.CreateArchive}" Executed="CreateArchiveExec" CanExecute="CanExecuteCreateArchive"/>
|
||||
|
@ -1194,6 +1194,15 @@ namespace GARbro.GUI
|
||||
CurrentDirectory.SelectAll();
|
||||
}
|
||||
|
||||
void CopyNamesExec (object sender, ExecutedRoutedEventArgs e)
|
||||
{
|
||||
var names = CurrentDirectory.SelectedItems.Cast<EntryViewModel>().Select (f => f.Name);
|
||||
if (names.Any())
|
||||
{
|
||||
Clipboard.SetText (string.Join ("\r\n", names));
|
||||
}
|
||||
}
|
||||
|
||||
void NextItemExec (object sender, ExecutedRoutedEventArgs e)
|
||||
{
|
||||
if (LookupActive)
|
||||
@ -1442,5 +1451,6 @@ namespace GARbro.GUI
|
||||
public static readonly RoutedCommand SelectAll = new RoutedCommand();
|
||||
public static readonly RoutedCommand SetFileType = new RoutedCommand();
|
||||
public static readonly RoutedCommand NextItem = new RoutedCommand();
|
||||
public static readonly RoutedCommand CopyNames = new RoutedCommand();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user