From a45ed4b7b366b2d76e2faa7a00a4b04626d2a2b8 Mon Sep 17 00:00:00 2001
From: ScrubN <72096833+ScrubN@users.noreply.github.com>
Date: Sat, 28 Dec 2024 16:48:23 -0500
Subject: [PATCH] Add context menu button for copying task path to clipboard
---
TwitchDownloaderWPF/PageQueue.xaml | 5 +++++
TwitchDownloaderWPF/PageQueue.xaml.cs | 10 ++++++++++
2 files changed, 15 insertions(+)
diff --git a/TwitchDownloaderWPF/PageQueue.xaml b/TwitchDownloaderWPF/PageQueue.xaml
index a6b14c04..4e1c2466 100644
--- a/TwitchDownloaderWPF/PageQueue.xaml
+++ b/TwitchDownloaderWPF/PageQueue.xaml
@@ -66,6 +66,11 @@
+
diff --git a/TwitchDownloaderWPF/PageQueue.xaml.cs b/TwitchDownloaderWPF/PageQueue.xaml.cs
index a12fee62..4dc1ff54 100644
--- a/TwitchDownloaderWPF/PageQueue.xaml.cs
+++ b/TwitchDownloaderWPF/PageQueue.xaml.cs
@@ -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 })