Skip to content

Commit

Permalink
Add context menu button for copying task path to clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN committed Dec 28, 2024
1 parent 59e1eca commit a45ed4b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions TwitchDownloaderWPF/PageQueue.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
<fa:SvgAwesome Icon="Solid_FolderOpen" Foreground="{DynamicResource AppText}" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="{lex:Loc CopyFolderPathToClipboard}" Click="MenuItemCopyTaskPath_Click" Foreground="{DynamicResource AppText}">
<MenuItem.Icon>
<fa:SvgAwesome Icon="Solid_Copy" Foreground="{DynamicResource AppText}" />
</MenuItem.Icon>
</MenuItem>
</ContextMenu>
</Border.ContextMenu>
<Grid Margin="1,1">
Expand Down
10 changes: 10 additions & 0 deletions TwitchDownloaderWPF/PageQueue.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,16 @@ private void MenuItemOpenTaskFolder_Click(object sender, RoutedEventArgs e)
FileService.OpenExplorerForFile(new FileInfo(task.OutputFile));
}

private void MenuItemCopyTaskPath_Click(object sender, RoutedEventArgs e)
{
if (sender is not MenuItem { DataContext: TwitchTask task })
{
return;
}

Clipboard.SetText(task.OutputFile);
}

private void BtnRetryTask_Click(object sender, RoutedEventArgs e)
{
if (sender is not Button { DataContext: TwitchTask task })
Expand Down

0 comments on commit a45ed4b

Please sign in to comment.