Browse Source

Merge pull request #516 from imrehg/contacts

Access the "New Contact" menuitem in the contact list context menu
master
ThomasV 12 years ago
parent
commit
9c144c11ef
  1. 6
      gui/qt/main_window.py

6
gui/qt/main_window.py

@ -1217,12 +1217,14 @@ class ElectrumWindow(QMainWindow):
def create_contact_menu(self, position):
item = self.contacts_list.itemAt(position)
if not item: return
menu = QMenu()
if not item:
menu.addAction(_("New contact"), lambda: self.new_contact_dialog())
else:
addr = unicode(item.text(0))
label = unicode(item.text(1))
is_editable = item.data(0,32).toBool()
payto_addr = item.data(0,33).toString()
menu = QMenu()
menu.addAction(_("Copy to Clipboard"), lambda: self.app.clipboard().setText(addr))
menu.addAction(_("Pay to"), lambda: self.payto(payto_addr))
menu.addAction(_("QR code"), lambda: self.show_qrcode("bitcoin:" + addr, _("Address")))

Loading…
Cancel
Save