From b3208697addc0492f4ae1f76c75a8810c20e701a Mon Sep 17 00:00:00 2001 From: Kevin Smith <git@kismith.co.uk> Date: Fri, 4 Jun 2010 22:43:37 +0100 Subject: Allow roster show/hide in netbook mode. Resolves: #450 diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp index a18b161..66ac2db 100644 --- a/Swift/QtUI/QtLoginWindow.cpp +++ b/Swift/QtUI/QtLoginWindow.cpp @@ -19,6 +19,7 @@ #include <QToolButton> #include <QLabel> #include <QMenuBar> +#include <qdebug.h> #include "Swift/Controllers/UIEvents/UIEventStream.h" #include "Swift/Controllers/UIEvents/RequestXMLConsoleUIEvent.h" @@ -317,13 +318,13 @@ void QtLoginWindow::setMessage(const String& message) { } void QtLoginWindow::bringToFront() { - if (isHidden()) { - showNormal(); - raise(); - activateWindow(); + if (!isVisible()) { + window()->showNormal(); + window()->raise(); + window()->activateWindow(); } else { - hide(); + window()->hide(); } } diff --git a/Swift/QtUI/QtLoginWindowFactory.cpp b/Swift/QtUI/QtLoginWindowFactory.cpp index 65edeb6..2ac3dec 100644 --- a/Swift/QtUI/QtLoginWindowFactory.cpp +++ b/Swift/QtUI/QtLoginWindowFactory.cpp @@ -21,7 +21,7 @@ LoginWindow* QtLoginWindowFactory::createLoginWindow(UIEventStream* uiEventStrea window_ = new QtLoginWindow(uiEventStream); if (splitter_) { splitter_->insertWidget(0, window_); - return window_; + //return window_; } connect(systemTray_, SIGNAL(clicked()), window_, SLOT(bringToFront())); QVariant loginWindowGeometryVariant = settings_->getQSettings()->value("loginWindowGeometry"); -- cgit v0.10.2-6-g49f6