]> dgit.raspbian.org Git - nextcloud-desktop.git/commitdiff
Auto Start: Only set on first account setup, not all later ones
authorMarkus Goetz <markus@woboq.com>
Tue, 11 Oct 2016 18:28:14 +0000 (20:28 +0200)
committerMarkus Goetz <markus@woboq.com>
Tue, 11 Oct 2016 18:28:14 +0000 (20:28 +0200)
src/gui/application.cpp

index c05b651bf9fadb6b30066fe5655db0e96e8d3017..509549218b9062d73ed6be43584b72abb122e050 100644 (file)
@@ -336,8 +336,13 @@ void Application::slotownCloudWizardDone( int res )
         _checkConnectionTimer.start();
         slotCheckConnection();
 
-        // The very first time an account is configured: enabled autostart
-        // TODO: Doing this every time the account wizard finishes will annoy users.
+        // If one account is configured: enable autostart
+        bool shouldSetAutoStart = (accountMan->accounts().size() == 1);
+#ifdef Q_OS_MAC
+        // Don't auto start when not being 'installed'
+        shouldSetAutoStart = shouldSetAutoStart
+                && QCoreApplication::applicationDirPath().startsWith("/Applications/");
+#endif
         Utility::setLaunchOnStartup(_theme->appName(), _theme->appNameGUI(), true);
     }
 }