label_space_msg->setText(tr("(%1 left after torrent download)","e.g. (100MiB left after torrent download)").arg(misc::friendlyUnit(available-torrent_size)));
// Check if free space is sufficient
if(available>0){
if((unsignedlonglong)available>torrent_size){
// Space is sufficient
label_space_msg->setText(tr("(%1 left after torrent download)","e.g. (100MiB left after torrent download)").arg(misc::friendlyUnit(available-torrent_size)));
}else{
// Space is unsufficient
label_space_msg->setText("<font color=\"red\">"+tr("(%1 more are required to download)","e.g. (100MiB more are required to download)").arg(misc::friendlyUnit(torrent_size-available))+"</font>");
}
}else{
// Space is unsufficient
label_space_msg->setText("<font color=\"red\">"+tr("(%1 more are required to download)","e.g. (100MiB more are required to download)").arg(misc::friendlyUnit(torrent_size-available))+"</font>");
// Available disk space is unknown
label_space_msg->setText("");
}
}else{
// Available disk space is unknown
label_space_msg->setText("");
}
}
@ -389,25 +424,27 @@ public slots:
@@ -389,25 +424,27 @@ public slots:
QMessageBox::warning(0,tr("Seeding mode error"),tr("You chose to skip file checking. However, local files do not seem to exist in the current destionation folder. Please disable this feature or update the save path."));
@ -416,14 +453,19 @@ public slots:
@@ -416,14 +453,19 @@ public slots:
}
#endif
// Check if there is at least one selected file
if(allFiltered()){
if(!is_magnet&&allFiltered()){
QMessageBox::warning(0,tr("Invalid file selection"),tr("You must select at least one file in the torrent"));