summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-03-29 15:03:13 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-03-29 15:03:13 (GMT)
commitcf664dd8baa1accc355ec4a727899a9f68f68ed5 (patch)
treeca6e8b07e7beb09e9c6e6374ddbef225be06feb5 /Swift
parent1803d2e9169c1fae676213d2eaead86babc02a4c (diff)
downloadswift-cf664dd8baa1accc355ec4a727899a9f68f68ed5.zip
swift-cf664dd8baa1accc355ec4a727899a9f68f68ed5.tar.bz2
Request bookmarks at login.
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/MainController.cpp2
-rw-r--r--Swift/QtUI/QtMainWindowFactory.cpp10
2 files changed, 6 insertions, 6 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index ee11b70..d042115 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -135,8 +135,6 @@ void MainController::handleConnected() {
presenceOracle_ = new PresenceOracle(client_);
nickResolver_ = new NickResolver(xmppRoster_);
lastSentPresence_ = boost::shared_ptr<Presence>();
-
-
avatarManager_ = new AvatarManager(client_, client_, avatarStorage_);
diff --git a/Swift/QtUI/QtMainWindowFactory.cpp b/Swift/QtUI/QtMainWindowFactory.cpp
index dc1949e..10b122a 100644
--- a/Swift/QtUI/QtMainWindowFactory.cpp
+++ b/Swift/QtUI/QtMainWindowFactory.cpp
@@ -9,13 +9,15 @@ QtMainWindowFactory::QtMainWindowFactory(QtTreeWidgetFactory *treeWidgetFactory)
}
MainWindow* QtMainWindowFactory::createMainWindow(UIEventStream* eventStream) {
- QtMainWindow* window = new QtMainWindow(eventStream, treeWidgetFactory_);
- lastWindow_ = window;
- return window;
+ if (!lastWindow_) {
+ lastWindow_ = new QtMainWindow(eventStream, treeWidgetFactory_);
+ }
+ return lastWindow_;
}
MainWindow* QtMainWindowFactory::getLastCreatedWindow() {
- return lastWindow_;
+ assert(lastWindow_);
+ return lastWindow_;;
}
}