mirror of https://github.com/nextcloud/desktop
OS X: Finally(?) fix stay-on-top behaviour of settings dialog
Fixes #1795
This commit is contained in:
parent
4ff0e7e0a2
commit
faa502163e
|
@ -3,7 +3,7 @@
|
||||||
url = https://github.com/owncloud/documentation
|
url = https://github.com/owncloud/documentation
|
||||||
[submodule "src/3rdparty/qtmacgoodies"]
|
[submodule "src/3rdparty/qtmacgoodies"]
|
||||||
path = src/3rdparty/qtmacgoodies
|
path = src/3rdparty/qtmacgoodies
|
||||||
url = git://github.com/shadone/qtmacgoodies.git
|
url = git://github.com/guruz/qtmacgoodies.git
|
||||||
[submodule "binary"]
|
[submodule "binary"]
|
||||||
path = binary
|
path = binary
|
||||||
url = git://github.com/owncloud/owncloud-client-binary.git
|
url = git://github.com/owncloud/owncloud-client-binary.git
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit cf09d34dc7199538727e3d32a9b937ee73890027
|
Subproject commit fa067757146e768f31103160eb97991cd0186cf6
|
|
@ -45,6 +45,7 @@ if (APPLE)
|
||||||
list(APPEND 3rdparty_SRC
|
list(APPEND 3rdparty_SRC
|
||||||
3rdparty/qtmacgoodies/src/macpreferenceswindow.mm
|
3rdparty/qtmacgoodies/src/macpreferenceswindow.mm
|
||||||
3rdparty/qtmacgoodies/src/macstandardicon.mm
|
3rdparty/qtmacgoodies/src/macstandardicon.mm
|
||||||
|
3rdparty/qtmacgoodies/src/macwindow.mm
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#include "mirall/account.h"
|
#include "mirall/account.h"
|
||||||
#include "openfilemanager.h"
|
#include "openfilemanager.h"
|
||||||
#include "creds/abstractcredentials.h"
|
#include "creds/abstractcredentials.h"
|
||||||
|
#include "macwindow.h" // qtmacgoodies
|
||||||
|
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
@ -145,6 +146,14 @@ void ownCloudGui::slotTrayClicked( QSystemTrayIcon::ActivationReason reason )
|
||||||
if( reason == QSystemTrayIcon::Trigger ) {
|
if( reason == QSystemTrayIcon::Trigger ) {
|
||||||
slotOpenSettingsDialog(true); // start settings if config is existing.
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -504,6 +513,7 @@ void ownCloudGui::slotShowGuiMessage(const QString &title, const QString &messag
|
||||||
|
|
||||||
void ownCloudGui::slotShowSettings()
|
void ownCloudGui::slotShowSettings()
|
||||||
{
|
{
|
||||||
|
qDebug() << Q_FUNC_INFO;
|
||||||
if (_settingsDialog.isNull()) {
|
if (_settingsDialog.isNull()) {
|
||||||
_settingsDialog =
|
_settingsDialog =
|
||||||
#if defined(Q_OS_MAC)
|
#if defined(Q_OS_MAC)
|
||||||
|
@ -566,6 +576,11 @@ void ownCloudGui::raiseDialog( QWidget *raiseWidget )
|
||||||
raiseWidget->showNormal();
|
raiseWidget->showNormal();
|
||||||
raiseWidget->raise();
|
raiseWidget->raise();
|
||||||
raiseWidget->activateWindow();
|
raiseWidget->activateWindow();
|
||||||
|
|
||||||
|
#if defined(Q_OS_MAC)
|
||||||
|
// viel hilft viel ;-)
|
||||||
|
MacWindow::bringToFront(raiseWidget);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue