summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtUIFactory.cpp')
-rw-r--r--Swift/QtUI/QtUIFactory.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/Swift/QtUI/QtUIFactory.cpp b/Swift/QtUI/QtUIFactory.cpp
index 2fac36a..c7b64b3 100644
--- a/Swift/QtUI/QtUIFactory.cpp
+++ b/Swift/QtUI/QtUIFactory.cpp
@@ -1,8 +1,8 @@
/*
- * Copyright (c) 2010-2014 Isode Limited.
+ * Copyright (c) 2010-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swift/QtUI/QtUIFactory.h>
@@ -41,26 +41,22 @@ QtUIFactory::QtUIFactory(SettingsProviderHierachy* settings, QtSettingsProvider*
historyFontSize_ = settings->getSetting(QtUISettingConstants::HISTORYWINDOW_FONT_SIZE);
}
XMLConsoleWidget* QtUIFactory::createXMLConsoleWidget() {
QtXMLConsoleWidget* widget = new QtXMLConsoleWidget();
tabs->addTab(widget);
- if (!tabs->isVisible()) {
- tabs->show();
- }
+ showTabs();
widget->show();
return widget;
}
HistoryWindow* QtUIFactory::createHistoryWindow(UIEventStream* uiEventStream) {
QtHistoryWindow* window = new QtHistoryWindow(settings, uiEventStream);
tabs->addTab(window);
- if (!tabs->isVisible()) {
- tabs->show();
- }
+ showTabs();
connect(window, SIGNAL(fontResized(int)), this, SLOT(handleHistoryWindowFontResized(int)));
window->handleFontResized(historyFontSize_);
window->show();
return window;
}
@@ -70,15 +66,13 @@ void QtUIFactory::handleHistoryWindowFontResized(int size) {
settings->storeSetting(QtUISettingConstants::HISTORYWINDOW_FONT_SIZE, size);
}
FileTransferListWidget* QtUIFactory::createFileTransferListWidget() {
QtFileTransferListWidget* widget = new QtFileTransferListWidget();
tabs->addTab(widget);
- if (!tabs->isVisible()) {
- tabs->show();
- }
+ showTabs();
widget->show();
return widget;
}
MainWindow* QtUIFactory::createMainWindow(UIEventStream* eventStream) {
lastMainWindow = new QtMainWindow(settings, eventStream, loginWindow->getMenus(), statusCache, emoticonsExist_, enableAdHocCommandOnJID_);
@@ -176,7 +170,15 @@ BlockListEditorWidget *QtUIFactory::createBlockListEditorWidget() {
}
AdHocCommandWindow* QtUIFactory::createAdHocCommandWindow(boost::shared_ptr<OutgoingAdHocCommandSession> command) {
return new QtAdHocCommandWindow(command);
}
+void QtUIFactory::showTabs() {
+ if (tabs) {
+ if (!tabs->isVisible()) {
+ tabs->show();
+ }
+ }
+}
+
}