Browse Source

patch for windows

283
ThomasV 14 years ago
parent
commit
f2f01a0b9d
  1. 13
      client/gui.py

13
client/gui.py

@ -718,11 +718,20 @@ class BitcoinGUI:
button = gtk.Button("Copy to clipboard") button = gtk.Button("Copy to clipboard")
def copy2clipboard(w, treeview, liststore): def copy2clipboard(w, treeview, liststore):
import platform
path, col = treeview.get_cursor() path, col = treeview.get_cursor()
if path: if path:
address = liststore.get_value( liststore.get_iter(path), 0) address = liststore.get_value( liststore.get_iter(path), 0)
c = gtk.clipboard_get() if platform.system() == 'Windows':
c.set_text( address ) 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.connect("clicked", copy2clipboard, treeview, liststore)
button.show() button.show()
hbox.pack_start(button,False) hbox.pack_start(button,False)

Loading…
Cancel
Save