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

Method on_action_AddressBookSubscribe

src/bitmessageqt/__init__.py:3318–3336  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3316 )
3317
3318 def on_action_AddressBookSubscribe(self):
3319 listOfSelectedRows = {}
3320 for i in range(len(self.ui.tableWidgetAddressBook.selectedIndexes())):
3321 listOfSelectedRows[self.ui.tableWidgetAddressBook.selectedIndexes()[i].row()] = 0
3322 for currentRow in listOfSelectedRows:
3323 addressAtCurrentRow = str(self.ui.tableWidgetAddressBook.item(currentRow,1).text())
3324 # Then subscribe to it... provided it's not already in the address book
3325 if shared.isAddressInMySubscriptionsList(addressAtCurrentRow):
3326 self.updateStatusBar(_translate(
3327 "MainWindow",
3328 "Error: You cannot add the same address to your"
3329 " subscriptions twice. Perhaps rename the existing"
3330 " one if you want."))
3331 continue
3332 labelAtCurrentRow = self.ui.tableWidgetAddressBook.item(currentRow,0).text().toUtf8()
3333 self.addSubscription(addressAtCurrentRow, labelAtCurrentRow)
3334 self.ui.tabWidget.setCurrentIndex(
3335 self.ui.tabWidget.indexOf(self.ui.subscriptions)
3336 )
3337
3338 def on_context_menuAddressBook(self, point):
3339 self.popMenuAddressBook = QtGui.QMenu(self)

Callers

nothing calls this directly

Calls 3

updateStatusBarMethod · 0.95
addSubscriptionMethod · 0.95
_translateFunction · 0.90

Tested by

no test coverage detected