From f2f01a0b9d0d8a4db414cfeb74249a57ad0e31c6 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 14 Nov 2011 00:20:49 +0100 Subject: [PATCH] patch for windows --- client/gui.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/client/gui.py b/client/gui.py index 35db3a1cb..2ac047eff 100644 --- a/client/gui.py +++ b/client/gui.py @@ -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)