summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-09-12 16:10:50 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-09-12 16:10:50 (GMT)
commit41e89bb5ed1a9d38d1ece1310ef708daad54a9a9 (patch)
tree729117779ef76f28bff02413ce74daac46ccc565 /Swift/QtUI
parentde0cdc61015f86a334bc4c0589bafe0bfdf89786 (diff)
downloadswift-41e89bb5ed1a9d38d1ece1310ef708daad54a9a9.zip
swift-41e89bb5ed1a9d38d1ece1310ef708daad54a9a9.tar.bz2
Moved application message display around.
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtAboutWidget.cpp2
-rw-r--r--Swift/QtUI/QtSwift.cpp20
-rw-r--r--Swift/QtUI/QtSwift.h12
3 files changed, 24 insertions, 10 deletions
diff --git a/Swift/QtUI/QtAboutWidget.cpp b/Swift/QtUI/QtAboutWidget.cpp
index e9e6329..e8b0baf 100644
--- a/Swift/QtUI/QtAboutWidget.cpp
+++ b/Swift/QtUI/QtAboutWidget.cpp
@@ -16,8 +16,6 @@
#include <QFile>
#include <QTextStream>
-#include "Swiften/Application/Application.h"
-
namespace Swift {
QtAboutWidget::QtAboutWidget() : QDialog() {
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index e548e29..6606f85 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -23,8 +23,6 @@
#include <boost/bind.hpp>
#include <QSplitter>
-#include "Swiften/Application/Application.h"
-#include "Swiften/Application/PlatformApplication.h"
#include "Swiften/Application/PlatformApplicationPathProvider.h"
#include "Swiften/Avatars/AvatarFileStorage.h"
#include "Swiften/Disco/CapsFileStorage.h"
@@ -33,11 +31,17 @@
#include "Swiften/Base/Platform.h"
#include "Swiften/Elements/Presence.h"
#include "Swiften/Client/Client.h"
+#include "SwifTools/Dock/PlatformDock.h"
#include "Swift/Controllers/MainController.h"
#include "Swift/Controllers/ApplicationInfo.h"
#include "Swift/Controllers/BuildVersion.h"
#include "SwifTools/AutoUpdater/AutoUpdater.h"
#include "SwifTools/AutoUpdater/PlatformAutoUpdaterFactory.h"
+#if defined(SWIFTEN_PLATFORM_MACOSX)
+#include "SwifTools/Dock/MacOSXDock.h"
+#else
+#include "SwifTools/Dock/NullDock.h"
+#endif
namespace Swift{
@@ -81,13 +85,19 @@ QtSwift::QtSwift(po::variables_map options) : autoUpdater_(NULL) {
tabs_ = options.count("no-tabs") && !(splitter_ > 0) ? NULL : new QtChatTabs();
settings_ = new QtSettingsProvider();
- application_ = new PlatformApplication(SWIFT_APPLICATION_NAME);
applicationPathProvider_ = new PlatformApplicationPathProvider(SWIFT_APPLICATION_NAME);
avatarStorage_ = new AvatarFileStorage(applicationPathProvider_->getAvatarDir());
vcardStorageFactory_ = new VCardFileStorageFactory(applicationPathProvider_->getDataDir());
capsStorage_ = new CapsFileStorage(applicationPathProvider_->getDataDir() / "caps");
chatWindowFactory_ = new QtChatWindowFactory(splitter_, settings_, tabs_, "");
soundPlayer_ = new QtSoundPlayer(applicationPathProvider_);
+
+#if defined(SWIFTEN_PLATFORM_MACOSX)
+ dock_ = new MacOSXDock(&cocoaApplication_);
+#else
+ dock_ = new NullDock();
+#endif
+
if (splitter_) {
splitter_->show();
}
@@ -121,7 +131,7 @@ QtSwift::QtSwift(po::variables_map options) : autoUpdater_(NULL) {
avatarStorage_,
capsStorage_,
vcardStorageFactory_,
- application_->getApplicationMessageDisplay(),
+ dock_,
options.count("latency-debug") > 0);
mainControllers_.push_back(mainController);
}
@@ -150,12 +160,12 @@ QtSwift::~QtSwift() {
delete controller;
}
delete settings_;
- delete application_;
foreach (QtSystemTray* tray, systemTrays_) {
delete tray;
}
delete tabs_;
delete splitter_;
+ delete dock_;
delete soundPlayer_;
foreach (QtXMLConsoleWidgetFactory* factory, xmlConsoleWidgetFactories_) {
delete factory;
diff --git a/Swift/QtUI/QtSwift.h b/Swift/QtUI/QtSwift.h
index 4c570ae..657b749 100644
--- a/Swift/QtUI/QtSwift.h
+++ b/Swift/QtUI/QtSwift.h
@@ -11,20 +11,24 @@
#include <boost/program_options/options_description.hpp>
#include "Swiften/Base/String.h"
+#include "Swiften/Base/Platform.h"
#include "Swiften/EventLoop/Qt/QtEventLoop.h"
#include "QtLoginWindowFactory.h"
#include "QtMainWindowFactory.h"
#include "QtChatWindowFactory.h"
#include "QtSettingsProvider.h"
+#if defined(SWIFTEN_PLATFORM_MACOSX)
+#include "Swiften/Application/CocoaApplication.h"
+#endif
namespace po = boost::program_options;
class QSplitter;
namespace Swift {
+ class Dock;
class VCardStorageFactory;
class AutoUpdater;
- class Application;
class ApplicationPathProvider;
class AvatarStorage;
class CapsStorage;
@@ -59,14 +63,16 @@ namespace Swift {
QtSettingsProvider *settings_;
QSplitter* splitter_;
QtSoundPlayer* soundPlayer_;
+ Dock* dock_;
QtChatTabs* tabs_;
- Application* application_;
ApplicationPathProvider* applicationPathProvider_;
AvatarStorage* avatarStorage_;
CapsStorage* capsStorage_;
VCardStorageFactory* vcardStorageFactory_;
AutoUpdater* autoUpdater_;
-
+#if defined(SWIFTEN_PLATFORM_MACOSX)
+ CocoaApplication cocoaApplication_;
+#endif
};
}