Kaynağa Gözat

Double-clicking tray icon opens currently-selected user's local folder (if available)

Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
Claudio Cambra 3 yıl önce
ebeveyn
işleme
2b598d1820
2 değiştirilmiş dosya ile 6 ekleme ve 2 silme
  1. 3 1
      doc/visualtour.rst
  2. 3 1
      src/gui/owncloudgui.cpp

+ 3 - 1
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
+   :alt: shared dialog sharing options

+ 3 - 1
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) {