diff --git a/ChangeLog b/ChangeLog
index 02349fd52..996a3621e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
==== Core ====
* Fix not properly detecting when torrent is at end of queue
* #2049: Preserve order when moving multiple torrents in the queue
+ * Add move completed option to add torrent dialog
==== GtkUI ====
* Modified fix for #1957, keyerror with non-acsii columns
diff --git a/deluge/ui/gtkui/addtorrentdialog.py b/deluge/ui/gtkui/addtorrentdialog.py
index a26acf056..0f1dc56c3 100644
--- a/deluge/ui/gtkui/addtorrentdialog.py
+++ b/deluge/ui/gtkui/addtorrentdialog.py
@@ -142,7 +142,9 @@ class AddTorrentDialog(component.Component):
"max_download_speed_per_torrent",
"prioritize_first_last_pieces",
"download_location",
- "add_paused"
+ "add_paused",
+ "move_completed",
+ "move_completed_path"
]
self.core_config = {}
@@ -158,9 +160,13 @@ class AddTorrentDialog(component.Component):
if client.is_localhost():
self.glade.get_widget("button_location").show()
self.glade.get_widget("entry_download_path").hide()
+ self.glade.get_widget("button_move_completed_location").show()
+ self.glade.get_widget("entry_move_completed_path").hide()
else:
self.glade.get_widget("button_location").hide()
self.glade.get_widget("entry_download_path").show()
+ self.glade.get_widget("button_move_completed_location").hide()
+ self.glade.get_widget("entry_move_completed_path").show()
self.dialog.set_transient_for(component.get("MainWindow").window)
self.dialog.present()
@@ -366,9 +372,13 @@ class AddTorrentDialog(component.Component):
if client.is_localhost():
self.glade.get_widget("button_location").set_current_folder(
options["download_location"])
+ self.glade.get_widget("button_move_completed_location").set_current_folder(
+ options["move_completed_path"])
else:
self.glade.get_widget("entry_download_path").set_text(
options["download_location"])
+ self.glade.get_widget("entry_move_completed_path").set_text(
+ options["move_completed_path"])
self.glade.get_widget("radio_full").set_active(
not options["compact_allocation"])
@@ -386,6 +396,8 @@ class AddTorrentDialog(component.Component):
options["add_paused"])
self.glade.get_widget("chk_prioritize").set_active(
options["prioritize_first_last_pieces"])
+ self.glade.get_widget("chk_move_completed").set_active(
+ options["move_completed"])
def save_torrent_options(self, row=None):
# Keeps the torrent options dictionary up-to-date with what the user has
@@ -406,9 +418,13 @@ class AddTorrentDialog(component.Component):
if client.is_localhost():
options["download_location"] = \
self.glade.get_widget("button_location").get_filename()
+ options["move_completed_path"] = \
+ self.glade.get_widget("button_move_completed_location").get_filename()
else:
options["download_location"] = \
self.glade.get_widget("entry_download_path").get_text()
+ options["move_completed_path"] = \
+ self.glade.get_widget("entry_move_completed_path").get_text()
options["compact_allocation"] = \
self.glade.get_widget("radio_compact").get_active()
@@ -431,6 +447,8 @@ class AddTorrentDialog(component.Component):
self.glade.get_widget("chk_paused").get_active()
options["prioritize_first_last_pieces"] = \
self.glade.get_widget("chk_prioritize").get_active()
+ options["move_completed"] = \
+ self.glade.get_widget("chk_move_completed").get_active()
self.options[torrent_id] = options
@@ -456,9 +474,15 @@ class AddTorrentDialog(component.Component):
if client.is_localhost():
self.glade.get_widget("button_location").set_current_folder(
self.core_config["download_location"])
+ self.glade.get_widget("button_move_completed_location").set_current_folder(
+ self.core_config["move_completed_path"]
+ )
else:
self.glade.get_widget("entry_download_path").set_text(
self.core_config["download_location"])
+ self.glade.get_widget("entry_move_completed_path").set_text(
+ self.core_config["move_completed_path"]
+ )
self.glade.get_widget("radio_compact").set_active(
self.core_config["compact_allocation"])
@@ -476,6 +500,8 @@ class AddTorrentDialog(component.Component):
self.core_config["add_paused"])
self.glade.get_widget("chk_prioritize").set_active(
self.core_config["prioritize_first_last_pieces"])
+ self.glade.get_widget("chk_move_completed").set_active(
+ self.core_config["move_completed"])
def get_file_priorities(self, torrent_id):
# A list of priorities
diff --git a/deluge/ui/gtkui/glade/add_torrent_dialog.glade b/deluge/ui/gtkui/glade/add_torrent_dialog.glade
index 8273340c6..d5593f252 100644
--- a/deluge/ui/gtkui/glade/add_torrent_dialog.glade
+++ b/deluge/ui/gtkui/glade/add_torrent_dialog.glade
@@ -375,8 +375,8 @@
True
- True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ True
1
@@ -404,6 +404,79 @@
0
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 0
+ none
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ 5
+ 5
+ 5
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+
+
+ True
+ True
+ False
+ True
+
+
+ False
+ 0
+
+
+
+
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ True
+ select-folder
+ Select A Folder
+
+
+ 1
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ ●
+ True
+
+
+ 2
+
+
+
+
+
+
+
+
+ True
+ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ <b>Move Completed Location</b>
+ True
+
+
+ label_item
+
+
+
+
+ False
+ False
+ 1
+
+
True
@@ -715,7 +788,7 @@
False
False
- 1
+ 2
@@ -833,7 +906,7 @@
False
False
- 2
+ 3
@@ -1022,9 +1095,9 @@
True
True
True
- True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
True
+ True
1
@@ -1181,9 +1254,9 @@
True
True
True
- True
GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
True
+ True
1