Fix #2169 : Add Torrent Dialog 'Download Location' not set correctly when folder typed into Other->Location field
Using get_current_folder() in the file chooser will use the default folder when a folder path has been typed into the Location field rather than selected with mouse. The solution is to replace it with get_filename().
This commit is contained in:
parent
e5f56e2fdd
commit
aa969fd830
|
@ -65,7 +65,7 @@ class GtkUI(GtkPluginBase):
|
||||||
def on_apply_prefs(self):
|
def on_apply_prefs(self):
|
||||||
log.debug("applying prefs for Extractor")
|
log.debug("applying prefs for Extractor")
|
||||||
if client.is_localhost():
|
if client.is_localhost():
|
||||||
path = self.glade.get_widget("folderchooser_path").get_current_folder()
|
path = self.glade.get_widget("folderchooser_path").get_filename()
|
||||||
else:
|
else:
|
||||||
path = self.glade.get_widget("entry_path").get_text()
|
path = self.glade.get_widget("entry_path").get_text()
|
||||||
|
|
||||||
|
|
|
@ -405,7 +405,7 @@ class AddTorrentDialog(component.Component):
|
||||||
|
|
||||||
if client.is_localhost():
|
if client.is_localhost():
|
||||||
options["download_location"] = \
|
options["download_location"] = \
|
||||||
self.glade.get_widget("button_location").get_current_folder()
|
self.glade.get_widget("button_location").get_filename()
|
||||||
else:
|
else:
|
||||||
options["download_location"] = \
|
options["download_location"] = \
|
||||||
self.glade.get_widget("entry_download_path").get_text()
|
self.glade.get_widget("entry_download_path").get_text()
|
||||||
|
|
|
@ -179,7 +179,7 @@ class OptionsTab(Tab):
|
||||||
client.core.set_torrent_move_completed(self.prev_torrent_id, self.chk_move_completed.get_active())
|
client.core.set_torrent_move_completed(self.prev_torrent_id, self.chk_move_completed.get_active())
|
||||||
if self.chk_move_completed.get_active():
|
if self.chk_move_completed.get_active():
|
||||||
if client.is_localhost():
|
if client.is_localhost():
|
||||||
path = self.filechooser_move_completed.get_current_folder()
|
path = self.filechooser_move_completed.get_filename()
|
||||||
else:
|
else:
|
||||||
path = self.entry_move_completed.get_text()
|
path = self.entry_move_completed.get_text()
|
||||||
client.core.set_torrent_move_completed_path(self.prev_torrent_id, path)
|
client.core.set_torrent_move_completed_path(self.prev_torrent_id, path)
|
||||||
|
|
Loading…
Reference in New Issue