summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtLoginWindow.cpp11
-rw-r--r--Swift/QtUI/QtLoginWindow.h1
-rw-r--r--Swift/QtUI/QtLoginWindowFactory.cpp2
3 files changed, 13 insertions, 1 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp
index 2a25420..9694364 100644
--- a/Swift/QtUI/QtLoginWindow.cpp
+++ b/Swift/QtUI/QtLoginWindow.cpp
@@ -169,4 +169,15 @@ void QtLoginWindow::setMessage(const String& message) {
}
}
+void QtLoginWindow::bringToFront() {
+ if (isHidden()) {
+ showNormal();
+ raise();
+ activateWindow();
+ }
+ else {
+ hide();
+ }
+}
+
}
diff --git a/Swift/QtUI/QtLoginWindow.h b/Swift/QtUI/QtLoginWindow.h
index 1c156db..144f212 100644
--- a/Swift/QtUI/QtLoginWindow.h
+++ b/Swift/QtUI/QtLoginWindow.h
@@ -29,6 +29,7 @@ namespace Swift {
void handleCertficateChecked(bool);
void handleQuit();
void handleAbout();
+ void bringToFront();
private:
void setInitialMenus();
diff --git a/Swift/QtUI/QtLoginWindowFactory.cpp b/Swift/QtUI/QtLoginWindowFactory.cpp
index c150892..2405dd6 100644
--- a/Swift/QtUI/QtLoginWindowFactory.cpp
+++ b/Swift/QtUI/QtLoginWindowFactory.cpp
@@ -13,7 +13,7 @@ LoginWindow* QtLoginWindowFactory::createLoginWindow(const String& defaultJID, c
if (splitter_) {
splitter_->insertWidget(0, window);
}
- connect(systemTray_, SIGNAL(clicked()), window, SLOT(show()));
+ connect(systemTray_, SIGNAL(clicked()), window, SLOT(bringToFront()));
return window;
}
}