[Pkg-owncloud-commits] [owncloud-client] 13/115: OS X: Finally(?) fix stay-on-top behaviour of settings dialog

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri Aug 29 22:03:54 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit faa502163eb6b33af532148d215bfe4d3fb249be
Author: Markus Goetz <markus at woboq.com>
Date:   Tue Aug 12 14:47:43 2014 +0200

    OS X: Finally(?) fix stay-on-top behaviour of settings dialog
    
    Fixes #1795
---
 .gitmodules                |  2 +-
 src/3rdparty/qtmacgoodies  |  2 +-
 src/CMakeLists.txt         |  1 +
 src/mirall/owncloudgui.cpp | 15 +++++++++++++++
 4 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/.gitmodules b/.gitmodules
index 208d319..ffec181 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -3,7 +3,7 @@
 	url = https://github.com/owncloud/documentation
 [submodule "src/3rdparty/qtmacgoodies"]
 	path = src/3rdparty/qtmacgoodies
-	url = git://github.com/shadone/qtmacgoodies.git
+	url = git://github.com/guruz/qtmacgoodies.git
 [submodule "binary"]
 	path = binary
 	url = git://github.com/owncloud/owncloud-client-binary.git
diff --git a/src/3rdparty/qtmacgoodies b/src/3rdparty/qtmacgoodies
index cf09d34..fa06775 160000
--- a/src/3rdparty/qtmacgoodies
+++ b/src/3rdparty/qtmacgoodies
@@ -1 +1 @@
-Subproject commit cf09d34dc7199538727e3d32a9b937ee73890027
+Subproject commit fa067757146e768f31103160eb97991cd0186cf6
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ec15a25..837ab77 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -45,6 +45,7 @@ if (APPLE)
         list(APPEND 3rdparty_SRC
         3rdparty/qtmacgoodies/src/macpreferenceswindow.mm
         3rdparty/qtmacgoodies/src/macstandardicon.mm
+        3rdparty/qtmacgoodies/src/macwindow.mm
         )
 endif()
 
diff --git a/src/mirall/owncloudgui.cpp b/src/mirall/owncloudgui.cpp
index b21e472..1f49488 100644
--- a/src/mirall/owncloudgui.cpp
+++ b/src/mirall/owncloudgui.cpp
@@ -29,6 +29,7 @@
 #include "mirall/account.h"
 #include "openfilemanager.h"
 #include "creds/abstractcredentials.h"
+#include "macwindow.h" // qtmacgoodies
 
 #include <QDesktopServices>
 #include <QMessageBox>
@@ -145,6 +146,14 @@ void ownCloudGui::slotTrayClicked( QSystemTrayIcon::ActivationReason reason )
     if( reason == QSystemTrayIcon::Trigger ) {
         slotOpenSettingsDialog(true); // start settings if config is existing.
     }
+#else
+    // On Mac, if the settings dialog is already visible but hidden
+    // by other applications, this will bring it to the front.
+    if( reason == QSystemTrayIcon::Trigger ) {
+        if (!_settingsDialog.isNull() && _settingsDialog->isVisible()) {
+            slotShowSettings();
+        }
+    }
 #endif
 }
 
@@ -504,6 +513,7 @@ void ownCloudGui::slotShowGuiMessage(const QString &title, const QString &messag
 
 void ownCloudGui::slotShowSettings()
 {
+    qDebug() << Q_FUNC_INFO;
     if (_settingsDialog.isNull()) {
         _settingsDialog =
 #if defined(Q_OS_MAC)
@@ -566,6 +576,11 @@ void ownCloudGui::raiseDialog( QWidget *raiseWidget )
         raiseWidget->showNormal();
         raiseWidget->raise();
         raiseWidget->activateWindow();
+
+#if defined(Q_OS_MAC)
+        // viel hilft viel ;-)
+        MacWindow::bringToFront(raiseWidget);
+#endif
     }
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list