summaryrefslogtreecommitdiffstats
path: root/deluge/ui/gtk3/mainwindow.py
diff options
context:
space:
mode:
Diffstat (limited to 'deluge/ui/gtk3/mainwindow.py')
-rw-r--r--deluge/ui/gtk3/mainwindow.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/deluge/ui/gtk3/mainwindow.py b/deluge/ui/gtk3/mainwindow.py
index b7d751410..d11ff317a 100644
--- a/deluge/ui/gtk3/mainwindow.py
+++ b/deluge/ui/gtk3/mainwindow.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
#
@@ -7,8 +6,6 @@
# See LICENSE for more details.
#
-from __future__ import unicode_literals
-
import logging
import os.path
from hashlib import sha1 as sha
@@ -45,7 +42,7 @@ if windowing('X11'):
log = logging.getLogger(__name__)
-class _GtkBuilderSignalsHolder(object):
+class _GtkBuilderSignalsHolder:
def connect_signals(self, mapping_or_class):
if isinstance(mapping_or_class, dict):
@@ -341,7 +338,9 @@ class MainWindow(component.Component):
return
self.previous_clipboard_text = text
if text and (
- (is_url(text) and text.endswith('.torrent')) or is_magnet(text)
+ (is_url(text) and text.endswith('.torrent'))
+ or is_magnet(text)
+ and not component.get('MenuBar').magnet_copied()
):
component.get('AddTorrentDialog').show()
component.get('AddTorrentDialog').on_button_url_clicked(window)