From 2b598d1820b2a612cacc332424c72f72e2c42458 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Mon, 25 Jul 2022 13:43:54 +0200 Subject: [PATCH] Double-clicking tray icon opens currently-selected user's local folder (if available) Signed-off-by: Claudio Cambra --- doc/visualtour.rst | 4 +++- src/gui/owncloudgui.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/visualtour.rst b/doc/visualtour.rst index 05d42e725..4081dea17 100644 --- a/doc/visualtour.rst +++ b/doc/visualtour.rst @@ -30,6 +30,8 @@ A right click on the icon provides the following menu: .. NOTE:: This menu is not available on macOS. +A double-click on the icon will open the currently-selected user's locally synced folder. + Settings ~~~~~~~~ @@ -298,4 +300,4 @@ You can now share a file directly in a conversation in Talk and view the sharee | .. image:: images/share-dialog-view-profile.png - :alt: shared dialog sharing options \ No newline at end of file + :alt: shared dialog sharing options diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index 97a26afa4..db4d4e3c6 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -159,7 +159,9 @@ void ownCloudGui::slotOpenMainDialog() void ownCloudGui::slotTrayClicked(QSystemTrayIcon::ActivationReason reason) { - if (reason == QSystemTrayIcon::Trigger) { + if (reason == QSystemTrayIcon::DoubleClick && UserModel::instance()->currentUser()->hasLocalFolder()) { + UserModel::instance()->openCurrentAccountLocalFolder(); + } else if (reason == QSystemTrayIcon::Trigger) { if (OwncloudSetupWizard::bringWizardToFrontIfVisible()) { // brought wizard to front } else if (_shareDialogs.size() > 0) {