mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 14:03:23 -07:00
Changed the destination picker behavior to not sort, this makes it possible to do the sorting in the destinations itself. OneNote places the current page on top, the printer list also starts with the default... etc.
This commit is contained in:
parent
626d607895
commit
cc7f303e08
9 changed files with 31 additions and 8 deletions
|
@ -133,7 +133,7 @@ namespace GreenshotOfficePlugin {
|
|||
}
|
||||
|
||||
public override IEnumerable<IDestination> DynamicDestinations() {
|
||||
Dictionary<string, OlObjectClass> inspectorCaptions = OutlookEmailExporter.RetrievePossibleTargets();
|
||||
IDictionary<string, OlObjectClass> inspectorCaptions = OutlookEmailExporter.RetrievePossibleTargets();
|
||||
if (inspectorCaptions != null) {
|
||||
foreach (string inspectorCaption in inspectorCaptions.Keys) {
|
||||
yield return new OutlookDestination(inspectorCaption, inspectorCaptions[inspectorCaption]);
|
||||
|
|
|
@ -54,6 +54,7 @@ namespace Greenshot.Interop.Office {
|
|||
}
|
||||
}
|
||||
}
|
||||
currentWorkbooks.Sort();
|
||||
return currentWorkbooks;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,8 +56,8 @@ namespace Greenshot.Interop.Office {
|
|||
/// A method to retrieve all inspectors which can act as an export target
|
||||
/// </summary>
|
||||
/// <returns>List<string> with inspector captions (window title)</returns>
|
||||
public static Dictionary<string, OlObjectClass> RetrievePossibleTargets() {
|
||||
Dictionary<string, OlObjectClass> inspectorCaptions = new Dictionary<string, OlObjectClass>();
|
||||
public static IDictionary<string, OlObjectClass> RetrievePossibleTargets() {
|
||||
IDictionary<string, OlObjectClass> inspectorCaptions = new SortedDictionary<string, OlObjectClass>();
|
||||
try {
|
||||
using (IOutlookApplication outlookApplication = GetOutlookApplication()) {
|
||||
if (outlookApplication == null) {
|
||||
|
|
|
@ -69,7 +69,7 @@ namespace Greenshot.Interop.Office {
|
|||
} catch (Exception ex) {
|
||||
LOG.Warn("Problem retrieving word destinations, ignoring: ", ex);
|
||||
}
|
||||
|
||||
foundPresentations.Sort();
|
||||
return foundPresentations;
|
||||
}
|
||||
|
||||
|
|
|
@ -227,6 +227,7 @@ namespace Greenshot.Interop.Office {
|
|||
} catch (Exception ex) {
|
||||
LOG.Warn("Problem retrieving word destinations, ignoring: ", ex);
|
||||
}
|
||||
openDocuments.Sort();
|
||||
return openDocuments;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue