diff --git a/QuickLook.Plugin/QuickLook.Plugin.TextViewer/TextViewerPanel.cs b/QuickLook.Plugin/QuickLook.Plugin.TextViewer/TextViewerPanel.cs index 327bdd2..f139f65 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.TextViewer/TextViewerPanel.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.TextViewer/TextViewerPanel.cs @@ -19,6 +19,7 @@ using System; using System.IO; using System.Text; using System.Threading.Tasks; +using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media; using System.Windows.Threading; @@ -50,6 +51,12 @@ namespace QuickLook.Plugin.TextViewer Options.EnableEmailHyperlinks = false; Options.EnableHyperlinks = false; + ContextMenu = new ContextMenu(); + ContextMenu.Items.Add(new MenuItem + {Header = TranslationHelper.Get("Editor_Copy"), Command = ApplicationCommands.Copy}); + ContextMenu.Items.Add(new MenuItem + {Header = TranslationHelper.Get("Editor_SelectAll"), Command = ApplicationCommands.SelectAll}); + ManipulationInertiaStarting += Viewer_ManipulationInertiaStarting; ManipulationStarting += Viewer_ManipulationStarting; ManipulationDelta += Viewer_ManipulationDelta; @@ -124,7 +131,7 @@ namespace QuickLook.Plugin.TextViewer { Task.Run(() => { - const int maxLength = 50 * 1024 * 1024; + const int maxLength = 5 * 1024 * 1024; var buffer = new MemoryStream(); bool tooLong; @@ -146,7 +153,7 @@ namespace QuickLook.Plugin.TextViewer return; if (tooLong) - _context.Title += " (0 ~ 50MB)"; + _context.Title += " (0 ~ 5MB)"; var bufferCopy = buffer.ToArray(); buffer.Dispose(); diff --git a/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Translations.config b/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Translations.config index 9ec2391..83518cf 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Translations.config +++ b/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Translations.config @@ -9,6 +9,8 @@ Consolas + Copy + Select All Consolas @@ -21,6 +23,8 @@ Consolas,Meiryo UI,MS UI Gothic,MS Gothic + コピー + すべて選択 Consolas,Malgun Gothic,Batang @@ -54,9 +58,13 @@ Consolas,Microsoft Yahei UI,Microsoft Yahei,SimSun + 复制 + 全选 Consolas,Microsoft JhengHei UI,Microsoft JhengHei,MingLiU + 複製 + 全選 Consolas,Mangal,Nirmala UI