Refactored PluginUtils to have the GetExePath and GetExeIcon, which was needed for giving the ExternalCommandPlugin an icon.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2057 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-09-19 10:05:26 +00:00
commit 91385b074e
13 changed files with 119 additions and 83 deletions

View file

@ -69,12 +69,12 @@ namespace Greenshot.Destinations {
mailIcon = GreenshotPlugin.Core.GreenshotResources.getImage("Email.Image");
if (isOutlookUsed) {
exePath = GetExePath("OUTLOOK.EXE");
exePath = PluginUtils.GetExePath("OUTLOOK.EXE");
if (exePath != null && File.Exists(exePath)) {
applicationIcon = GetExeIcon(exePath, 0);
applicationIcon = PluginUtils.GetExeIcon(exePath, 0);
WindowDetails.AddProcessToExcludeFromFreeze("outlook");
if (conf.OutlookAllowExportInMeetings) {
meetingIcon = GetExeIcon(exePath, 2);
meetingIcon = PluginUtils.GetExeIcon(exePath, 2);
}
} else {
exePath = null;
@ -151,7 +151,7 @@ namespace Greenshot.Destinations {
if (OlObjectClass.olAppointment.Equals(outlookInspectorType)) {
// Make sure we loaded the icon, maybe the configuration has been changed!
if (meetingIcon == null) {
meetingIcon = GetExeIcon(exePath, 2);
meetingIcon = PluginUtils.GetExeIcon(exePath, 2);
}
return meetingIcon;
} else {