mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
[GTKUI] Autofill infohash entry from clipboard
This commit is contained in:
parent
f57ee74ee2
commit
f739269dfd
1 changed files with 6 additions and 0 deletions
|
@ -738,6 +738,12 @@ class AddTorrentDialog(component.Component):
|
|||
dialog.set_default_response(gtk.RESPONSE_OK)
|
||||
dialog.set_transient_for(self.dialog)
|
||||
entry.grab_focus()
|
||||
|
||||
text = (gtk.clipboard_get(selection='PRIMARY').wait_for_text() or
|
||||
gtk.clipboard_get().wait_for_text()).strip()
|
||||
if len(text) == 40:
|
||||
entry.set_text(text)
|
||||
|
||||
dialog.show_all()
|
||||
response = dialog.run()
|
||||
infohash = entry.get_text().strip()
|
||||
|
|
Loading…
Add table
Reference in a new issue