mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(MainWindow): [Ctrl+Ins] copies selected filenames to clipboard.
This commit is contained in:
@@ -277,6 +277,7 @@
|
|||||||
<KeyBinding Gesture="Ctrl+E" Command="{x:Static local:Commands.ExploreItem}"/>
|
<KeyBinding Gesture="Ctrl+E" Command="{x:Static local:Commands.ExploreItem}"/>
|
||||||
<KeyBinding Gesture="F2" Command="{x:Static local:Commands.RenameItem}"/>
|
<KeyBinding Gesture="F2" Command="{x:Static local:Commands.RenameItem}"/>
|
||||||
<KeyBinding Gesture="Space" Command="{x:Static local:Commands.NextItem}"/>
|
<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}" />
|
<MouseBinding Gesture="LeftDoubleClick" Command="{x:Static local:Commands.OpenItem}" />
|
||||||
</ListView.InputBindings>
|
</ListView.InputBindings>
|
||||||
<ListView.ItemContainerStyle>
|
<ListView.ItemContainerStyle>
|
||||||
@@ -380,6 +381,7 @@
|
|||||||
<CommandBinding Command="{x:Static local:Commands.OpenRecent}" Executed="OpenRecentExec" CanExecute="CanExecuteAlways"/>
|
<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.AddSelection}" Executed="AddSelectionExec" CanExecute="CanExecuteAlways"/>
|
||||||
<CommandBinding Command="{x:Static local:Commands.SelectAll}" Executed="SelectAllExec" 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.NextItem}" Executed="NextItemExec" CanExecute="CanExecuteAlways"/>
|
||||||
<CommandBinding Command="{x:Static local:Commands.ExtractItem}" Executed="ExtractItemExec" CanExecute="CanExecuteExtract"/>
|
<CommandBinding Command="{x:Static local:Commands.ExtractItem}" Executed="ExtractItemExec" CanExecute="CanExecuteExtract"/>
|
||||||
<CommandBinding Command="{x:Static local:Commands.CreateArchive}" Executed="CreateArchiveExec" CanExecute="CanExecuteCreateArchive"/>
|
<CommandBinding Command="{x:Static local:Commands.CreateArchive}" Executed="CreateArchiveExec" CanExecute="CanExecuteCreateArchive"/>
|
||||||
|
|||||||
@@ -1194,6 +1194,15 @@ namespace GARbro.GUI
|
|||||||
CurrentDirectory.SelectAll();
|
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)
|
void NextItemExec (object sender, ExecutedRoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (LookupActive)
|
if (LookupActive)
|
||||||
@@ -1442,5 +1451,6 @@ namespace GARbro.GUI
|
|||||||
public static readonly RoutedCommand SelectAll = new RoutedCommand();
|
public static readonly RoutedCommand SelectAll = new RoutedCommand();
|
||||||
public static readonly RoutedCommand SetFileType = new RoutedCommand();
|
public static readonly RoutedCommand SetFileType = new RoutedCommand();
|
||||||
public static readonly RoutedCommand NextItem = new RoutedCommand();
|
public static readonly RoutedCommand NextItem = new RoutedCommand();
|
||||||
|
public static readonly RoutedCommand CopyNames = new RoutedCommand();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user