Making the plugins behave more stable, fixing a part of Bug #3528518

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1899 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-05-23 09:21:02 +00:00
parent 2ae58d5c6c
commit 2d88d8e588
5 changed files with 98 additions and 47 deletions

View file

@ -84,7 +84,11 @@ namespace GreenshotConfluencePlugin {
}
public IEnumerable<IDestination> Destinations() {
yield return new ConfluenceDestination();
if (ConfluenceDestination.IsInitialized) {
yield return new ConfluenceDestination();
} else {
yield break;
}
}
public IEnumerable<IProcessor> Processors() {
@ -106,8 +110,13 @@ namespace GreenshotConfluencePlugin {
if(config.IsDirty) {
IniConfig.Save();
}
TranslationManager.Instance.TranslationProvider = new LanguageXMLTranslationProvider();
//resources = new ComponentResourceManager(typeof(JiraPlugin));
try {
TranslationManager.Instance.TranslationProvider = new LanguageXMLTranslationProvider();
//resources = new ComponentResourceManager(typeof(JiraPlugin));
} catch (Exception ex) {
LOG.ErrorFormat("Problem in ConfluencePlugin.Initialize: {0}", ex.Message);
return false;
}
return true;
}