Also modified the EmailDestination to work like the picker if it's selected as a default destination.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1753 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-04-04 15:57:27 +00:00
commit fdc4aa1836
3 changed files with 15 additions and 2 deletions

View file

@ -210,6 +210,19 @@ namespace Greenshot.Destinations {
if (outlookInspectorCaption != null) {
OutlookEmailExporter.ExportToInspector(outlookInspectorCaption, tmpFile, attachmentName);
} else {
if (!manuallyInitiated) {
Dictionary<string, OlObjectClass> inspectorCaptions = OutlookEmailExporter.RetrievePossibleTargets(conf.OutlookAllowExportInMeetings);
if (inspectorCaptions != null && inspectorCaptions.Count > 0) {
List<IDestination> destinations = new List<IDestination>();
destinations.Add(new EmailDestination());
foreach (string inspectorCaption in inspectorCaptions.Keys) {
destinations.Add(new EmailDestination(inspectorCaption, inspectorCaptions[inspectorCaption]));
}
ContextMenuStrip menu = PickerDestination.CreatePickerMenu(false, surface, captureDetails, destinations);
PickerDestination.ShowMenuAtCursor(menu);
return false;
}
}
OutlookEmailExporter.ExportToOutlook(conf.OutlookEmailFormat, tmpFile, captureDetails.Title, attachmentName);
}
surface.SendMessageEvent(this, SurfaceMessageTyp.Info, lang.GetFormattedString(LangKey.exported_to, Description));