diff options
author | Christian Kamm <mail@ckamm.de> | 2018-04-06 18:13:29 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-06-06 10:15:23 +0300 |
commit | 550b84503730af757a0c17827bc102aa3ff1723d (patch) | |
tree | 35a5d093a76ccb89d02b428229befb9de48a10c2 /src/gui/sharedialog.cpp | |
parent | d7ce92b017d064af35727284480869f4045704ed (diff) |
SocketApi/Sharing: Add "copy public link" to menu #6356
* The new menu option will fetch shares and create a new link share if
no "context menu share" currently exists.
* Various cleanup of common operations in socketapi happened as well,
in particular there's now FileData::get() that calculates all the
relevant paths that are useful for most socketapi actions.
Diffstat (limited to 'src/gui/sharedialog.cpp')
-rw-r--r-- | src/gui/sharedialog.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/sharedialog.cpp b/src/gui/sharedialog.cpp index 492971a72..1cca346f9 100644 --- a/src/gui/sharedialog.cpp +++ b/src/gui/sharedialog.cpp @@ -39,6 +39,7 @@ ShareDialog::ShareDialog(QPointer<AccountState> accountState, const QString &localPath, SharePermissions maxSharingPermissions, const QByteArray &numericFileId, + ShareDialogStartPage startPage, QWidget *parent) : QDialog(parent) , _ui(new Ui::ShareDialog) @@ -47,6 +48,7 @@ ShareDialog::ShareDialog(QPointer<AccountState> accountState, , _localPath(localPath) , _maxSharingPermissions(maxSharingPermissions) , _privateLinkUrl(accountState->account()->deprecatedPrivateLinkUrl(numericFileId).toString(QUrl::FullyEncoded)) + , _startPage(startPage) , _linkWidget(NULL) , _userGroupWidget(NULL) , _progressIndicator(NULL) @@ -218,6 +220,9 @@ void ShareDialog::showSharingUi() _linkWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); _ui->shareWidgets->addTab(_linkWidget, tr("Public Links")); _linkWidget->getShares(); + + if (_startPage == ShareDialogStartPage::PublicLinks) + _ui->shareWidgets->setCurrentWidget(_linkWidget); } } |