@@ -599,7 +599,6 @@ void ownCloudGui::updateContextMenu()
599
599
bool isConfigured = (!accountList.isEmpty ());
600
600
bool atLeastOneConnected = false ;
601
601
bool atLeastOnePaused = false ;
602
- bool atLeastOneNotPaused = false ;
603
602
for (const auto &a : accountList) {
604
603
if (a->isConnected ()) {
605
604
atLeastOneConnected = true ;
@@ -609,25 +608,24 @@ void ownCloudGui::updateContextMenu()
609
608
for (auto *f : FolderMan::instance ()->folders ()) {
610
609
if (f->syncPaused ()) {
611
610
atLeastOnePaused = true ;
612
- } else {
613
- atLeastOneNotPaused = true ;
614
611
}
615
612
}
616
613
617
614
_contextMenu->addAction (Theme::instance ()->applicationIcon (), tr (" Show %1" ).arg (Theme::instance ()->appNameGUI ()), this , &ownCloudGui::slotShowSettings);
618
615
_contextMenu->addSeparator ();
619
- if (atLeastOnePaused) {
620
- _contextMenu->addAction (
621
- tr (" Resume synchronization" ), this , [this ] { setPauseOnAllFoldersHelper (AccountManager::instance ()->accounts ().values (), false ); });
622
- } else {
623
- _contextMenu->addAction (
624
- tr (" Stop synchronization" ), this , [this ] { setPauseOnAllFoldersHelper (AccountManager::instance ()->accounts ().values (), true ); });
625
- }
626
- _contextMenu->addSeparator ();
627
616
628
617
if (accountList.isEmpty ()) {
629
618
_contextMenu->addAction (tr (" Create a new account" ), this , &ownCloudGui::runNewAccountWizard);
630
619
} else {
620
+ if (atLeastOnePaused) {
621
+ _contextMenu->addAction (
622
+ tr (" Resume synchronization" ), this , [this ] { setPauseOnAllFoldersHelper (AccountManager::instance ()->accounts ().values (), false ); });
623
+ } else {
624
+ _contextMenu->addAction (
625
+ tr (" Stop synchronization" ), this , [this ] { setPauseOnAllFoldersHelper (AccountManager::instance ()->accounts ().values (), true ); });
626
+ }
627
+ _contextMenu->addSeparator ();
628
+
631
629
// submenus for accounts
632
630
for (const auto &account : accountList) {
633
631
QMenu *accountMenu = new QMenu (account->account ()->displayName (), _contextMenu.data ());
0 commit comments