mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 05:15:40 +03:00
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:
commit
4e7c033ae5
1 changed files with 0 additions and 23 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue