electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 252cb491c889fb84df965f9aff87165e11c9b08e
parent 01108d8b47b24b05a54e5c45383d3f9e1dd4a232
Author: ThomasV <thomasv@electrum.org>
Date:   Fri,  6 Oct 2017 16:50:05 +0200

show message when copy button is pressed

Diffstat:
Mgui/qt/util.py | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gui/qt/util.py b/gui/qt/util.py @@ -531,8 +531,11 @@ class ButtonsWidget(QWidget): def addCopyButton(self, app): self.app = app - f = lambda: self.app.clipboard().setText(str(self.text())) - self.addButton(":icons/copy.png", f, _("Copy to clipboard")) + self.addButton(":icons/copy.png", self.on_copy, _("Copy to clipboard")) + + def on_copy(self): + self.app.clipboard().setText(self.text()) + QToolTip.showText(QCursor.pos(), _("Text copied to clipboard"), self) class ButtonsLineEdit(QLineEdit, ButtonsWidget): def __init__(self, text=None):