summaryrefslogtreecommitdiffstats
path: root/deluge/ui/gtkui/addtorrentdialog.py
diff options
context:
space:
mode:
Diffstat (limited to 'deluge/ui/gtkui/addtorrentdialog.py')
-rw-r--r--deluge/ui/gtkui/addtorrentdialog.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/deluge/ui/gtkui/addtorrentdialog.py b/deluge/ui/gtkui/addtorrentdialog.py
index 06bdd6c90..13ac640d6 100644
--- a/deluge/ui/gtkui/addtorrentdialog.py
+++ b/deluge/ui/gtkui/addtorrentdialog.py
@@ -180,7 +180,11 @@ class AddTorrentDialog(component.Component):
self.builder.get_object("button_move_completed_location").hide()
self.builder.get_object("entry_move_completed_path").show()
- self.dialog.set_transient_for(component.get("MainWindow").window)
+ if component.get("MainWindow").is_on_active_workspace():
+ self.dialog.set_transient_for(component.get("MainWindow").window)
+ else:
+ self.dialog.set_transient_for(None)
+
self.dialog.present()
if focus:
self.dialog.window.focus()
@@ -690,8 +694,7 @@ class AddTorrentDialog(component.Component):
# Create a tmp file path
import tempfile
- import os.path
- tmp_file = os.path.join(tempfile.gettempdir(), url.split("/")[-1])
+ (tmp_handle, tmp_file) = tempfile.mkstemp()
def on_part(data, current_length, total_length):
if total_length: