Browse Source

cleanup

283
ThomasV 9 years ago
parent
commit
add9665584
  1. 47
      gui/kivy/__init__.py

47
gui/kivy/__init__.py

@ -19,15 +19,6 @@
# Kivy GUI
import sys
#, time, datetime, re, threading
#from electrum.i18n import _, set_language
from electrum.util import print_error, print_msg
#:TODO: replace this with kivy's own plugin managment
#from electrum.plugins import run_hook
#import os.path, json, ast, traceback
#import shutil
try:
sys.argv = ['']
import kivy
@ -39,25 +30,7 @@ except ImportError:
# minimum required version for kivy
kivy.require('1.8.0')
from kivy.logger import Logger
from electrum.bitcoin import MIN_RELAY_TX_FEE
from main_window import ElectrumWindow
#from electrum.plugins import init_plugins
#:TODO find a equivalent method to register to `bitcoin:` uri
#: ref: http://stackoverflow.com/questions/30931/register-file-extensions-mime-types-in-linux
#class OpenFileEventFilter(object):
# def __init__(self, windows):
# self.windows = windows
# super(OpenFileEventFilter, self).__init__()
#
# def eventFilter(self, obj, event):
# if event.type() == QtCore.QEvent.FileOpen:
# if len(self.windows) >= 1:
# self.windows[0].set_url(event.url().toEncoded())
# return True
# return False
class ElectrumGui:
@ -67,21 +40,9 @@ class ElectrumGui:
self.config = config
self.plugins = plugins
#:TODO
# implement kivy plugin mechanism that needs to be more extensible
# and integrated into the ui so can't be common with existing plugin
# base
#init_plugins(self)
def main(self):
''' The main entry point of the kivy ux
:param url: 'bitcoin:' uri as mentioned in bip0021
:type url: str
:ref: https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki
'''
self.main_window = w = ElectrumWindow(config=self.config,
network=self.network,
plugins = self.plugins,
gui_object=self)
w = ElectrumWindow(config=self.config,
network=self.network,
plugins = self.plugins,
gui_object=self)
w.run()

Loading…
Cancel
Save