From c1da72cc37b3e77acc876d74d375aa5ff1e9df20 Mon Sep 17 00:00:00 2001 From: Alberto Aldegheri Date: Thu, 4 Aug 2022 19:46:52 +0200 Subject: [PATCH] Improve clipboard destination UX - On clipboard notification click, open the editor - When the editor was opened from a clipboard CaptureMode, prompt to copy to clipboard on close - Add hero image to Windows 10 notifications with the screenshot preview --- .../Core/AbstractDestination.cs | 35 +++- src/Greenshot.Base/Interfaces/IDestination.cs | 6 + .../Interfaces/INotificationService.cs | 10 +- .../Interfaces/SurfaceMessageEventArgs.cs | 8 +- .../Interfaces/SurfaceMessageTyp.cs | 2 +- .../Configuration/LanguageKeys.cs | 3 + src/Greenshot.Editor/Drawing/Surface.cs | 2 +- src/Greenshot.Editor/Forms/ImageEditorForm.cs | 19 ++- .../ToastNotificationService.cs | 156 ++++++++++++------ .../Destinations/ClipboardDestination.cs | 15 ++ src/Greenshot/Helpers/CaptureHelper.cs | 49 ++---- .../Helpers/NotifyIconNotificationService.cs | 73 ++++---- src/Greenshot/Languages/language-ar-SY.xml | 2 + src/Greenshot/Languages/language-ca-CA.xml | 2 + src/Greenshot/Languages/language-cs-CZ.xml | 2 + src/Greenshot/Languages/language-da-DK.xml | 2 + src/Greenshot/Languages/language-de-DE.xml | 2 + .../Languages/language-de-x-franconia.xml | 2 + src/Greenshot/Languages/language-el-GR.xml | 2 + src/Greenshot/Languages/language-en-US.xml | 2 + src/Greenshot/Languages/language-es-ES.xml | 2 + src/Greenshot/Languages/language-et-EE.xml | 2 + src/Greenshot/Languages/language-fa-IR.xml | 2 + src/Greenshot/Languages/language-fi-FI.xml | 2 + src/Greenshot/Languages/language-fr-FR.xml | 2 + src/Greenshot/Languages/language-fr-QC.xml | 2 + src/Greenshot/Languages/language-he-IL.xml | 2 + src/Greenshot/Languages/language-hu-HU.xml | 2 + src/Greenshot/Languages/language-id-ID.xml | 2 + src/Greenshot/Languages/language-it-IT.xml | 2 + src/Greenshot/Languages/language-ja-JP.xml | 2 + src/Greenshot/Languages/language-kab-DZ.xml | 2 + src/Greenshot/Languages/language-ko-KR.xml | 2 + src/Greenshot/Languages/language-lt-LT.xml | 2 + src/Greenshot/Languages/language-lv-LV.xml | 2 + src/Greenshot/Languages/language-nl-NL.xml | 2 + src/Greenshot/Languages/language-nn-NO.xml | 2 + src/Greenshot/Languages/language-pl-PL.xml | 2 + src/Greenshot/Languages/language-pt-BR.xml | 2 + src/Greenshot/Languages/language-pt-PT.xml | 2 + src/Greenshot/Languages/language-ro-RO.xml | 2 + src/Greenshot/Languages/language-ru-RU.xml | 2 + src/Greenshot/Languages/language-sk-SK.xml | 2 + src/Greenshot/Languages/language-sl-SI.xml | 2 + src/Greenshot/Languages/language-sr-RS.xml | 2 + src/Greenshot/Languages/language-sv-SE.xml | 2 + src/Greenshot/Languages/language-tr-TR.xml | 2 + src/Greenshot/Languages/language-uk-UA.xml | 2 + src/Greenshot/Languages/language-vi-VN.xml | 2 + src/Greenshot/Languages/language-zh-CN.xml | 2 + src/Greenshot/Languages/language-zh-TW.xml | 2 + 51 files changed, 331 insertions(+), 125 deletions(-) diff --git a/src/Greenshot.Base/Core/AbstractDestination.cs b/src/Greenshot.Base/Core/AbstractDestination.cs index c76574bab..33f03ccd2 100644 --- a/src/Greenshot.Base/Core/AbstractDestination.cs +++ b/src/Greenshot.Base/Core/AbstractDestination.cs @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Drawing; using System.Threading; using System.Windows.Forms; @@ -104,6 +105,38 @@ namespace Greenshot.Base.Core public abstract ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails); + /// + /// If a balloon tip is show for a taken capture, this handles the click on it + /// + /// SurfaceMessageEventArgs + public virtual void OnExportedNotificationClick(SurfaceMessageEventArgs e) + { + Log.Info(Designation + " Notification Clicked!"); + + var notifyIcon = SimpleServiceProvider.Current.GetInstance(); + if (notifyIcon.Tag is not SurfaceMessageEventArgs eventArgs) + { + Log.Warn("OpenCaptureOnClick called without SurfaceMessageEventArgs"); + return; + } + + var surface = eventArgs.Surface; + if (surface != null) + { + switch (eventArgs.MessageType) + { + case SurfaceMessageTyp.FileSaved: + ExplorerHelper.OpenInExplorer(surface.LastSaveFullPath); + break; + case SurfaceMessageTyp.UploadedUri: + Process.Start(surface.UploadUrl); + break; + } + } + + Log.DebugFormat("Deregistering the BalloonTipClicked"); + } + /// /// A small helper method to perform some default destination actions, like inform the surface of the export /// @@ -125,7 +158,7 @@ namespace Greenshot.Base.Core } else { - surface.SendMessageEvent(this, SurfaceMessageTyp.Info, Language.GetFormattedString("exported_to", exportInformation.DestinationDescription)); + surface.SendMessageEvent(this, SurfaceMessageTyp.Exported, Language.GetFormattedString("exported_to", exportInformation.DestinationDescription)); } surface.Modified = false; diff --git a/src/Greenshot.Base/Interfaces/IDestination.cs b/src/Greenshot.Base/Interfaces/IDestination.cs index bfb520c1e..e8604ddbc 100644 --- a/src/Greenshot.Base/Interfaces/IDestination.cs +++ b/src/Greenshot.Base/Interfaces/IDestination.cs @@ -127,5 +127,11 @@ namespace Greenshot.Base.Interfaces /// /// DestinationExportInformation with information, like if the destination has "exported" the capture ExportInformation ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails); + + /// + /// Executed when the user clicks on the exported notification + /// + /// Notification event args. may be disposed. + void OnExportedNotificationClick(SurfaceMessageEventArgs e); } } \ No newline at end of file diff --git a/src/Greenshot.Base/Interfaces/INotificationService.cs b/src/Greenshot.Base/Interfaces/INotificationService.cs index c58cf41b5..7238e6b95 100644 --- a/src/Greenshot.Base/Interfaces/INotificationService.cs +++ b/src/Greenshot.Base/Interfaces/INotificationService.cs @@ -20,6 +20,7 @@ */ using System; +using System.Drawing; namespace Greenshot.Base.Interfaces { @@ -35,7 +36,8 @@ namespace Greenshot.Base.Interfaces /// TimeSpan /// Action called if the user clicks the notification /// Action - void ShowWarningMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null); + /// Optional hero image (used only when supported by notification system) + void ShowWarningMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null, Image heroImage = null); /// /// This will show an error message to the user @@ -44,7 +46,8 @@ namespace Greenshot.Base.Interfaces /// TimeSpan /// Action called if the user clicks the notification /// Action - void ShowErrorMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null); + /// Optional hero image (used only when supported by notification system) + void ShowErrorMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null, Image heroImage = null); /// /// This will show an info message to the user @@ -53,6 +56,7 @@ namespace Greenshot.Base.Interfaces /// TimeSpan /// Action called if the user clicks the notification /// Action - void ShowInfoMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null); + /// Optional hero image (used only when supported by notification system) + void ShowInfoMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null, Image heroImage = null); } } \ No newline at end of file diff --git a/src/Greenshot.Base/Interfaces/SurfaceMessageEventArgs.cs b/src/Greenshot.Base/Interfaces/SurfaceMessageEventArgs.cs index 9e7340316..e1ef4e7c5 100644 --- a/src/Greenshot.Base/Interfaces/SurfaceMessageEventArgs.cs +++ b/src/Greenshot.Base/Interfaces/SurfaceMessageEventArgs.cs @@ -20,13 +20,19 @@ */ using System; +using System.Drawing; namespace Greenshot.Base.Interfaces { - public class SurfaceMessageEventArgs : EventArgs + public sealed class SurfaceMessageEventArgs : EventArgs, IDisposable { + public Image Image { get; set; } public SurfaceMessageTyp MessageType { get; set; } public string Message { get; set; } public ISurface Surface { get; set; } + public void Dispose() + { + Image.Dispose(); + } } } \ No newline at end of file diff --git a/src/Greenshot.Base/Interfaces/SurfaceMessageTyp.cs b/src/Greenshot.Base/Interfaces/SurfaceMessageTyp.cs index d87f60c06..4c5273de4 100644 --- a/src/Greenshot.Base/Interfaces/SurfaceMessageTyp.cs +++ b/src/Greenshot.Base/Interfaces/SurfaceMessageTyp.cs @@ -25,7 +25,7 @@ namespace Greenshot.Base.Interfaces { FileSaved, Error, - Info, + Exported, UploadedUri } } \ No newline at end of file diff --git a/src/Greenshot.Editor/Configuration/LanguageKeys.cs b/src/Greenshot.Editor/Configuration/LanguageKeys.cs index b1f410e66..99f49d22e 100644 --- a/src/Greenshot.Editor/Configuration/LanguageKeys.cs +++ b/src/Greenshot.Editor/Configuration/LanguageKeys.cs @@ -37,6 +37,9 @@ namespace Greenshot.Editor.Configuration editor_clipboardfailed, editor_close_on_save, editor_close_on_save_title, + editor_close_on_clipboard, + editor_close_on_clipboard_title, + editor_copyimagetoclipboard, editor_copytoclipboard, editor_cuttoclipboard, editor_deleteelement, diff --git a/src/Greenshot.Editor/Drawing/Surface.cs b/src/Greenshot.Editor/Drawing/Surface.cs index f050374a6..bbf0c89ee 100644 --- a/src/Greenshot.Editor/Drawing/Surface.cs +++ b/src/Greenshot.Editor/Drawing/Surface.cs @@ -1134,9 +1134,9 @@ namespace Greenshot.Editor.Drawing public void SendMessageEvent(object source, SurfaceMessageTyp messageType, string message) { if (_surfaceMessage == null) return; - var eventArgs = new SurfaceMessageEventArgs { + Image = GetImageForExport(), Message = message, MessageType = messageType, Surface = this diff --git a/src/Greenshot.Editor/Forms/ImageEditorForm.cs b/src/Greenshot.Editor/Forms/ImageEditorForm.cs index 87c3813c7..5d21dc682 100644 --- a/src/Greenshot.Editor/Forms/ImageEditorForm.cs +++ b/src/Greenshot.Editor/Forms/ImageEditorForm.cs @@ -935,6 +935,8 @@ namespace Greenshot.Editor.Forms // Make sure the editor is visible WindowDetails.ToForeground(Handle); + bool saveToClipboard = _surface.CaptureDetails.CaptureMode == CaptureMode.Clipboard; + MessageBoxButtons buttons = MessageBoxButtons.YesNoCancel; // Dissallow "CANCEL" if the application needs to shutdown if (e.CloseReason == CloseReason.ApplicationExitCall || e.CloseReason == CloseReason.WindowsShutDown || e.CloseReason == CloseReason.TaskManagerClosing) @@ -942,8 +944,12 @@ namespace Greenshot.Editor.Forms buttons = MessageBoxButtons.YesNo; } - DialogResult result = MessageBox.Show(Language.GetString(LangKey.editor_close_on_save), Language.GetString(LangKey.editor_close_on_save_title), buttons, + DialogResult result = MessageBox.Show( + Language.GetString(saveToClipboard ? LangKey.editor_close_on_clipboard : LangKey.editor_close_on_save), + Language.GetString(saveToClipboard ? LangKey.editor_close_on_clipboard_title : LangKey.editor_close_on_save_title), + buttons, MessageBoxIcon.Question); + if (result.Equals(DialogResult.Cancel)) { e.Cancel = true; @@ -952,7 +958,16 @@ namespace Greenshot.Editor.Forms if (result.Equals(DialogResult.Yes)) { - BtnSaveClick(sender, e); + // If the user choose the clipboard as destination, just keep it also on close + if (saveToClipboard) + { + BtnClipboardClick(sender, e); + } + else + { + BtnSaveClick(sender, e); + } + // Check if the save was made, if not it was cancelled so we cancel the closing if (_surface.Modified) { diff --git a/src/Greenshot.Plugin.Win10/ToastNotificationService.cs b/src/Greenshot.Plugin.Win10/ToastNotificationService.cs index b9120fee7..e5b440171 100644 --- a/src/Greenshot.Plugin.Win10/ToastNotificationService.cs +++ b/src/Greenshot.Plugin.Win10/ToastNotificationService.cs @@ -20,8 +20,10 @@ */ using System; +using System.Drawing; using System.Drawing.Imaging; using System.IO; +using System.Threading; using Windows.Foundation.Collections; using Windows.Foundation.Metadata; using Windows.UI.Notifications; @@ -41,7 +43,11 @@ namespace Greenshot.Plugin.Win10 private static readonly ILog Log = LogManager.GetLogger(typeof(ToastNotificationService)); private static readonly CoreConfiguration CoreConfiguration = IniConfig.GetIniSection(); + private const string _heroImageFilePrefix = "hero-"; private readonly string _imageFilePath; + private readonly string _localAppData; + private readonly ToastNotifierCompat _toastNotifier; + private readonly SynchronizationContext _mainSynchronizationContext; public ToastNotificationService() { @@ -62,13 +68,21 @@ namespace Greenshot.Plugin.Win10 Log.Info("Toast activated. Args: " + toastArgs.Argument); }; - var localAppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Greenshot"); - if (!Directory.Exists(localAppData)) + _toastNotifier = ToastNotificationManagerCompat.CreateToastNotifier(); + _mainSynchronizationContext = SynchronizationContext.Current; + _localAppData = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Greenshot"); + if (!Directory.Exists(_localAppData)) { - Directory.CreateDirectory(localAppData); + Directory.CreateDirectory(_localAppData); + } + + // Cleanup old hero images cache + foreach (var heroImagePath in Directory.EnumerateFiles(_localAppData, $"{_heroImageFilePrefix}*", SearchOption.TopDirectoryOnly)) + { + File.Delete(heroImagePath); } - _imageFilePath = Path.Combine(localAppData, "greenshot.png"); + _imageFilePath = Path.Combine(_localAppData, "greenshot.png"); if (File.Exists(_imageFilePath)) { @@ -86,7 +100,8 @@ namespace Greenshot.Plugin.Win10 /// TimeSpan until the toast timeouts /// Action called when clicked /// Action called when the toast is closed - private void ShowMessage(string message, TimeSpan? timeout = default, Action onClickAction = null, Action onClosedAction = null) + /// + private void ShowMessage(string message, TimeSpan? timeout = default, Action onClickAction = null, Action onClosedAction = null, Image heroImage = null) { // Do not inform the user if this is disabled if (!CoreConfiguration.ShowTrayNotification) @@ -114,34 +129,57 @@ namespace Greenshot.Plugin.Win10 try { // Generate the toast and send it off - new ToastContentBuilder() + var toastBuilder = new ToastContentBuilder(); + var heroImagePath = Path.Combine(_localAppData, $"{_heroImageFilePrefix}{Guid.NewGuid()}.jpeg"); + var heroImageUri = new Uri(heroImagePath).AbsoluteUri; + + toastBuilder .AddArgument("ToastID", 100) - // Inline image - .AddText(message) + .AddText(message); // Profile (app logo override) image //.AddAppLogoOverride(new Uri($@"file://{_imageFilePath}"), ToastGenericAppLogoCrop.None) - .Show(toast => + + if (heroImage != null) + { + heroImage = heroImage.GetThumbnailImage(364, 180, () => false, IntPtr.Zero); + + using var fileStream = new FileStream(heroImagePath, FileMode.CreateNew); + heroImage.Save(fileStream, ImageFormat.Jpeg); + toastBuilder.AddHeroImage(new Uri(heroImageUri, UriKind.Absolute)); + } + + toastBuilder.Show(toast => { - // Windows 10 first with 1903: ExpiresOnReboot = true - toast.ExpirationTime = timeout.HasValue ? DateTimeOffset.Now.Add(timeout.Value) : (DateTimeOffset?)null; + void DisposeNotification() + { + if (onClickAction != null) + { + toast.Activated -= ToastActivatedHandler; + } + + toast.Dismissed -= ToastDismissedHandler; + toast.Failed -= ToastOnFailed; + + if (heroImage != null) + { + File.Delete(heroImagePath); + } + } + + // Windows 10 first with 1903: ExpiresOnReboot = true + toast.ExpirationTime = timeout.HasValue ? DateTimeOffset.Now.Add(timeout.Value) : null; + + void ToastOnFailed(ToastNotification toastNotification, ToastFailedEventArgs args) + { + DisposeNotification(); + Log.WarnFormat("Failed to display a toast due to {0}", args.ErrorCode); + Log.Debug(toastNotification.Content.GetXml()); + } void ToastActivatedHandler(ToastNotification toastNotification, object sender) { - try - { - onClickAction?.Invoke(); - } - catch (Exception ex) - { - Log.Warn("Exception while handling the onclick action: ", ex); - } - - toast.Activated -= ToastActivatedHandler; - } - - if (onClickAction != null) - { - toast.Activated += ToastActivatedHandler; + DisposeNotification(); + InvokeAction(onClickAction); } void ToastDismissedHandler(ToastNotification toastNotification, ToastDismissedEventArgs eventArgs) @@ -152,25 +190,22 @@ namespace Greenshot.Plugin.Win10 return; } - try - { - onClosedAction?.Invoke(); - } - catch (Exception ex) - { - Log.Warn("Exception while handling the onClosed action: ", ex); - } + DisposeNotification(); + + // Windows lets you Dismiss the notification two time, this is really odd + // So we need to force the removal of the notification + _mainSynchronizationContext.Post(ForceCloseNotification, toastNotification); - toast.Dismissed -= ToastDismissedHandler; - // Remove the other handler too - toast.Activated -= ToastActivatedHandler; - toast.Failed -= ToastOnFailed; + InvokeAction(onClosedAction); } + if (onClickAction != null) + { + toast.Activated += ToastActivatedHandler; + } toast.Dismissed += ToastDismissedHandler; toast.Failed += ToastOnFailed; }); - } catch (Exception ex) { @@ -178,25 +213,19 @@ namespace Greenshot.Plugin.Win10 } } - private void ToastOnFailed(ToastNotification sender, ToastFailedEventArgs args) + public void ShowWarningMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null, Image heroImage = null) { - Log.WarnFormat("Failed to display a toast due to {0}", args.ErrorCode); - Log.Debug(sender.Content.GetXml()); + ShowMessage(message, timeout, onClickAction, onClosedAction, heroImage); } - public void ShowWarningMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null) + public void ShowErrorMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null, Image heroImage = null) { - ShowMessage(message, timeout, onClickAction, onClosedAction); + ShowMessage(message, timeout, onClickAction, onClosedAction, heroImage); } - public void ShowErrorMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null) + public void ShowInfoMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null, Image heroImage = null) { - ShowMessage(message, timeout, onClickAction, onClosedAction); - } - - public void ShowInfoMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null) - { - ShowMessage(message, timeout, onClickAction, onClosedAction); + ShowMessage(message, timeout, onClickAction, onClosedAction, heroImage); } /// @@ -214,5 +243,30 @@ namespace Greenshot.Plugin.Win10 return null; } + + private void ForceCloseNotification(object state) + { + _toastNotifier.Hide((ToastNotification)state); + } + + private void InvokeAction(Action action) + { + if (action != null) + { + _mainSynchronizationContext.Post(InternalInvokeAction, action); + } + } + + private void InternalInvokeAction(object state) + { + try + { + ((Action)state).Invoke(); + } + catch (Exception ex) + { + Log.Warn("Exception while handling the onClosed action: ", ex); + } + } } } \ No newline at end of file diff --git a/src/Greenshot/Destinations/ClipboardDestination.cs b/src/Greenshot/Destinations/ClipboardDestination.cs index 7093e43ec..41722b231 100644 --- a/src/Greenshot/Destinations/ClipboardDestination.cs +++ b/src/Greenshot/Destinations/ClipboardDestination.cs @@ -26,6 +26,9 @@ using Greenshot.Base; using Greenshot.Base.Core; using Greenshot.Base.Interfaces; using Greenshot.Configuration; +using Greenshot.Editor.Destinations; +using Greenshot.Editor.Drawing; +using log4net; namespace Greenshot.Destinations { @@ -34,6 +37,8 @@ namespace Greenshot.Destinations /// public class ClipboardDestination : AbstractDestination { + private static readonly ILog Log = LogManager.GetLogger(typeof(ClipboardDestination)); + public override string Designation => nameof(WellKnownDestinations.Clipboard); public override string Description @@ -73,5 +78,15 @@ namespace Greenshot.Destinations ProcessExport(exportInformation, surface); return exportInformation; } + + public override void OnExportedNotificationClick(SurfaceMessageEventArgs e) + { + Log.Info(Designation + " Notification Clicked!"); + + var surface = new Surface((Image)e.Image.Clone()) { CaptureDetails = new CaptureDetails { CaptureMode = CaptureMode.Clipboard } }; + + DestinationHelper.GetDestination(EditorDestination.DESIGNATION) + .ExportCapture(true, surface, new CaptureDetails { CaptureMode = CaptureMode.Clipboard }); + } } } \ No newline at end of file diff --git a/src/Greenshot/Helpers/CaptureHelper.cs b/src/Greenshot/Helpers/CaptureHelper.cs index e51b51ebe..3a5c3a1ae 100644 --- a/src/Greenshot/Helpers/CaptureHelper.cs +++ b/src/Greenshot/Helpers/CaptureHelper.cs @@ -611,36 +611,6 @@ namespace Greenshot.Helpers } } - /// - /// If a balloon tip is show for a taken capture, this handles the click on it - /// - /// SurfaceMessageEventArgs - private void OpenCaptureOnClick(SurfaceMessageEventArgs e) - { - var notifyIcon = SimpleServiceProvider.Current.GetInstance(); - if (notifyIcon.Tag is not SurfaceMessageEventArgs eventArgs) - { - Log.Warn("OpenCaptureOnClick called without SurfaceMessageEventArgs"); - return; - } - - ISurface surface = eventArgs.Surface; - if (surface != null) - { - switch (eventArgs.MessageType) - { - case SurfaceMessageTyp.FileSaved: - ExplorerHelper.OpenInExplorer(surface.LastSaveFullPath); - break; - case SurfaceMessageTyp.UploadedUri: - Process.Start(surface.UploadUrl); - break; - } - } - - Log.DebugFormat("Deregistering the BalloonTipClicked"); - } - /// /// This is the SurfaceMessageEvent receiver /// @@ -653,19 +623,26 @@ namespace Greenshot.Helpers return; } + var destination = (IDestination)sender; var notifyIconClassicMessageHandler = SimpleServiceProvider.Current.GetInstance(); switch (eventArgs.MessageType) { case SurfaceMessageTyp.Error: notifyIconClassicMessageHandler.ShowErrorMessage(eventArgs.Message, TimeSpan.FromHours(1)); + eventArgs.Dispose(); break; - case SurfaceMessageTyp.Info: - notifyIconClassicMessageHandler.ShowInfoMessage(eventArgs.Message, TimeSpan.FromHours(1), () => { Log.Info("Clicked!"); }); - break; - case SurfaceMessageTyp.FileSaved: - case SurfaceMessageTyp.UploadedUri: + default: // Show a balloon and register an event handler to open the "capture" for if someone clicks the balloon. - notifyIconClassicMessageHandler.ShowInfoMessage(eventArgs.Message, TimeSpan.FromHours(1), () => OpenCaptureOnClick(eventArgs)); + notifyIconClassicMessageHandler.ShowInfoMessage( + eventArgs.Message, + TimeSpan.FromHours(1), + () => + { + destination.OnExportedNotificationClick(eventArgs); + eventArgs.Dispose(); + }, + eventArgs.Dispose, + eventArgs.Image); break; } } diff --git a/src/Greenshot/Helpers/NotifyIconNotificationService.cs b/src/Greenshot/Helpers/NotifyIconNotificationService.cs index 707ebb411..256e98256 100644 --- a/src/Greenshot/Helpers/NotifyIconNotificationService.cs +++ b/src/Greenshot/Helpers/NotifyIconNotificationService.cs @@ -20,6 +20,8 @@ */ using System; +using System.Drawing; +using System.Threading; using System.Windows.Forms; using Greenshot.Base.Core; using Greenshot.Base.IniFile; @@ -36,10 +38,12 @@ namespace Greenshot.Helpers private static readonly ILog Log = LogManager.GetLogger(typeof(NotifyIconNotificationService)); private static readonly CoreConfiguration CoreConfiguration = IniConfig.GetIniSection(); private readonly NotifyIcon _notifyIcon; + private readonly SynchronizationContext _mainSynchronizationContext; public NotifyIconNotificationService() { _notifyIcon = SimpleServiceProvider.Current.GetInstance(); + _mainSynchronizationContext = SynchronizationContext.Current; } /// @@ -49,7 +53,7 @@ namespace Greenshot.Helpers /// TimeSpan /// Action called if the user clicks the notification /// Action - public void ShowWarningMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null) + public void ShowWarningMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null, Image heroImage = null) { ShowMessage(message, timeout, ToolTipIcon.Warning, onClickAction, onClosedAction); } @@ -61,7 +65,7 @@ namespace Greenshot.Helpers /// TimeSpan /// Action called if the user clicks the notification /// Action - public void ShowErrorMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null) + public void ShowErrorMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null, Image heroImage = null) { ShowMessage(message, timeout, ToolTipIcon.Error, onClickAction, onClosedAction); } @@ -73,7 +77,7 @@ namespace Greenshot.Helpers /// TimeSpan /// Action called if the user clicks the notification /// Action - public void ShowInfoMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null) + public void ShowInfoMessage(string message, TimeSpan? timeout = null, Action onClickAction = null, Action onClosedAction = null, Image heroImage = null) { ShowMessage(message, timeout, ToolTipIcon.Info, onClickAction, onClosedAction); } @@ -94,43 +98,54 @@ namespace Greenshot.Helpers return; } + void DisposeBalloon() + { + _notifyIcon.BalloonTipClosed -= BalloonClosedHandler; + if (onClickAction != null) + { + _notifyIcon.BalloonTipClicked -= BalloonClickedHandler; + } + } + void BalloonClickedHandler(object s, EventArgs e) { - try - { - onClickAction?.Invoke(); - } - catch (Exception ex) - { - Log.Warn("Exception while handling the onclick action: ", ex); - } + DisposeBalloon(); + InvokeAction(onClickAction); + } - _notifyIcon.BalloonTipClicked -= BalloonClickedHandler; + void BalloonClosedHandler(object s, EventArgs e) + { + DisposeBalloon(); + InvokeAction(onClosedAction); } if (onClickAction != null) { _notifyIcon.BalloonTipClicked += BalloonClickedHandler; } - - void BalloonClosedHandler(object s, EventArgs e) - { - try - { - onClosedAction?.Invoke(); - } - catch (Exception ex) - { - Log.Warn("Exception while handling the onClosed action: ", ex); - } - - _notifyIcon.BalloonTipClosed -= BalloonClosedHandler; - // Remove the other handler too - _notifyIcon.BalloonTipClicked -= BalloonClickedHandler; - } - _notifyIcon.BalloonTipClosed += BalloonClosedHandler; + _notifyIcon.ShowBalloonTip(timeout.HasValue ? (int) timeout.Value.TotalMilliseconds : 5000, @"Greenshot", message, level); } + + private void InvokeAction(Action action) + { + if (action != null) + { + _mainSynchronizationContext.Post(InternalInvokeAction, action); + } + } + + private void InternalInvokeAction(object state) + { + try + { + ((Action)state).Invoke(); + } + catch (Exception ex) + { + Log.Warn("Exception while handling the onClosed action: ", ex); + } + } } } \ No newline at end of file diff --git a/src/Greenshot/Languages/language-ar-SY.xml b/src/Greenshot/Languages/language-ar-SY.xml index a7363a326..3ba7ede20 100644 --- a/src/Greenshot/Languages/language-ar-SY.xml +++ b/src/Greenshot/Languages/language-ar-SY.xml @@ -57,6 +57,8 @@ اغلق هل تريد حفظ اللقطة? حفظ الصورة? + هل تريد نسخ الصورة إلى الحافظة؟ + نسخ الصورة إلى الحافظة؟ تأكيد انسخ الصورة للذاكرة انسخ المسار الي الذاكرة diff --git a/src/Greenshot/Languages/language-ca-CA.xml b/src/Greenshot/Languages/language-ca-CA.xml index 423c55006..b076be473 100644 --- a/src/Greenshot/Languages/language-ca-CA.xml +++ b/src/Greenshot/Languages/language-ca-CA.xml @@ -87,6 +87,8 @@ Abans de crear un nou informe d'error, us agrairem que comproveu que l'error no Tanca Voleu desar la captura? Voleu desar la imatge? + Voleu copiar la imatge al porta-retalls? + Voleu copiar la imatge al porta-retalls? Confirma Copia la imatge al porta-retalls Copia el camí al porta-retalls diff --git a/src/Greenshot/Languages/language-cs-CZ.xml b/src/Greenshot/Languages/language-cs-CZ.xml index 86d7f2207..79c73fb91 100644 --- a/src/Greenshot/Languages/language-cs-CZ.xml +++ b/src/Greenshot/Languages/language-cs-CZ.xml @@ -88,6 +88,8 @@ Také bychom velmi ocenili, kdybyste zkontrolovali, zda tato chyba již není ev Zavřít Chcete uložit snímek? Uložit snímek? + Chcete obrázek zkopírovat do schránky? + Kopírovat obrázek do schránky? Potvrdit Kopírovat obrázek do schránky Kopírovat cestu do schránky diff --git a/src/Greenshot/Languages/language-da-DK.xml b/src/Greenshot/Languages/language-da-DK.xml index b032e8aff..66386eb03 100644 --- a/src/Greenshot/Languages/language-da-DK.xml +++ b/src/Greenshot/Languages/language-da-DK.xml @@ -502,6 +502,8 @@ tidspunktet, fx 11_58_32 (plus filendelsen angivet i indstillingerne). Gem billede? + Vil du kopiere billedet til udklipsholderen? + Vil du kopiere billedet til udklipsholderen? Brug interaktiv vinduesklip-tilstand diff --git a/src/Greenshot/Languages/language-de-DE.xml b/src/Greenshot/Languages/language-de-DE.xml index a50ad0119..8cd205c27 100644 --- a/src/Greenshot/Languages/language-de-DE.xml +++ b/src/Greenshot/Languages/language-de-DE.xml @@ -88,6 +88,8 @@ schnell zu finden. Vielen Dank :) Schließen Möchten Sie den Screenshot speichern? Bild speichern? + Möchten Sie das Bild in die Zwischenablage kopieren? + Bild in die Zwischenablage kopieren? Bestätigen Grafik in die Zwischenablage kopieren Pfad in Zwischenablage kopieren diff --git a/src/Greenshot/Languages/language-de-x-franconia.xml b/src/Greenshot/Languages/language-de-x-franconia.xml index 34da6f0b7..39434d150 100644 --- a/src/Greenshot/Languages/language-de-x-franconia.xml +++ b/src/Greenshot/Languages/language-de-x-franconia.xml @@ -83,6 +83,8 @@ Dangschee, wassd scho :) Wech! Moggsd dei Gschmarri ned schbeichern? Bild schbeichern? + Möchten Sie das Bild in die Zwischenablage kopieren? + Bild in die Zwischenablage kopieren? Fei wärgli! Grafig in däi Zwischnblach nei Bfad in däi Zwischnblach nei diff --git a/src/Greenshot/Languages/language-el-GR.xml b/src/Greenshot/Languages/language-el-GR.xml index 1feb74b51..77a6c9874 100644 --- a/src/Greenshot/Languages/language-el-GR.xml +++ b/src/Greenshot/Languages/language-el-GR.xml @@ -88,6 +88,8 @@ Κλείσιμο Θέλετε να αποθηκεύσετε το στιγμιότυπο οθόνης; Αποθήκευση εικόνας; + Θέλετε να αντιγράψετε την εικόνα στο πρόχειρο; + Αντιγραφή εικόνας στο πρόχειρο; Επιβεβαίωση Αντιγραφή εικόνας στο πρόχειρο Αντιγραφή της θέσης του αρχείου στο πρόχειρο diff --git a/src/Greenshot/Languages/language-en-US.xml b/src/Greenshot/Languages/language-en-US.xml index 5cac2280d..d0d91ebf3 100644 --- a/src/Greenshot/Languages/language-en-US.xml +++ b/src/Greenshot/Languages/language-en-US.xml @@ -89,6 +89,8 @@ Also, we would highly appreciate if you checked whether a tracker item already e Close Do you want to save the screenshot? Save image? + Do you want to copy the image to the clipboard? + Copy image to clipboard? Confirm Copy image to clipboard Copy path to clipboard diff --git a/src/Greenshot/Languages/language-es-ES.xml b/src/Greenshot/Languages/language-es-ES.xml index 0badf64a4..47d38cc89 100644 --- a/src/Greenshot/Languages/language-es-ES.xml +++ b/src/Greenshot/Languages/language-es-ES.xml @@ -75,6 +75,8 @@ Antes de crear un nuevo informe de error, te agradeceríamos que comprobaras que Cerrar ¿Guardar la captura? ¿Guardar imagen? + ¿Quieres copiar la imagen al portapapeles? + ¿Copiar imagen al portapapeles? Confirmar Copiar imagen al portapapeles Copiar ruta al portapapeles diff --git a/src/Greenshot/Languages/language-et-EE.xml b/src/Greenshot/Languages/language-et-EE.xml index 7a4b0dcc3..4b387eb4f 100644 --- a/src/Greenshot/Languages/language-et-EE.xml +++ b/src/Greenshot/Languages/language-et-EE.xml @@ -87,6 +87,8 @@ Me oleksime väga tänulik, kui te enne kontrolliksite, ega sellest veast pole j Sulge Kas te tahate salvestada kuvatõmmist? Salvestage pilt? + Kas soovite pildi lõikelauale kopeerida? + Kas kopeerida pilt lõikelauale? Kinnitan Kopeerige pilt lõikelauale Kopeerige asukoht lõikelauale diff --git a/src/Greenshot/Languages/language-fa-IR.xml b/src/Greenshot/Languages/language-fa-IR.xml index 2ab2c8242..7e95453fa 100644 --- a/src/Greenshot/Languages/language-fa-IR.xml +++ b/src/Greenshot/Languages/language-fa-IR.xml @@ -61,6 +61,8 @@ Could not save Greenshot's configuration file. Please check access permissions f ببند تصویر ذخیره شود؟ تصویر ذخیره شود؟ + آیا می خواهید تصویر را در کلیپ بورد کپی کنید؟ + تصویر در کلیپ بورد کپی شود؟ تایید ذخیره سازی در حافظه موقت ذخیره مسیر در حافظه موقت diff --git a/src/Greenshot/Languages/language-fi-FI.xml b/src/Greenshot/Languages/language-fi-FI.xml index a2f211b03..d13c1a4c7 100644 --- a/src/Greenshot/Languages/language-fi-FI.xml +++ b/src/Greenshot/Languages/language-fi-FI.xml @@ -57,6 +57,8 @@ Olisi myös hyvä jos voisit tarkistaa onko virhe jo raportoitu aikaisemmin (voi Sulje Tallennetaanko kuva? Tallennetaanko? + Haluatko kopioida kuvan leikepöydälle? + Kopioidaanko kuva leikepöydälle? Hyväksy Kopioi kuva leikepöydälle Kopioi tiedostopolku leikepöydälle diff --git a/src/Greenshot/Languages/language-fr-FR.xml b/src/Greenshot/Languages/language-fr-FR.xml index 50cde5788..1991fe695 100644 --- a/src/Greenshot/Languages/language-fr-FR.xml +++ b/src/Greenshot/Languages/language-fr-FR.xml @@ -87,6 +87,8 @@ De plus, nous apprécierions beaucoup que vous preniez la peine de vérifier si Fermer Voulez-vous enregistrer la capture d'écran ? Enregistrer l'image ? + Voulez-vous copier l'image dans le presse-papier ? + Copier l'image dans le presse-papier ? Confirmer Copier l'image vers le presse-papier Copier le chemin vers le presse-papier diff --git a/src/Greenshot/Languages/language-fr-QC.xml b/src/Greenshot/Languages/language-fr-QC.xml index cf822fa16..75ffc9652 100644 --- a/src/Greenshot/Languages/language-fr-QC.xml +++ b/src/Greenshot/Languages/language-fr-QC.xml @@ -73,6 +73,8 @@ De plus, nous apprécierions beaucoup que vous preniez la peine de vérifier si Fermer Voulez-vous sauvegarder la capture d'écran ? Sauvegarder l'image ? + Voulez-vous copier l'image dans le presse-papier ? + Copier l'image dans le presse-papier ? Confirmer Copier l'image vers le presse-papier Copier le chemin vers le presse-papier diff --git a/src/Greenshot/Languages/language-he-IL.xml b/src/Greenshot/Languages/language-he-IL.xml index 537f77067..1eb19240d 100644 --- a/src/Greenshot/Languages/language-he-IL.xml +++ b/src/Greenshot/Languages/language-he-IL.xml @@ -58,6 +58,8 @@ Details about the GNU General Public License: סגור ? האם ברצונך לשמור את תמונת הלכידה ? שמור תמונה + האם ברצונך להעתיק את התמונה ללוח? + להעתיק תמונה ללוח? אישור העתקת תמונה אל הלוח העתק נתיב אל הלוח diff --git a/src/Greenshot/Languages/language-hu-HU.xml b/src/Greenshot/Languages/language-hu-HU.xml index 20035f3c5..2a596100b 100644 --- a/src/Greenshot/Languages/language-hu-HU.xml +++ b/src/Greenshot/Languages/language-hu-HU.xml @@ -58,6 +58,8 @@ Kérjük adjon összefoglaló leírást és csatoljon minden olyan információt Bezárni Szeretné menteni a képernyőképet? Menti a képet? + A vágólapra szeretné másolni a képet? + Másolja a képet a vágólapra? Alkalmaz A kép másolása a vágólapra Másolja a vágólapra diff --git a/src/Greenshot/Languages/language-id-ID.xml b/src/Greenshot/Languages/language-id-ID.xml index df31cd624..b8596993e 100644 --- a/src/Greenshot/Languages/language-id-ID.xml +++ b/src/Greenshot/Languages/language-id-ID.xml @@ -87,6 +87,8 @@ Juga, kami sangat terbantu apabila anda mengecek laporan lain yang sama dengan k Tutup Apakah anda ingin menyimpan layar yang tertangkap? Simpan gambar? + Apakah Anda ingin menyalin gambar ke papan klip? + Salin gambar ke papan klip? Konfirmasi Kopi gambar ke papan klip Kopi jalur ke papan klip diff --git a/src/Greenshot/Languages/language-it-IT.xml b/src/Greenshot/Languages/language-it-IT.xml index b0cb0e96f..9b8730db7 100644 --- a/src/Greenshot/Languages/language-it-IT.xml +++ b/src/Greenshot/Languages/language-it-IT.xml @@ -93,6 +93,8 @@ Controlla i permessi di accesso per '{0}'. Chiudi Vuoi salvare l'immagine? Vuoi salvare l'immagine? + Vuoi copiare l'immagine negli appunti? + Vuoi copiare l'immagine negli appunti? Conferma Copia immagine negli Appunti Copia percorso negli appunti diff --git a/src/Greenshot/Languages/language-ja-JP.xml b/src/Greenshot/Languages/language-ja-JP.xml index 03638f0dc..e50bb2e0f 100644 --- a/src/Greenshot/Languages/language-ja-JP.xml +++ b/src/Greenshot/Languages/language-ja-JP.xml @@ -86,6 +86,8 @@ Greenshot には一切の保障がありません。GNU General Public License 閉じる スクリーンショットを保存しますか? 画像保存の確認 + 画像をクリップボードにコピーしますか? + 画像をクリップボードにコピーしますか? チェック 画像をクリップボードにコピー パスをクリップボードにコピー diff --git a/src/Greenshot/Languages/language-kab-DZ.xml b/src/Greenshot/Languages/language-kab-DZ.xml index e3366a18a..258b7c41f 100644 --- a/src/Greenshot/Languages/language-kab-DZ.xml +++ b/src/Greenshot/Languages/language-kab-DZ.xml @@ -87,6 +87,8 @@ Rnu ɣur-s, nḥemmel aṭas ma yella tesneqdeḍ aneqqis igebren ugur-agi. (Tze Mdel Tebɣiḍ ad teselkseḍ tuṭṭfa n ugdil? Sekles tugna? + Nɣel tugna ɣef afus? + Nɣel tugna ɣef afus? Sentem Nɣel tugna ɣef afus Nɣel abrid ɣef afus diff --git a/src/Greenshot/Languages/language-ko-KR.xml b/src/Greenshot/Languages/language-ko-KR.xml index 0bf90570e..6224eb42a 100644 --- a/src/Greenshot/Languages/language-ko-KR.xml +++ b/src/Greenshot/Languages/language-ko-KR.xml @@ -87,6 +87,8 @@ Also, we would highly appreciate if you checked whether a tracker item already e 닫기 화면 캡처를 저장할까요? 이미지를 저장할까요? + 이미지를 클립보드에 복사하시겠습니까? + 이미지를 클립보드에 복사하시겠습니까? 확인 이미지를 클립보드로 복사 경로를 클립보드로 복사 diff --git a/src/Greenshot/Languages/language-lt-LT.xml b/src/Greenshot/Languages/language-lt-LT.xml index 9b1089811..d2a7a3021 100644 --- a/src/Greenshot/Languages/language-lt-LT.xml +++ b/src/Greenshot/Languages/language-lt-LT.xml @@ -56,6 +56,8 @@ Dėkojame už pagalbą :) Uždaryti Išsaugoti atidarytą nuotrauką? Išsaugoti vaizdą? + Ar norite nukopijuoti vaizdą į mainų sritį? + Kopijuoti vaizdą į mainų sritį? Patvirtinti Patalpinti į iškarpinių podelį Kopijuoti pilną failo vardą diff --git a/src/Greenshot/Languages/language-lv-LV.xml b/src/Greenshot/Languages/language-lv-LV.xml index acbe9eacb..de71e9a2c 100644 --- a/src/Greenshot/Languages/language-lv-LV.xml +++ b/src/Greenshot/Languages/language-lv-LV.xml @@ -87,6 +87,8 @@ Mēs būtu Tev pateicīgi, ja Tu vispirms pārbaudītu, vai kāds cits jau nav z Aizvērt Vai gribi saglabāt ekrānattēlu? Saglabāt attēlu? + Vai vēlaties kopēt attēlu starpliktuvē? + Vai kopēt attēlu starpliktuvē? Apstiprināt Ievit attēlu starpliktuvē Ievietot ceļu starpliktuvē diff --git a/src/Greenshot/Languages/language-nl-NL.xml b/src/Greenshot/Languages/language-nl-NL.xml index 65c008c01..1cb5acaa7 100644 --- a/src/Greenshot/Languages/language-nl-NL.xml +++ b/src/Greenshot/Languages/language-nl-NL.xml @@ -88,6 +88,8 @@ Controleer ook even of dit probleem mogelijk al gemeld is! Gebruik de zoekfuncti Sluiten Wilt u de schermopname opslaan? Afbeelding opslaan? + Wilt u de afbeelding naar het klembord kopiëren? + Afbeelding naar klembord kopiëren? Bevestigen Afbeelding naar klembord kopiëren Locatie naar klembord kopiëren diff --git a/src/Greenshot/Languages/language-nn-NO.xml b/src/Greenshot/Languages/language-nn-NO.xml index edd8f31e7..18183a3b5 100644 --- a/src/Greenshot/Languages/language-nn-NO.xml +++ b/src/Greenshot/Languages/language-nn-NO.xml @@ -75,6 +75,8 @@ Me sett òg pris på om du ved hjelp av søkefunksjonen på sida kan sjekke om d Lukk Vil du lagre skjermbildet? Vil du lagre bildet? + Vil du kopiere bildet til utklippstavlen? + Vil du kopiere bildet til utklippstavlen? Stadfest Kopier bildet til utklyppstavla Kopier filstigen til utklyppstavla diff --git a/src/Greenshot/Languages/language-pl-PL.xml b/src/Greenshot/Languages/language-pl-PL.xml index 7f908dba8..7399fd71a 100644 --- a/src/Greenshot/Languages/language-pl-PL.xml +++ b/src/Greenshot/Languages/language-pl-PL.xml @@ -88,6 +88,8 @@ Będziemy wdzięczni, jeśli najpierw sprawdzisz, czy takie zdarzenie nie zosta Zamknij Czy chcesz zapisać zrzut ekranu? Zapisać obraz? + Czy chcesz skopiować obraz do schowka? + Skopiować obraz do schowka? Zatwierdź Kopiuj obraz do schowka Kopiuj ścieżkę do schowka diff --git a/src/Greenshot/Languages/language-pt-BR.xml b/src/Greenshot/Languages/language-pt-BR.xml index e53603ccc..852509485 100644 --- a/src/Greenshot/Languages/language-pt-BR.xml +++ b/src/Greenshot/Languages/language-pt-BR.xml @@ -84,6 +84,8 @@ Fechar Deseja salvar a imagem capturada? Salvar imagem? + Deseja copiar a imagem para a área de transferência? + Copiar imagem para a área de transferência? Confirmar Copiar imagem para a Área de transferência Copiar o caminho da pasta atual do arquivo para a Área de transferência diff --git a/src/Greenshot/Languages/language-pt-PT.xml b/src/Greenshot/Languages/language-pt-PT.xml index 53a3ea424..4eb8a025e 100644 --- a/src/Greenshot/Languages/language-pt-PT.xml +++ b/src/Greenshot/Languages/language-pt-PT.xml @@ -87,6 +87,8 @@ Também apreciaremos muito se puder verificar se não existe já um relatório d Fechar Deseja guardar a imagem capturada? Guardar imagem? + Deseja copiar a imagem para a área de transferência? + Copiar imagem para a área de transferência? Confirmar Copiar imagem para a Área de transferência Copiar atalho para a Área de transferência diff --git a/src/Greenshot/Languages/language-ro-RO.xml b/src/Greenshot/Languages/language-ro-RO.xml index 02fe86c3f..b2b6abbbc 100644 --- a/src/Greenshot/Languages/language-ro-RO.xml +++ b/src/Greenshot/Languages/language-ro-RO.xml @@ -504,6 +504,8 @@ timpul curent, ex. 11_58_32 (plus extensia fișierului definită în setări) Salvați imaginea? + Doriți să copiați imaginea în clipboard? + Copiați imaginea în clipboard? Folosiți metoda interactivă de captură a ferestrei diff --git a/src/Greenshot/Languages/language-ru-RU.xml b/src/Greenshot/Languages/language-ru-RU.xml index f9973f349..9bedb9d4c 100644 --- a/src/Greenshot/Languages/language-ru-RU.xml +++ b/src/Greenshot/Languages/language-ru-RU.xml @@ -88,6 +88,8 @@ Greenshot поставляется БЕЗ КАКИХ-ЛИБО ГАРАНТИЙ. Закрыть Сохранить снимок экрана? Сохранить изображение? + Вы хотите скопировать изображение в буфер обмена? + Скопировать изображение в буфер обмена? Подтвердить Копировать изображение в буфер обмена Копировать путь в буфер обмена diff --git a/src/Greenshot/Languages/language-sk-SK.xml b/src/Greenshot/Languages/language-sk-SK.xml index 01c68e9ed..0e8176b4d 100644 --- a/src/Greenshot/Languages/language-sk-SK.xml +++ b/src/Greenshot/Languages/language-sk-SK.xml @@ -75,6 +75,8 @@ Tiež by sme velmi ocenili, keby ste najskôr skontrolovali, či už neexistuje Zavrieť Chcete uložiť snímku? Uložiť obrázok? + Chcete skopírovať obrázok do schránky? + Kopírovať obrázok do schránky? Potvrdiť Kopírovať obrázok do schránky Kopírovať cestu do schránky diff --git a/src/Greenshot/Languages/language-sl-SI.xml b/src/Greenshot/Languages/language-sl-SI.xml index ac102397a..7fd03c0d7 100644 --- a/src/Greenshot/Languages/language-sl-SI.xml +++ b/src/Greenshot/Languages/language-sl-SI.xml @@ -73,6 +73,8 @@ Pred objavo preverite tudi ali je napaka že prijavlja s strani kakšnega drugeg Zapri Ali želite shraniti zajem? Shranim sliko? + Ali želite kopirati sliko v odložišče? + Kopirati sliko v odložišče? Potrdite Kopiraj sliko na odložišče Kopiraj pot na odložišče diff --git a/src/Greenshot/Languages/language-sr-RS.xml b/src/Greenshot/Languages/language-sr-RS.xml index 9c669dba8..0b3cf5bf3 100644 --- a/src/Greenshot/Languages/language-sr-RS.xml +++ b/src/Greenshot/Languages/language-sr-RS.xml @@ -73,6 +73,8 @@ Затвори Желите ли да сачувате снимак екрана? Чување слике + Да ли желите да копирате слику у међуспремник? + Копирати слику у међуспремник? Потврди Умножи слику Умножи путању diff --git a/src/Greenshot/Languages/language-sv-SE.xml b/src/Greenshot/Languages/language-sv-SE.xml index c67bfe8fe..23b0d7431 100644 --- a/src/Greenshot/Languages/language-sv-SE.xml +++ b/src/Greenshot/Languages/language-sv-SE.xml @@ -88,6 +88,8 @@ Innan du skickar uppskattar vi verkligen om du kontrollerar om felet redan blivi Stäng Vill du spara skärmdumpen? Spara bild? + Vill du kopiera bilden till urklipp? + Vill du kopiera bilden till urklipp? Godkänn Kopiera bilden till urklipp Kopiera sökväg till urklipp diff --git a/src/Greenshot/Languages/language-tr-TR.xml b/src/Greenshot/Languages/language-tr-TR.xml index 56011063c..3f30001ef 100644 --- a/src/Greenshot/Languages/language-tr-TR.xml +++ b/src/Greenshot/Languages/language-tr-TR.xml @@ -73,6 +73,8 @@ Ayrıca bu hata için bir izleyici kaydının açılmış olup olmadığını da Kapat Ekran görüntüsünü kaydetmek istiyor musunuz? Görüntü kaydedilsin mi? + Resmi panoya kopyalamak istiyor musunuz? + Resim panoya kopyalansın mı? Tamam Görüntüyü panoya kopyala Yolu panoya kopyala diff --git a/src/Greenshot/Languages/language-uk-UA.xml b/src/Greenshot/Languages/language-uk-UA.xml index 1eae26c97..bf1a5ea64 100644 --- a/src/Greenshot/Languages/language-uk-UA.xml +++ b/src/Greenshot/Languages/language-uk-UA.xml @@ -87,6 +87,8 @@ Greenshot постачається АБСОЛЮТНО БЕЗ ГАРАНТІЇ. Закрити Зберегти знімок екрану? Зберегти зображення? + Бажаєте скопіювати зображення в буфер обміну? + Копіювати зображення в буфер обміну? Підтвердити Копіювати зображення у буфер обміну Копіювати шлях у буфер обміну diff --git a/src/Greenshot/Languages/language-vi-VN.xml b/src/Greenshot/Languages/language-vi-VN.xml index 6ddfc7f9d..d8ee3422f 100644 --- a/src/Greenshot/Languages/language-vi-VN.xml +++ b/src/Greenshot/Languages/language-vi-VN.xml @@ -53,6 +53,8 @@ Đóng Lưu ảnh chụp? Xác nhận lưu ảnh + Bạn có muốn sao chép hình ảnh vào khay nhớ tạm? + Sao chép hình ảnh vào khay nhớ tạm? Kiểm tra Chép ảnh vào clipboard Chép đuờng dẫn tới clipboard. diff --git a/src/Greenshot/Languages/language-zh-CN.xml b/src/Greenshot/Languages/language-zh-CN.xml index e69489c8c..269779c5a 100644 --- a/src/Greenshot/Languages/language-zh-CN.xml +++ b/src/Greenshot/Languages/language-zh-CN.xml @@ -79,6 +79,8 @@ 关闭 还没有保存到文件,您要保存此图片吗? 保存图片 + 是否要将图像复制到剪贴板? + 将图像复制到剪贴板? 确定 复制图片到剪贴板 复制路径到剪贴板 diff --git a/src/Greenshot/Languages/language-zh-TW.xml b/src/Greenshot/Languages/language-zh-TW.xml index 69f5e6696..15ecdb759 100644 --- a/src/Greenshot/Languages/language-zh-TW.xml +++ b/src/Greenshot/Languages/language-zh-TW.xml @@ -88,6 +88,8 @@ Greenshot 不對這個程式做任何擔保。這個程式是自由軟體,您 關閉 您要儲存螢幕擷圖嗎? 儲存圖片? + 是否要将图像复制到剪贴板? + 将图像复制到剪贴板? 確認 複製圖片到剪貼簿 複製路徑到剪貼簿