From 77fca5a1c02f40a7d4998837d8dfe674e2118527 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Thu, 21 Jun 2007 07:49:15 +0000 Subject: [PATCH] automatically paste clipboard contents on 'add url' --- src/interface.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/interface.py b/src/interface.py index cd9715d9b..64b3be045 100644 --- a/src/interface.py +++ b/src/interface.py @@ -1086,6 +1086,9 @@ class DelugeGTK: entry = gtk.Entry() dlg.vbox.pack_start(label) dlg.vbox.pack_start(entry) + clip = gtk.clipboard_get(selection='PRIMARY') + text = clip.wait_for_text() + entry.set_text(text) dlg.show_all() result = dlg.run() url = entry.get_text()