diff --git a/src/Views/Widgets/CommitChanges.xaml.cs b/src/Views/Widgets/CommitChanges.xaml.cs index 74fe7d2d..87796b8d 100644 --- a/src/Views/Widgets/CommitChanges.xaml.cs +++ b/src/Views/Widgets/CommitChanges.xaml.cs @@ -267,7 +267,7 @@ namespace SourceGit.Views.Widgets { var copyPath = new MenuItem(); copyPath.Header = App.Text("CopyPath"); copyPath.Click += (obj, ev) => { - Clipboard.SetText(path); + Clipboard.SetDataObject(path, true); }; menu.Items.Add(copyPath); diff --git a/src/Views/Widgets/CommitDetail.xaml.cs b/src/Views/Widgets/CommitDetail.xaml.cs index c01de300..e3d64bc6 100644 --- a/src/Views/Widgets/CommitDetail.xaml.cs +++ b/src/Views/Widgets/CommitDetail.xaml.cs @@ -156,7 +156,7 @@ namespace SourceGit.Views.Widgets { var copyPath = new MenuItem(); copyPath.Header = App.Text("CopyPath"); copyPath.Click += (obj, ev) => { - Clipboard.SetText(change.Path); + Clipboard.SetDataObject(change.Path, true); ev.Handled = true; }; menu.Items.Add(copyPath); diff --git a/src/Views/Widgets/Dashboard.xaml.cs b/src/Views/Widgets/Dashboard.xaml.cs index 47ee131d..4963a54b 100644 --- a/src/Views/Widgets/Dashboard.xaml.cs +++ b/src/Views/Widgets/Dashboard.xaml.cs @@ -690,7 +690,7 @@ namespace SourceGit.Views.Widgets { var copy = new MenuItem(); copy.Header = App.Text("BranchCM.CopyName"); copy.Click += (o, e) => { - Clipboard.SetText(branch.Name); + Clipboard.SetDataObject(branch.Name, true); e.Handled = true; }; menu.Items.Add(copy); @@ -721,7 +721,7 @@ namespace SourceGit.Views.Widgets { var copy = new MenuItem(); copy.Header = App.Text("RemoteCM.CopyURL"); copy.Click += (o, e) => { - Clipboard.SetText(remote.URL); + Clipboard.SetDataObject(remote.URL, true); e.Handled = true; }; @@ -812,7 +812,7 @@ namespace SourceGit.Views.Widgets { var copy = new MenuItem(); copy.Header = App.Text("BranchCM.CopyName"); copy.Click += (o, e) => { - Clipboard.SetText(branch.Remote + "/" + branch.Name); + Clipboard.SetDataObject(branch.Remote + "/" + branch.Name, true); e.Handled = true; }; @@ -878,7 +878,7 @@ namespace SourceGit.Views.Widgets { var copy = new MenuItem(); copy.Header = App.Text("TagCM.Copy"); copy.Click += (o, ev) => { - Clipboard.SetText(tag.Name); + Clipboard.SetDataObject(tag.Name, true); ev.Handled = true; }; @@ -918,7 +918,7 @@ namespace SourceGit.Views.Widgets { var copy = new MenuItem(); copy.Header = App.Text("Submodule.CopyPath"); copy.Click += (o, ev) => { - Clipboard.SetText(submodule); + Clipboard.SetDataObject(submodule, true); ev.Handled = true; }; diff --git a/src/Views/Widgets/DiffViewer.xaml.cs b/src/Views/Widgets/DiffViewer.xaml.cs index a612d079..e63a0280 100644 --- a/src/Views/Widgets/DiffViewer.xaml.cs +++ b/src/Views/Widgets/DiffViewer.xaml.cs @@ -358,7 +358,7 @@ namespace SourceGit.Views.Widgets { builder.AppendLine(); } - Clipboard.SetText(builder.ToString()); + Clipboard.SetDataObject(builder.ToString(), true); })); foreach (var number in lineNumbers) { @@ -476,7 +476,7 @@ namespace SourceGit.Views.Widgets { builder.AppendLine(); } - Clipboard.SetText(builder.ToString()); + Clipboard.SetDataObject(builder.ToString(), true); }; menu.Items.Add(copy); menu.IsOpen = true; diff --git a/src/Views/Widgets/Histories.xaml.cs b/src/Views/Widgets/Histories.xaml.cs index 370c2cc4..bb2718a8 100644 --- a/src/Views/Widgets/Histories.xaml.cs +++ b/src/Views/Widgets/Histories.xaml.cs @@ -388,7 +388,7 @@ namespace SourceGit.Views.Widgets { var copySHA = new MenuItem(); copySHA.Header = App.Text("CommitCM.CopySHA"); copySHA.Click += (o, e) => { - Clipboard.SetText(commit.SHA); + Clipboard.SetDataObject(commit.SHA, true); e.Handled = true; }; menu.Items.Add(copySHA); @@ -396,9 +396,9 @@ namespace SourceGit.Views.Widgets { var copyInfo = new MenuItem(); copyInfo.Header = App.Text("CommitCM.CopyInfo"); copyInfo.Click += (o, e) => { - Clipboard.SetText(string.Format( + Clipboard.SetDataObject(string.Format( "SHA: {0}\nTITLE: {1}\nAUTHOR: {2} <{3}>\nTIME: {4}", - commit.SHA, commit.Subject, commit.Committer.Name, commit.Committer.Email, commit.Committer.Time)); + commit.SHA, commit.Subject, commit.Committer.Name, commit.Committer.Email, commit.Committer.Time), true); }; menu.Items.Add(copyInfo); diff --git a/src/Views/Widgets/RevisionFiles.xaml.cs b/src/Views/Widgets/RevisionFiles.xaml.cs index 89b9b382..db1593bf 100644 --- a/src/Views/Widgets/RevisionFiles.xaml.cs +++ b/src/Views/Widgets/RevisionFiles.xaml.cs @@ -198,7 +198,7 @@ namespace SourceGit.Views.Widgets { builder.AppendLine(); } - Clipboard.SetText(builder.ToString()); + Clipboard.SetDataObject(builder.ToString(), true); }; menu.Items.Add(copy); menu.IsOpen = true; @@ -304,7 +304,7 @@ namespace SourceGit.Views.Widgets { var copyPath = new MenuItem(); copyPath.Header = App.Text("CopyPath"); copyPath.Click += (obj, ev) => { - Clipboard.SetText(node.Path); + Clipboard.SetDataObject(node.Path, true); ev.Handled = true; }; diff --git a/src/Views/Widgets/WorkingCopyChanges.xaml.cs b/src/Views/Widgets/WorkingCopyChanges.xaml.cs index 7cc1f46b..8d15af6f 100644 --- a/src/Views/Widgets/WorkingCopyChanges.xaml.cs +++ b/src/Views/Widgets/WorkingCopyChanges.xaml.cs @@ -388,7 +388,7 @@ namespace SourceGit.Views.Widgets { var copyPath = new MenuItem(); copyPath.Header = App.Text("CopyPath"); copyPath.Click += (o, e) => { - Clipboard.SetText(node.Path); + Clipboard.SetDataObject(node.Path, true); e.Handled = true; }; @@ -510,7 +510,7 @@ namespace SourceGit.Views.Widgets { var copyPath = new MenuItem(); copyPath.Header = App.Text("CopyPath"); copyPath.Click += (o, e) => { - Clipboard.SetText(change.Path); + Clipboard.SetDataObject(change.Path, true); e.Handled = true; }; @@ -619,7 +619,7 @@ namespace SourceGit.Views.Widgets { var copyPath = new MenuItem(); copyPath.Header = App.Text("CopyPath"); copyPath.Click += (o, e) => { - Clipboard.SetText(node.Path); + Clipboard.SetDataObject(node.Path, true); e.Handled = true; }; @@ -663,7 +663,7 @@ namespace SourceGit.Views.Widgets { var copyPath = new MenuItem(); copyPath.Header = App.Text("CopyPath"); copyPath.Click += (o, e) => { - Clipboard.SetText(change.Path); + Clipboard.SetDataObject(change.Path, true); e.Handled = true; };