MCPcopy Index your code
hub / github.com/Bitmessage/PyBitmessage / click_pushButtonAddAddressBook

Method click_pushButtonAddAddressBook

src/bitmessageqt/__init__.py:2289–2310  ·  view source on GitHub ↗
(self, dialog=None)

Source from the content-addressed store, hash-verified

2287 self, BMConfigParser(), acct).exec_()
2288
2289 def click_pushButtonAddAddressBook(self, dialog=None):
2290 if not dialog:
2291 dialog = dialogs.AddAddressDialog(self)
2292 dialog.exec_()
2293 try:
2294 address, label = dialog.data
2295 except AttributeError:
2296 return
2297
2298 # First we must check to see if the address is already in the
2299 # address book. The user cannot add it again or else it will
2300 # cause problems when updating and deleting the entry.
2301 if shared.isAddressInMyAddressBook(address):
2302 self.updateStatusBar(_translate(
2303 "MainWindow",
2304 "Error: You cannot add the same address to your"
2305 " address book twice. Try renaming the existing one"
2306 " if you want."
2307 ))
2308 return
2309
2310 self.addEntryToAddressBook(address, label)
2311
2312 def addEntryToAddressBook(self, address, label):
2313 if shared.isAddressInMyAddressBook(address):

Calls 3

updateStatusBarMethod · 0.95
addEntryToAddressBookMethod · 0.95
_translateFunction · 0.90

Tested by

no test coverage detected