diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-22 15:53:45 +0300 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-02-22 15:53:45 +0300 |
commit | 99b3b752e3b8bf214347e316297e5fbd2fa83c92 (patch) | |
tree | 5c299537d5f829a08828fd176aa8c64e4e7323f2 /src/gui/sharedialog.cpp | |
parent | 28b694b17028665564b6d4640d0322fe225b0db0 (diff) |
Add theming options control sharing operations
Fixes #4325
Diffstat (limited to 'src/gui/sharedialog.cpp')
-rw-r--r-- | src/gui/sharedialog.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gui/sharedialog.cpp b/src/gui/sharedialog.cpp index e66b90c44..cfef4fa75 100644 --- a/src/gui/sharedialog.cpp +++ b/src/gui/sharedialog.cpp @@ -92,10 +92,11 @@ ShareDialog::ShareDialog(AccountPtr account, const QString &sharePath, const QSt return; } + auto theme = Theme::instance(); bool autoShare = true; // We only do user/group sharing from 8.2.0 - if (account->serverVersionInt() >= ((8 << 16) + (2 << 8))) { + if (theme->userGroupSharing() && account->serverVersionInt() >= ((8 << 16) + (2 << 8))) { _userGroupWidget = new ShareUserGroupWidget(account, sharePath, localPath, resharingAllowed, this); _ui->shareWidgetsLayout->addWidget(_userGroupWidget); @@ -112,9 +113,11 @@ ShareDialog::ShareDialog(AccountPtr account, const QString &sharePath, const QSt autoShare = false; } - _linkWidget = new ShareLinkWidget(account, sharePath, localPath, resharingAllowed, autoShare, this); - _linkWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); - _ui->shareWidgetsLayout->addWidget(_linkWidget); + if (theme->linkSharing()) { + _linkWidget = new ShareLinkWidget(account, sharePath, localPath, resharingAllowed, autoShare, this); + _linkWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); + _ui->shareWidgetsLayout->addWidget(_linkWidget); + } } ShareDialog::~ShareDialog() |