diff options
author | Yana Stamcheva <yana@jitsi.org> | 2007-04-26 21:18:58 +0000 |
---|---|---|
committer | Yana Stamcheva <yana@jitsi.org> | 2007-04-26 21:18:58 +0000 |
commit | 8bfa6d8d0eb68411048a5181f5c99df1d9a45137 (patch) | |
tree | 5ef8eb342ec773a0c63ed7c8d5dc515079215182 /src/net | |
parent | 4959a74d88a1d7749020b44ea817ecbd81274d4a (diff) | |
download | jitsi-8bfa6d8d0eb68411048a5181f5c99df1d9a45137.zip jitsi-8bfa6d8d0eb68411048a5181f5c99df1d9a45137.tar.gz jitsi-8bfa6d8d0eb68411048a5181f5c99df1d9a45137.tar.bz2 |
remove account wizards from the gui when the corresponding bundle is stopped
Diffstat (limited to 'src/net')
7 files changed, 66 insertions, 38 deletions
diff --git a/src/net/java/sip/communicator/plugin/aimaccregwizz/AimAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/aimaccregwizz/AimAccRegWizzActivator.java index 85786f0..db6240b 100644 --- a/src/net/java/sip/communicator/plugin/aimaccregwizz/AimAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/aimaccregwizz/AimAccRegWizzActivator.java @@ -27,6 +27,10 @@ public class AimAccRegWizzActivator implements BundleActivator { private static BrowserLauncherService browserLauncherService; + private static UIService uiService; + + private static AimAccountRegistrationWizard aimWizard; + /** * Starts this bundle. */ @@ -37,19 +41,20 @@ public class AimAccRegWizzActivator implements BundleActivator { ServiceReference uiServiceRef = bundleContext .getServiceReference(UIService.class.getName()); - UIService uiService - = (UIService) bundleContext.getService(uiServiceRef); + uiService = (UIService) bundleContext.getService(uiServiceRef); AccountRegistrationWizardContainer wizardContainer = uiService.getAccountRegWizardContainer(); - AimAccountRegistrationWizard aimWizard - = new AimAccountRegistrationWizard(wizardContainer); + aimWizard = new AimAccountRegistrationWizard(wizardContainer); wizardContainer.addAccountRegistrationWizard(aimWizard); } - public void stop(BundleContext bundleContext) throws Exception { + public void stop(BundleContext bundleContext) throws Exception + { + uiService.getAccountRegWizardContainer() + .removeAccountRegistrationWizard(aimWizard); } /** diff --git a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccRegWizzActivator.java index 0d27f41..1e8f924 100644 --- a/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/gibberishaccregwizz/GibberishAccRegWizzActivator.java @@ -7,6 +7,7 @@ package net.java.sip.communicator.plugin.gibberishaccregwizz; import org.osgi.framework.*; + import net.java.sip.communicator.service.configuration.*; import net.java.sip.communicator.service.gui.*; import net.java.sip.communicator.service.protocol.*; @@ -32,6 +33,10 @@ public class GibberishAccRegWizzActivator * A currently valid reference to the configuration service. */ private static ConfigurationService configService; + + private static AccountRegistrationWizardContainer wizardContainer; + + private static GibberishAccountRegistrationWizard gibberishWizard; /** * Starts this bundle. @@ -46,13 +51,11 @@ public class GibberishAccRegWizzActivator ServiceReference uiServiceRef = bundleContext .getServiceReference(UIService.class.getName()); - UIService uiService - = (UIService) bundleContext.getService(uiServiceRef); + UIService uiService = (UIService) bundleContext.getService(uiServiceRef); - AccountRegistrationWizardContainer wizardContainer - = uiService.getAccountRegWizardContainer(); + wizardContainer = uiService.getAccountRegWizardContainer(); - GibberishAccountRegistrationWizard gibberishWizard + gibberishWizard = new GibberishAccountRegistrationWizard(wizardContainer); wizardContainer.addAccountRegistrationWizard(gibberishWizard); @@ -66,11 +69,11 @@ public class GibberishAccRegWizzActivator * * @param context The execution context of the bundle being stopped. */ - public void stop(BundleContext context) + public void stop(BundleContext bundleContext) throws Exception { - + wizardContainer.removeAccountRegistrationWizard(gibberishWizard); } - + /** * Returns the <tt>ProtocolProviderFactory</tt> for the Gibberish protocol. * @return the <tt>ProtocolProviderFactory</tt> for the Gibberish protocol diff --git a/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccRegWizzActivator.java index 2f39506..fb75e5f 100644 --- a/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/icqaccregwizz/IcqAccRegWizzActivator.java @@ -27,6 +27,10 @@ public class IcqAccRegWizzActivator implements BundleActivator { private static BrowserLauncherService browserLauncherService; + private static AccountRegistrationWizardContainer wizardContainer; + + private static IcqAccountRegistrationWizard icqWizard; + /** * Starts this bundle. */ @@ -40,16 +44,16 @@ public class IcqAccRegWizzActivator implements BundleActivator { UIService uiService = (UIService) bundleContext.getService(uiServiceRef); - AccountRegistrationWizardContainer wizardContainer - = uiService.getAccountRegWizardContainer(); + wizardContainer = uiService.getAccountRegWizardContainer(); - IcqAccountRegistrationWizard icqWizard - = new IcqAccountRegistrationWizard(wizardContainer); + icqWizard = new IcqAccountRegistrationWizard(wizardContainer); wizardContainer.addAccountRegistrationWizard(icqWizard); } - public void stop(BundleContext bundleContext) throws Exception { + public void stop(BundleContext bundleContext) throws Exception + { + wizardContainer.removeAccountRegistrationWizard(icqWizard); } /** diff --git a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccRegWizzActivator.java index 3da3338..3c39599 100644 --- a/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/jabberaccregwizz/JabberAccRegWizzActivator.java @@ -28,6 +28,10 @@ public class JabberAccRegWizzActivator private static ConfigurationService configService; + private static AccountRegistrationWizardContainer wizardContainer; + + private static JabberAccountRegistrationWizard jabberWizard; + /** * Starts this bundle. * @param bc BundleContext @@ -45,11 +49,9 @@ public class JabberAccRegWizzActivator UIService uiService = (UIService) bundleContext.getService(uiServiceRef); - AccountRegistrationWizardContainer wizardContainer - = uiService.getAccountRegWizardContainer(); + wizardContainer = uiService.getAccountRegWizardContainer(); - JabberAccountRegistrationWizard jabberWizard - = new JabberAccountRegistrationWizard(wizardContainer); + jabberWizard = new JabberAccountRegistrationWizard(wizardContainer); wizardContainer.addAccountRegistrationWizard(jabberWizard); } @@ -57,6 +59,7 @@ public class JabberAccRegWizzActivator public void stop(BundleContext bundleContext) throws Exception { + wizardContainer.removeAccountRegistrationWizard(jabberWizard); } /** diff --git a/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccRegWizzActivator.java index 4484073..6d3e36a 100644 --- a/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/msnaccregwizz/MsnAccRegWizzActivator.java @@ -26,6 +26,10 @@ public class MsnAccRegWizzActivator implements BundleActivator { private static ConfigurationService configService; + private static AccountRegistrationWizardContainer wizardContainer; + + private static MsnAccountRegistrationWizard msnWizard; + /** * Starts this bundle. * @param bc BundleContext @@ -41,16 +45,16 @@ public class MsnAccRegWizzActivator implements BundleActivator { UIService uiService = (UIService) bundleContext.getService(uiServiceRef); - AccountRegistrationWizardContainer wizardContainer - = uiService.getAccountRegWizardContainer(); + wizardContainer = uiService.getAccountRegWizardContainer(); - MsnAccountRegistrationWizard msnWizard - = new MsnAccountRegistrationWizard(wizardContainer); + msnWizard = new MsnAccountRegistrationWizard(wizardContainer); wizardContainer.addAccountRegistrationWizard(msnWizard); } - public void stop(BundleContext bundleContext) throws Exception { + public void stop(BundleContext bundleContext) throws Exception + { + wizardContainer.removeAccountRegistrationWizard(msnWizard); } /** diff --git a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccRegWizzActivator.java index 1b03082..a4906da 100644 --- a/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/sipaccregwizz/SIPAccRegWizzActivator.java @@ -26,6 +26,10 @@ public class SIPAccRegWizzActivator implements BundleActivator { private static ConfigurationService configService; + private static AccountRegistrationWizardContainer wizardContainer; + + private static SIPAccountRegistrationWizard sipWizard; + /** * Starts this bundle. * @param bc BundleContext @@ -41,16 +45,16 @@ public class SIPAccRegWizzActivator implements BundleActivator { UIService uiService = (UIService) bundleContext.getService(uiServiceRef); - AccountRegistrationWizardContainer wizardContainer - = uiService.getAccountRegWizardContainer(); + wizardContainer = uiService.getAccountRegWizardContainer(); - SIPAccountRegistrationWizard sipWizard - = new SIPAccountRegistrationWizard(wizardContainer); + sipWizard = new SIPAccountRegistrationWizard(wizardContainer); wizardContainer.addAccountRegistrationWizard(sipWizard); } - public void stop(BundleContext bundleContext) throws Exception { + public void stop(BundleContext bundleContext) throws Exception + { + wizardContainer.removeAccountRegistrationWizard(sipWizard); } /** diff --git a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccRegWizzActivator.java b/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccRegWizzActivator.java index fe35f38..795b938 100644 --- a/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccRegWizzActivator.java +++ b/src/net/java/sip/communicator/plugin/yahooaccregwizz/YahooAccRegWizzActivator.java @@ -6,12 +6,13 @@ */ package net.java.sip.communicator.plugin.yahooaccregwizz; -import org.osgi.framework.*; import net.java.sip.communicator.service.configuration.*; import net.java.sip.communicator.service.gui.*; import net.java.sip.communicator.service.protocol.*; import net.java.sip.communicator.util.*; +import org.osgi.framework.*; + /** * Registers the <tt>YahooAccountRegistrationWizard</tt> in the UI Service. * @@ -26,6 +27,10 @@ public class YahooAccRegWizzActivator implements BundleActivator { private static ConfigurationService configService; + private static AccountRegistrationWizardContainer wizardContainer; + + private static YahooAccountRegistrationWizard yahooWizard; + /** * Starts this bundle. * @param bc BundleContext @@ -41,16 +46,16 @@ public class YahooAccRegWizzActivator implements BundleActivator { UIService uiService = (UIService) bundleContext.getService(uiServiceRef); - AccountRegistrationWizardContainer wizardContainer - = uiService.getAccountRegWizardContainer(); + wizardContainer = uiService.getAccountRegWizardContainer(); - YahooAccountRegistrationWizard yahooWizard - = new YahooAccountRegistrationWizard(wizardContainer); + yahooWizard = new YahooAccountRegistrationWizard(wizardContainer); wizardContainer.addAccountRegistrationWizard(yahooWizard); } - public void stop(BundleContext bundleContext) throws Exception { + public void stop(BundleContext bundleContext) throws Exception + { + wizardContainer.removeAccountRegistrationWizard(yahooWizard); } /** |