Remove updating of ui via login thread.

git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@7612 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Derek DeMoro
2007-03-20 19:55:09 +00:00
committed by derek
parent 093edffc6a
commit c204fcc729
4 changed files with 10 additions and 8 deletions

View File

@ -11,7 +11,7 @@
<excludeFolder url="file://$MODULE_DIR$/../../src/plugins" />
<excludeFolder url="file://$MODULE_DIR$/../../target" />
</content>
<orderEntry type="jdk" jdkName="JDK 1.5.0" jdkType="JavaSDK" />
<orderEntry type="jdk" jdkName="1.6" jdkType="JavaSDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module-library" exported="">
<library>

View File

@ -18,7 +18,6 @@ import org.jivesoftware.resource.Default;
import org.jivesoftware.resource.Res;
import org.jivesoftware.resource.SparkRes;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.Roster;
import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
@ -644,10 +643,6 @@ public final class LoginDialog {
}
connection.login(getUsername(), getPassword(), resource, false);
// Subscriptions are always manual
Roster roster = connection.getRoster();
roster.setSubscriptionMode(Roster.SubscriptionMode.manual);
sessionManager.setServerAddress(connection.getServiceName());
sessionManager.initializeSession(connection, getUsername(), getPassword());
sessionManager.setJID(connection.getUser());

View File

@ -14,6 +14,7 @@ import org.jdesktop.jdic.systeminfo.SystemInfo;
import org.jivesoftware.Spark;
import org.jivesoftware.resource.Res;
import org.jivesoftware.smack.ConnectionListener;
import org.jivesoftware.smack.Roster;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.packet.Presence;
@ -29,14 +30,14 @@ import org.jivesoftware.sparkimpl.plugin.manager.Features;
import org.jivesoftware.sparkimpl.settings.local.LocalPreferences;
import org.jivesoftware.sparkimpl.settings.local.SettingsManager;
import javax.swing.SwingUtilities;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import javax.swing.SwingUtilities;
/**
* This manager is responsible for the handling of the XMPPConnection used within Spark. This is used
* for the changing of the users presence, the handling of connection errors and the ability to add
@ -95,6 +96,7 @@ public final class SessionManager implements ConnectionListener {
// Discover items
discoverItems();
ProviderManager.getInstance().addExtensionProvider("event", "http://jabber.org/protocol/disco#info", new Features.Provider());
}

View File

@ -13,6 +13,7 @@ package org.jivesoftware.spark;
import org.jivesoftware.MainWindow;
import org.jivesoftware.MainWindowListener;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.Roster;
import org.jivesoftware.smack.filter.PacketFilter;
import org.jivesoftware.smack.filter.PacketTypeFilter;
import org.jivesoftware.smack.packet.Message;
@ -261,6 +262,10 @@ public class Workspace extends JPanel implements PacketListener {
final PluginManager pluginManager = PluginManager.getInstance();
pluginManager.loadPlugins();
pluginManager.initializePlugins();
// Subscriptions are always manual
Roster roster = SparkManager.getConnection().getRoster();
roster.setSubscriptionMode(Roster.SubscriptionMode.manual);
}
}, 2000);