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

Method __init__

src/bitmessageqt/__init__.py:576–805  ·  view source on GitHub ↗
(self, parent=None)

Source from the content-addressed store, hash-verified

574 treeWidget.setSortingEnabled(True)
575
576 def __init__(self, parent=None):
577 QtGui.QWidget.__init__(self, parent)
578 self.ui = Ui_MainWindow()
579 self.ui.setupUi(self)
580
581 # Ask the user if we may delete their old version 1 addresses if they
582 # have any.
583 for addressInKeysFile in getSortedAccounts():
584 status, addressVersionNumber, streamNumber, hash = decodeAddress(
585 addressInKeysFile)
586 if addressVersionNumber == 1:
587 displayMsg = _translate(
588 "MainWindow", "One of your addresses, %1, is an old version 1 address. Version 1 addresses are no longer supported. "
589 + "May we delete it now?").arg(addressInKeysFile)
590 reply = QtGui.QMessageBox.question(
591 self, 'Message', displayMsg, QtGui.QMessageBox.Yes, QtGui.QMessageBox.No)
592 if reply == QtGui.QMessageBox.Yes:
593 BMConfigParser().remove_section(addressInKeysFile)
594 BMConfigParser().save()
595
596 # Configure Bitmessage to start on startup (or remove the
597 # configuration) based on the setting in the keys.dat file
598 if 'win32' in sys.platform or 'win64' in sys.platform:
599 # Auto-startup for Windows
600 RUN_PATH = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run"
601 self.settings = QtCore.QSettings(RUN_PATH, QtCore.QSettings.NativeFormat)
602 self.settings.remove(
603 "PyBitmessage") # In case the user moves the program and the registry entry is no longer valid, this will delete the old registry entry.
604 if BMConfigParser().getboolean('bitmessagesettings', 'startonlogon'):
605 self.settings.setValue("PyBitmessage", sys.argv[0])
606 elif 'darwin' in sys.platform:
607 # startup for mac
608 pass
609 elif 'linux' in sys.platform:
610 # startup for linux
611 pass
612
613 # e.g. for editing labels
614 self.recurDepth = 0
615
616 # switch back to this when replying
617 self.replyFromTab = None
618
619 # so that quit won't loop
620 self.quitAccepted = False
621
622 self.init_file_menu()
623 self.init_inbox_popup_menu()
624 self.init_identities_popup_menu()
625 self.init_addressbook_popup_menu()
626 self.init_subscriptions_popup_menu()
627 self.init_chan_popup_menu()
628 self.init_sent_popup_menu()
629
630 # Initialize the user's list of addresses on the 'Chan' tab.
631 self.rerenderTabTreeChans()
632
633 # Initialize the user's list of addresses on the 'Messages' tab.

Callers 2

__init__Method · 0.45
__init__Method · 0.45

Calls 15

init_file_menuMethod · 0.95
init_inbox_popup_menuMethod · 0.95
init_chan_popup_menuMethod · 0.95
init_sent_popup_menuMethod · 0.95
rerenderTabTreeChansMethod · 0.95
rerenderAddressBookMethod · 0.95
rerenderSubscriptionsMethod · 0.95

Tested by

no test coverage detected