Exemple #1
0
 def __init__(self, config, network, plugins):
     set_language(config.get('language'))
     self.network = network
     self.config = config
     self.plugins = plugins
     self.windows = []
     self.efilter = OpenFileEventFilter(self.windows)
     self.app = QApplication(sys.argv)
     self.app.installEventFilter(self.efilter)
     self.timer = Timer()
     # shared objects
     self.invoices = InvoiceStore(self.config)
     self.contacts = Contacts(self.config)
     # init tray
     self.dark_icon = self.config.get("dark_icon", False)
     self.tray = QSystemTrayIcon(self.tray_icon(), None)
     self.tray.setToolTip('Electrum-GMC')
     self.tray.activated.connect(self.tray_activated)
     self.build_tray_menu()
     self.tray.show()
     self.app.connect(self.app, QtCore.SIGNAL('new_window'), self.start_new_window)
Exemple #2
0
    def init_ui(self):
        ''' Initialize The Ux part of electrum. This function performs the basic
        tasks of setting up the ui.
        '''
        from weakref import ref
        set_language(self.electrum_config.get('language'))

        self.funds_error = False
        # setup UX
        self.screens = {}

        #setup lazy imports for mainscreen
        Factory.register('AnimatedPopup',
                         module='electrum_gmc_gui.kivy.uix.dialogs')
        Factory.register('QRCodeWidget',
                         module='electrum_gmc_gui.kivy.uix.qrcodewidget')

        # preload widgets. Remove this if you want to load the widgets on demand
        #Cache.append('electrum_gmc_widgets', 'AnimatedPopup', Factory.AnimatedPopup())
        #Cache.append('electrum_gmc_widgets', 'QRCodeWidget', Factory.QRCodeWidget())

        # load and focus the ui
        self.root.manager = self.root.ids['manager']
        self.recent_activity_card = None
        self.history_screen = None
        self.contacts_screen = None

        self.icon = "icons/electrum-gmc.png"

        # connect callbacks
        if self.network:
            self.network.register_callback('updated',
                                           self._trigger_update_wallet)
            self.network.register_callback('status',
                                           self._trigger_update_status)
            self.network.register_callback('new_transaction',
                                           self._trigger_notify_transactions)

        self.wallet = None
    def init_ui(self):
        ''' Initialize The Ux part of electrum. This function performs the basic
        tasks of setting up the ui.
        '''
        from weakref import ref
        set_language(self.electrum_config.get('language'))

        self.funds_error = False
        # setup UX
        self.screens = {}

        #setup lazy imports for mainscreen
        Factory.register('AnimatedPopup',
                         module='electrum_gmc_gui.kivy.uix.dialogs')
        Factory.register('QRCodeWidget',
                         module='electrum_gmc_gui.kivy.uix.qrcodewidget')

        # preload widgets. Remove this if you want to load the widgets on demand
        #Cache.append('electrum_gmc_widgets', 'AnimatedPopup', Factory.AnimatedPopup())
        #Cache.append('electrum_gmc_widgets', 'QRCodeWidget', Factory.QRCodeWidget())

        # load and focus the ui
        self.root.manager = self.root.ids['manager']
        self.recent_activity_card = None
        self.history_screen = None
        self.contacts_screen = None

        self.icon = "icons/electrum-gmc.png"

        # connect callbacks
        if self.network:
            self.network.register_callback('updated', self._trigger_update_wallet)
            self.network.register_callback('status', self._trigger_update_status)
            self.network.register_callback('new_transaction', self._trigger_notify_transactions)

        self.wallet = None