Skip to content

Commit

Permalink
GUI: Change tray menu order owncloud#3657
Browse files Browse the repository at this point in the history
  • Loading branch information
guruz committed Sep 25, 2015
1 parent 7b97b96 commit 574c699
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src/gui/owncloudgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,18 +317,6 @@ void ownCloudGui::addAccountContextMenu(AccountStatePtr accountState, QMenu *men
actionOpenoC->setProperty(propertyAccountC, QVariant::fromValue(accountState->account()));
QObject::connect(actionOpenoC, SIGNAL(triggered(bool)), SLOT(slotOpenOwnCloud()));

if (separateMenu) {
if (accountState->isSignedOut()) {
QAction* signin = menu->addAction(tr("Log in..."));
signin->setProperty(propertyAccountC, QVariant::fromValue(accountState));
connect(signin, SIGNAL(triggered()), this, SLOT(slotLogin()));
} else {
QAction* signout = menu->addAction(tr("Log out"));
signout->setProperty(propertyAccountC, QVariant::fromValue(accountState));
connect(signout, SIGNAL(triggered()), this, SLOT(slotLogout()));
}
}

FolderMan *folderMan = FolderMan::instance();
bool firstFolder = true;
bool singleSyncFolder = folderMan->map().size() == 1 && Theme::instance()->singleSyncFolder();
Expand All @@ -355,6 +343,20 @@ void ownCloudGui::addAccountContextMenu(AccountStatePtr accountState, QMenu *men
_folderOpenActionMapper->setMapping( action, folder->alias() );
menu->addAction(action);
}

menu->addSeparator();
if (separateMenu) {
if (accountState->isSignedOut()) {
QAction* signin = menu->addAction(tr("Log in..."));
signin->setProperty(propertyAccountC, QVariant::fromValue(accountState));
connect(signin, SIGNAL(triggered()), this, SLOT(slotLogin()));
} else {
QAction* signout = menu->addAction(tr("Log out"));
signout->setProperty(propertyAccountC, QVariant::fromValue(accountState));
connect(signout, SIGNAL(triggered()), this, SLOT(slotLogout()));
}
}

}

void ownCloudGui::setupContextMenu()
Expand Down

0 comments on commit 574c699

Please sign in to comment.