"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/filebrowser/file-table.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-table.cpp  (seafile-client-7.0.4):file-table.cpp  (seafile-client-7.0.5)
skipping to change at line 371 skipping to change at line 371
remove_action_ = new QAction(tr("&Delete"), this); remove_action_ = new QAction(tr("&Delete"), this);
connect(remove_action_, SIGNAL(triggered()), connect(remove_action_, SIGNAL(triggered()),
this, SLOT(onRemove())); this, SLOT(onRemove()));
// remove_action_->setShortcut(QKeySequence::Delete); // remove_action_->setShortcut(QKeySequence::Delete);
share_action_ = new QAction(tr("&Generate %1 Download Link").arg(getBrand()) , this); share_action_ = new QAction(tr("&Generate %1 Download Link").arg(getBrand()) , this);
connect(share_action_, SIGNAL(triggered()), connect(share_action_, SIGNAL(triggered()),
this, SLOT(onShare())); this, SLOT(onShare()));
share_action_->setShortcut(Qt::ALT + Qt::Key_G); share_action_->setShortcut(Qt::ALT + Qt::Key_G);
upload_link_action_ = new QAction(tr("&Generate %1 Upload Link").arg(getBran
d()), this);
connect(upload_link_action_, SIGNAL(triggered()),
this, SLOT(onGenUploadLink()));
upload_link_action_->setShortcut(Qt::ALT + Qt::Key_L);
share_to_user_action_ = new QAction(tr("Share to User"), this); share_to_user_action_ = new QAction(tr("Share to User"), this);
connect(share_to_user_action_, SIGNAL(triggered()), connect(share_to_user_action_, SIGNAL(triggered()),
this, SLOT(onShareToUser())); this, SLOT(onShareToUser()));
share_to_group_action_ = new QAction(tr("Share to Group"), this); share_to_group_action_ = new QAction(tr("Share to Group"), this);
connect(share_to_group_action_, SIGNAL(triggered()), connect(share_to_group_action_, SIGNAL(triggered()),
this, SLOT(onShareToGroup())); this, SLOT(onShareToGroup()));
share_seafile_action_ = new QAction(tr("G&enerate %1 Internal Link").arg(get Brand()), this); share_seafile_action_ = new QAction(tr("G&enerate %1 Internal Link").arg(get Brand()), this);
connect(share_seafile_action_, SIGNAL(triggered()), connect(share_seafile_action_, SIGNAL(triggered()),
this, SLOT(onShareSeafile())); this, SLOT(onShareSeafile()));
share_seafile_action_->setShortcut(Qt::ALT + Qt::Key_E); share_seafile_action_->setShortcut(Qt::ALT + Qt::Key_E);
if (parent_->repo_.encrypted) { if (parent_->repo_.encrypted) {
share_action_->setEnabled(false); share_action_->setEnabled(false);
upload_link_action_->setEnabled(false);
share_to_user_action_->setEnabled(false); share_to_user_action_->setEnabled(false);
share_to_group_action_->setEnabled(false); share_to_group_action_->setEnabled(false);
} }
update_action_ = new QAction(tr("&Update"), this); update_action_ = new QAction(tr("&Update"), this);
connect(update_action_, SIGNAL(triggered()), this, SLOT(onUpdate())); connect(update_action_, SIGNAL(triggered()), this, SLOT(onUpdate()));
update_action_->setShortcut(Qt::ALT + Qt::Key_U); update_action_->setShortcut(Qt::ALT + Qt::Key_U);
copy_action_ = new QAction(tr("&Copy"), this); copy_action_ = new QAction(tr("&Copy"), this);
connect(copy_action_, SIGNAL(triggered()), this, SLOT(onCopy())); connect(copy_action_, SIGNAL(triggered()), this, SLOT(onCopy()));
skipping to change at line 435 skipping to change at line 441
open_local_cache_folder_action_ = new QAction(tr("Open Local Cache Folder"), this); open_local_cache_folder_action_ = new QAction(tr("Open Local Cache Folder"), this);
connect(open_local_cache_folder_action_, SIGNAL(triggered()), connect(open_local_cache_folder_action_, SIGNAL(triggered()),
this, SLOT(onOpenLocalCacheFolder())); this, SLOT(onOpenLocalCacheFolder()));
context_menu_->addAction(retry_upload_cached_file_action_); context_menu_->addAction(retry_upload_cached_file_action_);
context_menu_->addAction(delete_local_version_action_); context_menu_->addAction(delete_local_version_action_);
context_menu_->addAction(local_version_saveas_action_); context_menu_->addAction(local_version_saveas_action_);
context_menu_->addSeparator(); context_menu_->addSeparator();
context_menu_->addAction(saveas_action_); context_menu_->addAction(saveas_action_);
context_menu_->addAction(share_action_); context_menu_->addAction(share_action_);
context_menu_->addAction(upload_link_action_);
context_menu_->addAction(share_seafile_action_); context_menu_->addAction(share_seafile_action_);
context_menu_->addAction(share_to_user_action_); context_menu_->addAction(share_to_user_action_);
context_menu_->addAction(share_to_group_action_); context_menu_->addAction(share_to_group_action_);
context_menu_->addSeparator(); context_menu_->addSeparator();
context_menu_->addAction(move_action_); context_menu_->addAction(move_action_);
context_menu_->addAction(copy_action_); context_menu_->addAction(copy_action_);
context_menu_->addAction(paste_action_); context_menu_->addAction(paste_action_);
context_menu_->addSeparator(); context_menu_->addSeparator();
context_menu_->addAction(lock_action_); context_menu_->addAction(lock_action_);
context_menu_->addAction(rename_action_); context_menu_->addAction(rename_action_);
skipping to change at line 553 skipping to change at line 560
break; break;
} }
} }
saveas_action_->setText(tr("&Save As To...")); saveas_action_->setText(tr("&Save As To..."));
saveas_action_->setVisible(true); saveas_action_->setVisible(true);
saveas_action_->setEnabled(!has_dir); saveas_action_->setEnabled(!has_dir);
lock_action_->setVisible(false); lock_action_->setVisible(false);
rename_action_->setVisible(false); rename_action_->setVisible(false);
share_action_->setVisible(false); share_action_->setVisible(false);
upload_link_action_->setVisible(false);
share_seafile_action_->setVisible(false); share_seafile_action_->setVisible(false);
share_to_user_action_->setVisible(false); share_to_user_action_->setVisible(false);
share_to_group_action_->setVisible(false); share_to_group_action_->setVisible(false);
// update_action_->setVisible(false); // update_action_->setVisible(false);
cancel_download_action_->setVisible(false); cancel_download_action_->setVisible(false);
sync_subdirectory_action_->setVisible(false); sync_subdirectory_action_->setVisible(false);
context_menu_->exec(position); context_menu_->exec(position);
return; return;
skipping to change at line 601 skipping to change at line 609
remove_action_->setEnabled(true); remove_action_->setEnabled(true);
} }
if (item_->isDir()) { if (item_->isDir()) {
lock_action_->setVisible(false); lock_action_->setVisible(false);
// update_action_->setVisible(false); // update_action_->setVisible(false);
saveas_action_->setEnabled(false); saveas_action_->setEnabled(false);
sync_subdirectory_action_->setVisible(true); sync_subdirectory_action_->setVisible(true);
share_to_user_action_->setVisible(true); share_to_user_action_->setVisible(true);
share_to_group_action_->setVisible(true); share_to_group_action_->setVisible(true);
upload_link_action_->setVisible(true);
} else { } else {
if (item_->locked_by_me) { if (item_->locked_by_me) {
lock_action_->setText(tr("Un&lock")); lock_action_->setText(tr("Un&lock"));
lock_action_->setVisible(true); lock_action_->setVisible(true);
move_action_->setEnabled(true); move_action_->setEnabled(true);
remove_action_->setEnabled(true); remove_action_->setEnabled(true);
rename_action_->setEnabled(true); rename_action_->setEnabled(true);
} else if (item_->is_locked || item_->readonly) { } else if (item_->is_locked || item_->readonly) {
lock_action_->setVisible(false); lock_action_->setVisible(false);
move_action_->setEnabled(false); move_action_->setEnabled(false);
skipping to change at line 626 skipping to change at line 635
move_action_->setEnabled(true); move_action_->setEnabled(true);
remove_action_->setEnabled(true); remove_action_->setEnabled(true);
rename_action_->setEnabled(true); rename_action_->setEnabled(true);
} }
// update_action_->setVisible(true); // update_action_->setVisible(true);
saveas_action_->setEnabled(true); saveas_action_->setEnabled(true);
sync_subdirectory_action_->setVisible(false); sync_subdirectory_action_->setVisible(false);
share_to_user_action_->setVisible(false); share_to_user_action_->setVisible(false);
share_to_group_action_->setVisible(false); share_to_group_action_->setVisible(false);
upload_link_action_->setVisible(false);
if (TransferManager::instance()->getDownloadTask(parent_->repo_.id, if (TransferManager::instance()->getDownloadTask(parent_->repo_.id,
::pathJoin(parent_->current_path_, dirent->name))) { ::pathJoin(parent_->current_path_, dirent->name))) {
cancel_download_action_->setVisible(true); cancel_download_action_->setVisible(true);
saveas_action_->setVisible(false); saveas_action_->setVisible(false);
} }
} }
if (!parent_->account_.isPro() || if (!parent_->account_.isPro() ||
parent_->repo_.owner != parent_->account_.username) { parent_->repo_.owner != parent_->account_.username) {
skipping to change at line 778 skipping to change at line 788
{ {
if (item_ == NULL) { if (item_ == NULL) {
const SeafDirent *selected_item = getSelectedItemFromSource(); const SeafDirent *selected_item = getSelectedItemFromSource();
if (selected_item && selected_item->isFile()) if (selected_item && selected_item->isFile())
emit direntShare(*selected_item); emit direntShare(*selected_item);
return; return;
} }
emit direntShare(*item_); emit direntShare(*item_);
} }
void FileTableView::onGenUploadLink()
{
if (item_ == NULL) {
const SeafDirent *selected_item = getSelectedItemFromSource();
if (selected_item && selected_item->isDir())
emit direntUploadLink(*selected_item);
return;
}
emit direntUploadLink(*item_);
}
void FileTableView::onShareToUser() void FileTableView::onShareToUser()
{ {
onShareToUserOrGroup(false); onShareToUserOrGroup(false);
} }
void FileTableView::onShareToGroup() void FileTableView::onShareToGroup()
{ {
onShareToUserOrGroup(true); onShareToUserOrGroup(true);
} }
 End of changes. 7 change blocks. 
0 lines changed or deleted 22 lines changed or added

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