1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-27 01:57:52 +00:00

Qt: Use file selector in Set Location if session is local (#502)

It's the only place where Session::isServer() is used to decide if
a file selector should be used, or a text box. Session::isLocal()
is used everywhere else.

Co-authored-by: dubhater <cantabile.desu@gmail.com>
Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
This commit is contained in:
dubhater 2021-08-07 17:08:37 +03:00 committed by GitHub
parent 6f76d8fae7
commit f804043b85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,7 +46,7 @@ RelocateDialog::RelocateDialog(Session& session, TorrentModel const& model, torr
} }
else if (path != tor->getPath()) else if (path != tor->getPath())
{ {
if (session_.isServer()) if (session_.isLocal())
{ {
path = QDir::homePath(); path = QDir::homePath();
} }
@ -59,7 +59,7 @@ RelocateDialog::RelocateDialog(Session& session, TorrentModel const& model, torr
} }
} }
if (session_.isServer()) if (session_.isLocal())
{ {
ui_.newLocationStack->setCurrentWidget(ui_.newLocationButton); ui_.newLocationStack->setCurrentWidget(ui_.newLocationButton);
ui_.newLocationButton->setMode(PathButton::DirectoryMode); ui_.newLocationButton->setMode(PathButton::DirectoryMode);