"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/filebrowser/file-browser-dialog.cpp" between
seafile-client-7.0.4.tar.gz and seafile-client-7.0.5.tar.gz

About: Seafile (client) for the Seafile cloud storage system.

file-browser-dialog.cpp  (seafile-client-7.0.4):file-browser-dialog.cpp  (seafile-client-7.0.5)
skipping to change at line 200 skipping to change at line 200
connect(table_view_, SIGNAL(direntRemove(const SeafDirent&)), connect(table_view_, SIGNAL(direntRemove(const SeafDirent&)),
this, SLOT(onGetDirentRemove(const SeafDirent&))); this, SLOT(onGetDirentRemove(const SeafDirent&)));
connect(table_view_, SIGNAL(direntRemove(const QList<const SeafDirent*> &)), connect(table_view_, SIGNAL(direntRemove(const QList<const SeafDirent*> &)),
this, SLOT(onGetDirentRemove(const QList<const SeafDirent*> &))); this, SLOT(onGetDirentRemove(const QList<const SeafDirent*> &)));
connect(table_view_, SIGNAL(direntShare(const SeafDirent&)), connect(table_view_, SIGNAL(direntShare(const SeafDirent&)),
this, SLOT(onGetDirentShare(const SeafDirent&))); this, SLOT(onGetDirentShare(const SeafDirent&)));
connect(table_view_, SIGNAL(direntShareToUserOrGroup(const SeafDirent&, bool )), connect(table_view_, SIGNAL(direntShareToUserOrGroup(const SeafDirent&, bool )),
this, SLOT(onGetDirentShareToUserOrGroup(const SeafDirent&, bool))); this, SLOT(onGetDirentShareToUserOrGroup(const SeafDirent&, bool)));
connect(table_view_, SIGNAL(direntShareSeafile(const SeafDirent&)), connect(table_view_, SIGNAL(direntShareSeafile(const SeafDirent&)),
this, SLOT(onGetDirentShareSeafile(const SeafDirent&))); this, SLOT(onGetDirentShareSeafile(const SeafDirent&)));
connect(table_view_, SIGNAL(direntUploadLink(const SeafDirent&)),
this, SLOT(onGetDirentUploadLink(const SeafDirent&)));
connect(table_view_, SIGNAL(direntUpdate(const SeafDirent&)), connect(table_view_, SIGNAL(direntUpdate(const SeafDirent&)),
this, SLOT(onGetDirentUpdate(const SeafDirent&))); this, SLOT(onGetDirentUpdate(const SeafDirent&)));
connect(table_view_, SIGNAL(direntPaste()), connect(table_view_, SIGNAL(direntPaste()),
this, SLOT(onGetDirentsPaste())); this, SLOT(onGetDirentsPaste()));
connect(table_view_, SIGNAL(cancelDownload(const SeafDirent&)), connect(table_view_, SIGNAL(cancelDownload(const SeafDirent&)),
this, SLOT(onCancelDownload(const SeafDirent&))); this, SLOT(onCancelDownload(const SeafDirent&)));
connect(table_view_, SIGNAL(syncSubdirectory(const QString&)), connect(table_view_, SIGNAL(syncSubdirectory(const QString&)),
this, SLOT(onGetSyncSubdirectory(const QString &))); this, SLOT(onGetSyncSubdirectory(const QString &)));
connect(table_view_, SIGNAL(deleteLocalVersion(const SeafDirent&)), connect(table_view_, SIGNAL(deleteLocalVersion(const SeafDirent&)),
this, SLOT(onDeleteLocalVersion(const SeafDirent&))); this, SLOT(onDeleteLocalVersion(const SeafDirent&)));
skipping to change at line 1233 skipping to change at line 1235
void FileBrowserDialog::onGetDirentShareToUserOrGroup(const SeafDirent& dirent, void FileBrowserDialog::onGetDirentShareToUserOrGroup(const SeafDirent& dirent,
bool to_group) bool to_group)
{ {
PrivateShareDialog dialog(account_, repo_.id, repo_.name, PrivateShareDialog dialog(account_, repo_.id, repo_.name,
::pathJoin(current_path_, dirent.name), to_group, ::pathJoin(current_path_, dirent.name), to_group,
this); this);
dialog.exec(); dialog.exec();
} }
void FileBrowserDialog::onGetDirentUploadLink(const SeafDirent& dirent) {
QString repo_id = repo_.id;
QString path = ::pathJoin(current_path_, dirent.name);
if (dirent.isDir())
path += "/";
GetUploadLinkRequest *req = new GetUploadLinkRequest(account_, repo_id, path
);
connect(req, SIGNAL(success(const QString&)), this,
SLOT(onGetUploadLinkSuccess(const QString)));
connect(req, SIGNAL(failed(const ApiError&)), this,
SLOT(onGetUploadLinkFailed(const ApiError&)));
req->send();
}
void FileBrowserDialog::onGetUploadLinkSuccess(const QString& upload_link) {
SharedLinkDialog *dialog = new SharedLinkDialog(upload_link, NULL, false);
dialog->setAttribute(Qt::WA_DeleteOnClose);
dialog->show();
dialog->raise();
dialog->activateWindow();
}
void FileBrowserDialog::onGetUploadLinkFailed(const ApiError&) {
GetUploadLinkRequest *req = qobject_cast<GetUploadLinkRequest *>(sender());
const QString file = ::getBaseName(req->path());
seafApplet->messageBox(tr("Failed to get upload link information for file \"
%1\"").arg(file));
req->deleteLater();
}
void FileBrowserDialog::onGetDirentShareSeafile(const SeafDirent& dirent) void FileBrowserDialog::onGetDirentShareSeafile(const SeafDirent& dirent)
{ {
QString repo_id = repo_.id; QString repo_id = repo_.id;
QString email = account_.username; QString email = account_.username;
QString path = ::pathJoin(current_path_, dirent.name); QString path = ::pathJoin(current_path_, dirent.name);
if (dirent.isDir()) if (dirent.isDir())
path += "/"; path += "/";
GetSmartLinkRequest *req = new GetSmartLinkRequest(account_, repo_id, path, dirent.isDir()); GetSmartLinkRequest *req = new GetSmartLinkRequest(account_, repo_id, path, dirent.isDir());
connect(req, SIGNAL(success(const QString&, const QString&)), connect(req, SIGNAL(success(const QString&, const QString&)),
this, SLOT(onGetSmartLinkSuccess(const QString&, const QString&))); this, SLOT(onGetSmartLinkSuccess(const QString&, const QString&)));
 End of changes. 2 change blocks. 
0 lines changed or deleted 32 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)