This commit is contained in:
Bruno Holliger 2021-10-19 16:07:12 +02:00 committed by GitHub
commit 51ddd9b167
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 39 additions and 0 deletions

View file

@ -92,6 +92,7 @@ namespace Greenshot.Configuration {
editor_close_on_save_title,
editor_confirm,
editor_copyimagetoclipboard,
editor_copyimagetoclipboardandcloseeditor,
editor_copypathtoclipboard,
editor_copytoclipboard,
editor_crop,

View file

@ -125,6 +125,7 @@ namespace Greenshot {
this.destinationsToolStrip = new Greenshot.Controls.ToolStripEx();
this.btnSave = new GreenshotPlugin.Controls.GreenshotToolStripButton();
this.btnClipboard = new GreenshotPlugin.Controls.GreenshotToolStripButton();
this.btnClipboardAndClose = new GreenshotPlugin.Controls.GreenshotToolStripButton();
this.btnPrint = new GreenshotPlugin.Controls.GreenshotToolStripButton();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.btnDelete = new GreenshotPlugin.Controls.GreenshotToolStripButton();
@ -186,6 +187,7 @@ namespace Greenshot {
this.btnCancel = new Greenshot.Controls.BindableToolStripButton();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.closeToolStripMenuItem = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.clipboardAndCloseToolStripMenuItem = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.fileSavedStatusContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.copyPathMenuItem = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
this.openDirectoryMenuItem = new GreenshotPlugin.Controls.GreenshotToolStripMenuItem();
@ -870,6 +872,7 @@ namespace Greenshot {
this.destinationsToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.btnSave,
this.btnClipboard,
this.btnClipboardAndClose,
this.btnPrint,
this.toolStripSeparator2,
this.btnDelete,
@ -903,6 +906,15 @@ namespace Greenshot {
this.btnClipboard.Name = "btnClipboard";
this.btnClipboard.Click += new System.EventHandler(this.BtnClipboardClick);
//
// btnClipboardAndClose
//
this.btnClipboardAndClose.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.btnClipboardAndClose.Image = ((System.Drawing.Image)(resources.GetObject("btnClipboardAndClose.Image")));
this.btnClipboardAndClose.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnClipboardAndClose.LanguageKey = "editor_clipboardandclose";
this.btnClipboardAndClose.Name = "btnClipboardAndClose";
this.btnClipboardAndClose.Click += new System.EventHandler(this.BtnClipboardClickAndClose);
//
// btnPrint
//
this.btnPrint.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@ -1566,6 +1578,14 @@ namespace Greenshot {
this.closeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4)));
this.closeToolStripMenuItem.Click += new System.EventHandler(this.CloseToolStripMenuItemClick);
//
// clipboardAndCloseToolStripMenuItem
//
this.clipboardAndCloseToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("btnClipboardAndClose.Image")));
this.clipboardAndCloseToolStripMenuItem.LanguageKey = "editor_clipboardandclose";
this.clipboardAndCloseToolStripMenuItem.Name = "clipboardAndClose";
this.clipboardAndCloseToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.Shift | System.Windows.Forms.Keys.C)));
this.clipboardAndCloseToolStripMenuItem.Click += new System.EventHandler(this.ClipboardAndCloseToolStripMenuItemClick);
//
// fileSavedStatusContextMenu
//
this.fileSavedStatusContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@ -1747,6 +1767,7 @@ namespace Greenshot {
private GreenshotPlugin.Controls.GreenshotToolStripMenuItem helpToolStripMenuItem;
private GreenshotPlugin.Controls.GreenshotToolStripMenuItem preferencesToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator12;
private GreenshotPlugin.Controls.GreenshotToolStripMenuItem clipboardAndCloseToolStripMenuItem;
private GreenshotPlugin.Controls.GreenshotToolStripMenuItem closeToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
@ -1779,6 +1800,7 @@ namespace Greenshot {
private System.Windows.Forms.ToolStripButton btnRedo;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
private GreenshotPlugin.Controls.GreenshotToolStripButton btnClipboard;
private GreenshotPlugin.Controls.GreenshotToolStripButton btnClipboardAndClose;
private GreenshotPlugin.Controls.GreenshotToolStripButton btnDelete;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;

View file

@ -364,6 +364,7 @@ namespace Greenshot {
}
}
// add the elements after the destinations
fileStripMenuItem.DropDownItems.Add(clipboardAndCloseToolStripMenuItem);
fileStripMenuItem.DropDownItems.Add(toolStripSeparator9);
fileStripMenuItem.DropDownItems.Add(closeToolStripMenuItem);
}
@ -516,6 +517,11 @@ namespace Greenshot {
DestinationHelper.ExportCapture(true, ClipboardDestination.DESIGNATION, _surface, _surface.CaptureDetails);
}
private void BtnClipboardClickAndClose(object sender, EventArgs e) {
DestinationHelper.ExportCapture(true, ClipboardDestination.DESIGNATION, _surface, _surface.CaptureDetails);
Close();
}
private void BtnPrintClick(object sender, EventArgs e) {
// The BeginInvoke is a solution for the printdialog not having focus
BeginInvoke((MethodInvoker) delegate {
@ -523,6 +529,11 @@ namespace Greenshot {
});
}
private void ClipboardAndCloseToolStripMenuItemClick(object sender, EventArgs e) {
DestinationHelper.ExportCapture(true, ClipboardDestination.DESIGNATION, _surface, _surface.CaptureDetails);
Close();
}
private void CloseToolStripMenuItemClick(object sender, EventArgs e) {
Close();
}

View file

@ -1026,4 +1026,7 @@
<metadata name="fileSavedStatusContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="btnClipboardAndClose.Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\icons\clipboardandclose.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

@ -83,6 +83,7 @@ schnell zu finden. Vielen Dank :)</resource>
<resource name="editor_border">Rand</resource>
<resource name="editor_brightness">Helligkeit</resource>
<resource name="editor_cancel">Abbrechen</resource>
<resource name="editor_clipboardandclose">In Zwischenablage kopieren und schließen</resource>
<resource name="editor_clipboardfailed">Fehler beim Zugriff auf die Zwischenablage. Bitte wiederholen Sie den Vorgang.</resource>
<resource name="editor_close">Schließen</resource>
<resource name="editor_close_on_save">Möchten Sie den Screenshot speichern?</resource>

View file

@ -83,6 +83,7 @@ Also, we would highly appreciate if you checked whether a tracker item already e
<resource name="editor_border">Border</resource>
<resource name="editor_brightness">Brightness</resource>
<resource name="editor_cancel">Cancel</resource>
<resource name="editor_clipboardandclose">Copy to clipboard and close</resource>
<resource name="editor_clipboardfailed">Error while accessing the clipboard. Please try again.</resource>
<resource name="editor_close">Close</resource>
<resource name="editor_close_on_save">Do you want to save the screenshot?</resource>

Binary file not shown.

After

Width:  |  Height:  |  Size: 742 B