Merge pull request #121 from nextcloud/removes-logout-login-all-accounts

Removes 'Log in to all accounts' and 'Log out to all accounts' from the primary client menu.
This commit is contained in:
Roeland Jago Douma 2018-01-16 09:20:47 +01:00 committed by GitHub
commit 4e7c033ae5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -570,19 +570,12 @@ void ownCloudGui::updateContextMenu()
bool isConfigured = (!accountList.isEmpty());
bool atLeastOneConnected = false;
bool atLeastOneSignedOut = false;
bool atLeastOneSignedIn = false;
bool atLeastOnePaused = false;
bool atLeastOneNotPaused = false;
foreach (auto a, accountList) {
if (a->isConnected()) {
atLeastOneConnected = true;
}
if (a->isSignedOut()) {
atLeastOneSignedOut = true;
} else {
atLeastOneSignedIn = true;
}
}
foreach (auto f, FolderMan::instance()->map()) {
if (f->syncPaused()) {
@ -646,22 +639,6 @@ void ownCloudGui::updateContextMenu()
QAction *action = _contextMenu->addAction(text);
connect(action, &QAction::triggered, this, &ownCloudGui::slotPauseAllFolders);
}
if (atLeastOneSignedIn) {
if (accountList.count() > 1) {
_actionLogout->setText(tr("Log out of all accounts"));
} else {
_actionLogout->setText(tr("Log out"));
}
_contextMenu->addAction(_actionLogout);
}
if (atLeastOneSignedOut) {
if (accountList.count() > 1) {
_actionLogin->setText(tr("Log in to all accounts..."));
} else {
_actionLogin->setText(tr("Log in..."));
}
_contextMenu->addAction(_actionLogin);
}
_contextMenu->addAction(_actionQuit);
if (_qdbusmenuWorkaround) {