зеркало из https://github.com/nextcloud/desktop.git
OS X: Finally(?) fix stay-on-top behaviour of settings dialog
Fixes #1795
This commit is contained in:
Родитель
4ff0e7e0a2
Коммит
faa502163e
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit cf09d34dc7199538727e3d32a9b937ee73890027
|
||||
Subproject commit fa067757146e768f31103160eb97991cd0186cf6
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче