Changes for Box Plugin so it can re-use the OAuthLoginForm. Also fixed a startup issue with some plug-ins.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2143 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-10-14 12:34:31 +00:00
commit 69d29992a2
8 changed files with 74 additions and 54 deletions

View file

@ -50,11 +50,16 @@ namespace Greenshot.Helpers {
}
}
private PluginHelper() {
PluginUtils.Host = this;
}
public Form GreenshotForm {
get {
return MainForm.Instance;
}
}
public NotifyIcon NotifyIcon {
get {
return MainForm.Instance.NotifyIcon;
@ -105,7 +110,6 @@ namespace Greenshot.Helpers {
}
#region Implementation of IGreenshotPluginHost
private ContextMenuStrip mainMenu = null;
/// <summary>
/// Create a Thumbnail
@ -125,7 +129,9 @@ namespace Greenshot.Helpers {
}
public ContextMenuStrip MainMenu {
get { return mainMenu;}
get {
return MainForm.Instance.MainMenu;
}
}
public IDictionary<PluginAttribute, IGreenshotPlugin> Plugins {
@ -202,10 +208,7 @@ namespace Greenshot.Helpers {
return false;
}
public void LoadPlugins(MainForm mainForm) {
// Copy ContextMenu
mainMenu = mainForm.MainMenu;
public void LoadPlugins() {
List<string> pluginFiles = new List<string>();
if (IniConfig.IsPortable && Directory.Exists(pafPath)) {