From a18bdcf7cd94b6aa416e613eee466e312208f320 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 6 Oct 2012 22:54:33 +0100 Subject: [PATCH] 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(). Conflicts: deluge/ui/gtkui/addtorrentdialog.py --- deluge/plugins/Extractor/deluge/plugins/extractor/gtkui.py | 2 +- deluge/ui/gtkui/addtorrentdialog.py | 2 +- deluge/ui/gtkui/options_tab.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deluge/plugins/Extractor/deluge/plugins/extractor/gtkui.py b/deluge/plugins/Extractor/deluge/plugins/extractor/gtkui.py index 06cff1b6b..6f0469200 100644 --- a/deluge/plugins/Extractor/deluge/plugins/extractor/gtkui.py +++ b/deluge/plugins/Extractor/deluge/plugins/extractor/gtkui.py @@ -68,7 +68,7 @@ class GtkUI(GtkPluginBase): def on_apply_prefs(self): log.debug("applying prefs for Extractor") if client.is_localhost(): - path = self.glade.get_widget("folderchooser_path").get_current_folder() + path = self.glade.get_widget("folderchooser_path").get_filename() else: path = self.glade.get_widget("entry_path").get_text() diff --git a/deluge/ui/gtkui/addtorrentdialog.py b/deluge/ui/gtkui/addtorrentdialog.py index 2e9fd5df5..55610b9e6 100644 --- a/deluge/ui/gtkui/addtorrentdialog.py +++ b/deluge/ui/gtkui/addtorrentdialog.py @@ -418,7 +418,7 @@ class AddTorrentDialog(component.Component): if client.is_localhost(): options["download_location"] = \ - self.builder.get_object("button_location").get_current_folder() + self.builder.get_object("button_location").get_filename() else: options["download_location"] = \ self.builder.get_object("entry_download_path").get_text() diff --git a/deluge/ui/gtkui/options_tab.py b/deluge/ui/gtkui/options_tab.py index 8e8d9fe0a..746d361f5 100644 --- a/deluge/ui/gtkui/options_tab.py +++ b/deluge/ui/gtkui/options_tab.py @@ -250,7 +250,7 @@ class OptionsTab(Tab): ) if self.chk_move_completed.get_active(): if client.is_localhost(): - path = self.filechooser_move_completed.get_current_folder() + path = self.filechooser_move_completed.get_filename() else: path = self.entry_move_completed.get_text() client.core.set_torrent_move_completed_path(self.prev_torrent_id, path)