mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 17:31:36 +00:00
patch for windows
This commit is contained in:
parent
c92875a6d5
commit
f2f01a0b9d
1 changed files with 11 additions and 2 deletions
|
@ -718,11 +718,20 @@ class BitcoinGUI:
|
|||
|
||||
button = gtk.Button("Copy to clipboard")
|
||||
def copy2clipboard(w, treeview, liststore):
|
||||
import platform
|
||||
path, col = treeview.get_cursor()
|
||||
if path:
|
||||
address = liststore.get_value( liststore.get_iter(path), 0)
|
||||
c = gtk.clipboard_get()
|
||||
c.set_text( address )
|
||||
if platform.system() == 'Windows':
|
||||
from Tkinter import Tk
|
||||
r = Tk()
|
||||
r.withdraw()
|
||||
r.clipboard_clear()
|
||||
r.clipboard_append( address )
|
||||
r.destroy()
|
||||
else:
|
||||
c = gtk.clipboard_get()
|
||||
c.set_text( address )
|
||||
button.connect("clicked", copy2clipboard, treeview, liststore)
|
||||
button.show()
|
||||
hbox.pack_start(button,False)
|
||||
|
|
Loading…
Add table
Reference in a new issue