mirror of
https://github.com/greenshot/greenshot
synced 2025-08-20 21:43:24 -07:00
Changed IDestination, added a manuallyInitiated so the destination can change its behavior depending on the flag. An example use-case would be the word exporter: if the flag is false, which it would be if the word destination is set as THE destination, it would add to the current document if one is available otherwise create a new. This makes it possible to have a kind of session behavior.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1749 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
c092712561
commit
eb616472c4
24 changed files with 68 additions and 47 deletions
|
@ -65,7 +65,7 @@ namespace Greenshot.Destinations {
|
|||
}
|
||||
}
|
||||
|
||||
public override bool ExportCapture(ISurface surface, ICaptureDetails captureDetails) {
|
||||
public override bool ExportCapture(bool manuallyInitiated, ISurface surface, ICaptureDetails captureDetails) {
|
||||
ContextMenuStrip menu = new ContextMenuStrip();
|
||||
menu.Closing += delegate(object source, ToolStripDropDownClosingEventArgs eventArgs) {
|
||||
LOG.DebugFormat("Close reason: {0}", eventArgs.CloseReason);
|
||||
|
@ -94,7 +94,7 @@ namespace Greenshot.Destinations {
|
|||
}
|
||||
// Make sure the menu is closed
|
||||
menu.Close();
|
||||
bool result = clickedDestination.ExportCapture(surface, captureDetails);
|
||||
bool result = clickedDestination.ExportCapture(true, surface, captureDetails);
|
||||
// TODO: Find some better way to detect that we exported to the editor
|
||||
if (!EditorDestination.DESIGNATION.Equals(clickedDestination.Designation) || result == false) {
|
||||
LOG.DebugFormat("Disposing as Destination was {0} and result {1}", clickedDestination.Description, result);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue