Extended the ExportCapture with ExportInformation as a result object, this allows us to better and more consistently return & handle information from the export. Also it should be easier to extend the functionality. TODO: Still need to cleanup some messages, some are no longer needed

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2034 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-09-14 15:04:37 +00:00
commit be797ecf8a
27 changed files with 379 additions and 172 deletions

View file

@ -302,7 +302,7 @@ namespace Greenshot {
string dateTime = DateTime.Now.ToLongTimeString();
// TODO: Fix that we only open files, like in the tooltip
//if (eventArgs.MessageType == SurfaceMessageTyp.FileSaved || eventArgs.MessageType == SurfaceMessageTyp.UploadedUrl) {
if (eventArgs.MessageType == SurfaceMessageTyp.FileSaved || eventArgs.MessageType == SurfaceMessageTyp.UploadedUrl) {
if (eventArgs.MessageType == SurfaceMessageTyp.FileSaved || eventArgs.MessageType == SurfaceMessageTyp.UploadedUri) {
updateStatusLabel(dateTime + " - " + eventArgs.Message, fileSavedStatusContextMenu);
} else {
updateStatusLabel(dateTime + " - " + eventArgs.Message);
@ -1059,7 +1059,8 @@ namespace Greenshot {
clickedDestination = (IDestination)clickedMenuItem.Tag;
}
if (clickedDestination != null) {
if (clickedDestination.ExportCapture(true, surface, surface.CaptureDetails)) {
ExportInformation exportInformation = clickedDestination.ExportCapture(true, surface, surface.CaptureDetails);
if (exportInformation != null && exportInformation.ExportMade) {
surface.Modified = false;
}
}