Changes 'Allow editing' for file sharing to a checkbox instead of a radiobutton.

Signed-off-by: Camila San <hello@camila.codes>
This commit is contained in:
Camila San 2018-08-19 11:11:25 +02:00
parent ff9177edc3
commit 8f7bc8cff9
No known key found for this signature in database
GPG key ID: 7A4A6121E88E2AD4

View file

@ -173,12 +173,15 @@ void ShareLinkWidget::slotSharesFetched(const QList<QSharedPointer<Share>> &shar
SharePermissions perm = _linkShare->getPermissions();
QActionGroup *permissionsGroup = new QActionGroup(this);
// Prepare sharing menu
_linkContextMenu = new QMenu(this);
// radio button style
permissionsGroup->setExclusive(true);
if(_isFile){
checked = perm & (SharePermissionRead & SharePermissionUpdate);
_allowEditingLinkAction = permissionsGroup->addAction(tr("Allow Editing"));
_allowEditingLinkAction = _linkContextMenu->addAction(tr("Allow Editing"));
_allowEditingLinkAction->setCheckable(true);
_allowEditingLinkAction->setChecked(checked);
@ -202,9 +205,6 @@ void ShareLinkWidget::slotSharesFetched(const QList<QSharedPointer<Share>> &shar
_allowUploadLinkAction->setChecked(checked);
}
// Prepare sharing menu
_linkContextMenu = new QMenu(this);
// Add copy action (icon only)
_copyLinkAction = _linkContextMenu->addAction(QIcon(":/client/resources/copy.svg"),
tr("Copy link"));