MetaContactListService added

cusax-fix
Yana Stamcheva 20 years ago
parent 2f4455a31a
commit d206ab63ae

@ -4,11 +4,13 @@
import net.java.sip.communicator.impl.gui.main.CommunicatorMain;
import net.java.sip.communicator.impl.gui.main.login.LoginManager;
import net.java.sip.communicator.service.contactlist.MetaContactListService;
import net.java.sip.communicator.service.gui.UIService;
import net.java.sip.communicator.util.Logger;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
public class Activator implements BundleActivator
@ -39,21 +41,13 @@ public void start(BundleContext bundleContext) throws Exception
//Create the ui service
this.uiService =
new UIServiceImpl();
//ServiceReference clistReference
//= bundleContext.getServiceReference(MetaContactListService.class.getName());
//MetaContactListService contactListService
//= (MetaContactListService)bundleContext.getService(clistReference);
logger.info("UI Service...[ STARTED ]");
bundleContext.registerService(
UIService.class.getName(), this.uiService, null);
logger.info("UI Service ...[REGISTERED]");
//communicatorMain.setContactList(contactListService);
logger.info("UI Service ...[REGISTERED]");
communicatorMain.showCommunicator();

@ -16,6 +16,7 @@
import net.java.sip.communicator.impl.gui.main.MainFrame;
import net.java.sip.communicator.impl.gui.main.i18n.Messages;
import net.java.sip.communicator.impl.gui.main.utils.Constants;
import net.java.sip.communicator.service.contactlist.MetaContactListService;
import net.java.sip.communicator.service.protocol.AccountID;
import net.java.sip.communicator.service.protocol.AccountManager;
import net.java.sip.communicator.service.protocol.AccountProperties;
@ -127,6 +128,14 @@ public void registrationStateChanged(RegistrationStateChangeEvent evt) {
this.mainFrame.setSupportedOperationSets(supportedOpSets);
ServiceReference clistReference
= bc.getServiceReference(MetaContactListService.class.getName());
MetaContactListService contactListService
= (MetaContactListService)bc.getService(clistReference);
this.mainFrame.setContactList(contactListService);
}
else if(evt.getNewState()
.equals(RegistrationState.AUTHENTICATION_FAILED)){

Loading…
Cancel
Save