Update disk space label after changing partition, closes #3309.

Conflicts:
	src/gui/addnewtorrentdialog.cpp
This commit is contained in:
Chocobo1
2015-06-28 15:57:40 +08:00
committed by sledgehammer999
parent 4d913d123c
commit 0bce0fc6c1

View File

@@ -313,7 +313,7 @@ void AddNewTorrentDialog::updateDiskSpaceLabel()
QString size_string = torrent_size ? misc::friendlyUnit(torrent_size) : QString(tr("Not Available", "This size is unavailable."));
size_string += " (";
size_string += tr("Disk space: %1").arg(misc::friendlyUnit(fsutils::freeDiskSpaceOnPath(
size_string += tr("Free disk space: %1").arg(misc::friendlyUnit(fsutils::freeDiskSpaceOnPath(
ui->save_path_combo->itemData(
ui->save_path_combo->currentIndex()).toString())));
size_string += ")";
@@ -329,6 +329,8 @@ void AddNewTorrentDialog::onSavePathChanged(int index)
// Remember index
m_oldIndex = index;
updateDiskSpaceLabel();
}
void AddNewTorrentDialog::browseButton_clicked()
@@ -379,8 +381,6 @@ void AddNewTorrentDialog::browseButton_clicked()
ui->save_path_combo->setCurrentIndex(m_oldIndex);
}
connect(ui->save_path_combo, SIGNAL(currentIndexChanged(int)), SLOT(onSavePathChanged(int)));
updateDiskSpaceLabel();
}
void AddNewTorrentDialog::relayout()