mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
Account settings: Double click no longer open in the file browser #3585
Add a separate option in the context menu for it
This commit is contained in:
parent
5685aa7ff0
commit
6fcb48a0c7
2 changed files with 9 additions and 7 deletions
|
@ -102,7 +102,6 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent) :
|
|||
addAction(syncNowAction);
|
||||
|
||||
connect(ui->_folderList, SIGNAL(clicked(QModelIndex)), SLOT(slotFolderActivated(QModelIndex)));
|
||||
connect(ui->_folderList, SIGNAL(doubleClicked(QModelIndex)),SLOT(slotDoubleClicked(QModelIndex)));
|
||||
|
||||
connect(ui->selectiveSyncApply, SIGNAL(clicked()), _model, SLOT(slotApplySelectiveSync()));
|
||||
connect(ui->selectiveSyncCancel, SIGNAL(clicked()), _model, SLOT(resetFolders()));
|
||||
|
@ -161,6 +160,8 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
|
|||
this, SLOT(slotRemoveCurrentFolder()));
|
||||
connect(menu->addAction(folderPaused ? tr("Resume") : tr("Pause")), SIGNAL(triggered(bool)),
|
||||
this, SLOT(slotEnableCurrentFolder()));
|
||||
connect(menu->addAction(tr("Open folder in file browser")), SIGNAL(triggered(bool)),
|
||||
this, SLOT(slotOpenCurrentFolder()));
|
||||
menu->exec(tv->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
|
@ -296,14 +297,15 @@ void AccountSettings::slotResetCurrentFolder()
|
|||
}
|
||||
}
|
||||
|
||||
void AccountSettings::slotDoubleClicked( const QModelIndex& indx )
|
||||
void AccountSettings::slotOpenCurrentFolder()
|
||||
{
|
||||
if( ! indx.isValid() ) return;
|
||||
QString alias = _model->data( indx, FolderStatusDelegate::FolderAliasRole ).toString();
|
||||
if (alias.isEmpty()) return;
|
||||
QModelIndex selected = ui->_folderList->selectionModel()->currentIndex();
|
||||
|
||||
if( selected.isValid() ) {
|
||||
QString alias = _model->data( selected, FolderStatusDelegate::FolderAliasRole ).toString();
|
||||
emit openFolderAlias(alias);
|
||||
}
|
||||
}
|
||||
|
||||
void AccountSettings::showConnectionLabel( const QString& message, QStringList errors )
|
||||
{
|
||||
|
|
|
@ -65,7 +65,6 @@ signals:
|
|||
public slots:
|
||||
void slotFolderActivated( const QModelIndex& );
|
||||
void slotOpenOC();
|
||||
void slotDoubleClicked( const QModelIndex& );
|
||||
void slotUpdateQuota( qint64,qint64 );
|
||||
void slotAccountStateChanged(int state);
|
||||
|
||||
|
@ -77,6 +76,7 @@ protected slots:
|
|||
void slotSyncCurrentFolderNow();
|
||||
void slotRemoveCurrentFolder();
|
||||
void slotResetCurrentFolder();
|
||||
void slotOpenCurrentFolder();
|
||||
void slotFolderWizardAccepted();
|
||||
void slotFolderWizardRejected();
|
||||
void slotDeleteAccount();
|
||||
|
|
Loading…
Reference in a new issue