mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
UI: Allow folder expanding from button click #3585
This commit is contained in:
parent
ef607e29de
commit
15e4d9e317
2 changed files with 8 additions and 0 deletions
|
@ -128,6 +128,11 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent) :
|
||||||
ui->_folderList, SLOT(expand(const QModelIndex &)));
|
ui->_folderList, SLOT(expand(const QModelIndex &)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AccountSettings::doExpand()
|
||||||
|
{
|
||||||
|
ui->_folderList->expandToDepth(1);
|
||||||
|
}
|
||||||
|
|
||||||
void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
|
void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
|
||||||
{
|
{
|
||||||
QTreeView *tv = ui->_folderList;
|
QTreeView *tv = ui->_folderList;
|
||||||
|
@ -148,6 +153,8 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
|
||||||
menu->setAttribute(Qt::WA_DeleteOnClose);
|
menu->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
connect(menu->addAction(tr("Open folder")), SIGNAL(triggered(bool)),
|
connect(menu->addAction(tr("Open folder")), SIGNAL(triggered(bool)),
|
||||||
this, SLOT(slotOpenCurrentFolder()));
|
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)),
|
connect(menu->addAction(folderPaused ? tr("Resume sync") : tr("Pause sync")), SIGNAL(triggered(bool)),
|
||||||
this, SLOT(slotEnableCurrentFolder()));
|
this, SLOT(slotEnableCurrentFolder()));
|
||||||
connect(menu->addAction(tr("Remove sync")), SIGNAL(triggered(bool)),
|
connect(menu->addAction(tr("Remove sync")), SIGNAL(triggered(bool)),
|
||||||
|
|
|
@ -80,6 +80,7 @@ protected slots:
|
||||||
void slotDeleteAccount();
|
void slotDeleteAccount();
|
||||||
void refreshSelectiveSyncStatus();
|
void refreshSelectiveSyncStatus();
|
||||||
void slotCustomContextMenuRequested(const QPoint&);
|
void slotCustomContextMenuRequested(const QPoint&);
|
||||||
|
void doExpand();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void showConnectionLabel(const QString& message,
|
void showConnectionLabel(const QString& message,
|
||||||
|
|
Loading…
Reference in a new issue