BUG-1908: Made Greenshot recheck & add the external commands like Ms-Paint and Paint.NET if they are not deleted manually and not yet available. Also cleaned up some code.

This commit is contained in:
Robin 2016-09-16 21:48:57 +02:00
commit 6efc7796b8
49 changed files with 322 additions and 294 deletions

View file

@ -33,11 +33,11 @@ namespace ExternalCommand {
public static Image IconForCommand(string commandName) {
Image icon = null;
if (commandName != null) {
if (config.commandlines.ContainsKey(commandName) && File.Exists(config.commandlines[commandName])) {
if (config.Commandline.ContainsKey(commandName) && File.Exists(config.Commandline[commandName])) {
try {
icon = PluginUtils.GetCachedExeIcon(config.commandlines[commandName], 0);
icon = PluginUtils.GetCachedExeIcon(config.Commandline[commandName], 0);
} catch (Exception ex) {
LOG.Warn("Problem loading icon for " + config.commandlines[commandName], ex);
LOG.Warn("Problem loading icon for " + config.Commandline[commandName], ex);
}
}
}