UI: Allow folder expanding from button click #3585

This commit is contained in:
Markus Goetz 2015-09-15 21:07:04 -04:00
parent ef607e29de
commit 15e4d9e317
2 changed files with 8 additions and 0 deletions

View file

@ -128,6 +128,11 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent) :
ui->_folderList, SLOT(expand(const QModelIndex &)));
}
void AccountSettings::doExpand()
{
ui->_folderList->expandToDepth(1);
}
void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
{
QTreeView *tv = ui->_folderList;
@ -148,6 +153,8 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
menu->setAttribute(Qt::WA_DeleteOnClose);
connect(menu->addAction(tr("Open folder")), SIGNAL(triggered(bool)),
this, SLOT(slotOpenCurrentFolder()));
connect(menu->addAction(tr("Choose What to Sync")), SIGNAL(triggered(bool)),
this, SLOT(doExpand()));
connect(menu->addAction(folderPaused ? tr("Resume sync") : tr("Pause sync")), SIGNAL(triggered(bool)),
this, SLOT(slotEnableCurrentFolder()));
connect(menu->addAction(tr("Remove sync")), SIGNAL(triggered(bool)),

View file

@ -80,6 +80,7 @@ protected slots:
void slotDeleteAccount();
void refreshSelectiveSyncStatus();
void slotCustomContextMenuRequested(const QPoint&);
void doExpand();
private:
void showConnectionLabel(const QString& message,