kivy: python3 imports
This commit is contained in:
@@ -92,7 +92,7 @@ class ElectrumWindow(App):
|
|||||||
self.auto_connect = not self.auto_connect
|
self.auto_connect = not self.auto_connect
|
||||||
|
|
||||||
def choose_server_dialog(self, popup):
|
def choose_server_dialog(self, popup):
|
||||||
from uix.dialogs.choice_dialog import ChoiceDialog
|
from .uix.dialogs.choice_dialog import ChoiceDialog
|
||||||
protocol = 's'
|
protocol = 's'
|
||||||
def cb2(host):
|
def cb2(host):
|
||||||
from electrum.network import DEFAULT_PORTS
|
from electrum.network import DEFAULT_PORTS
|
||||||
@@ -104,7 +104,7 @@ class ElectrumWindow(App):
|
|||||||
ChoiceDialog(_('Choose a server'), sorted(servers), popup.ids.host.text, cb2).open()
|
ChoiceDialog(_('Choose a server'), sorted(servers), popup.ids.host.text, cb2).open()
|
||||||
|
|
||||||
def choose_blockchain_dialog(self, dt):
|
def choose_blockchain_dialog(self, dt):
|
||||||
from uix.dialogs.choice_dialog import ChoiceDialog
|
from .uix.dialogs.choice_dialog import ChoiceDialog
|
||||||
chains = self.network.get_blockchains()
|
chains = self.network.get_blockchains()
|
||||||
def cb(name):
|
def cb(name):
|
||||||
for index, b in self.network.blockchains.items():
|
for index, b in self.network.blockchains.items():
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ class HistoryScreen(CScreen):
|
|||||||
self.app.tx_dialog(tx)
|
self.app.tx_dialog(tx)
|
||||||
|
|
||||||
def label_dialog(self, obj):
|
def label_dialog(self, obj):
|
||||||
from dialogs.label_dialog import LabelDialog
|
from .dialogs.label_dialog import LabelDialog
|
||||||
key = obj.tx_hash
|
key = obj.tx_hash
|
||||||
text = self.app.wallet.get_label(key)
|
text = self.app.wallet.get_label(key)
|
||||||
def callback(text):
|
def callback(text):
|
||||||
@@ -264,7 +264,7 @@ class SendScreen(CScreen):
|
|||||||
message = self.screen.message
|
message = self.screen.message
|
||||||
amount = sum(map(lambda x:x[2], outputs))
|
amount = sum(map(lambda x:x[2], outputs))
|
||||||
if self.app.electrum_config.get('use_rbf'):
|
if self.app.electrum_config.get('use_rbf'):
|
||||||
from dialogs.question import Question
|
from .dialogs.question import Question
|
||||||
d = Question(_('Should this transaction be replaceable?'), lambda b: self._do_send(amount, message, outputs, b))
|
d = Question(_('Should this transaction be replaceable?'), lambda b: self._do_send(amount, message, outputs, b))
|
||||||
d.open()
|
d.open()
|
||||||
else:
|
else:
|
||||||
@@ -467,7 +467,7 @@ class InvoicesScreen(CScreen):
|
|||||||
self.app.show_pr_details(pr.get_dict(), obj.status, True)
|
self.app.show_pr_details(pr.get_dict(), obj.status, True)
|
||||||
|
|
||||||
def do_delete(self, obj):
|
def do_delete(self, obj):
|
||||||
from dialogs.question import Question
|
from .dialogs.question import Question
|
||||||
def cb(result):
|
def cb(result):
|
||||||
if result:
|
if result:
|
||||||
self.app.wallet.invoices.remove(obj.key)
|
self.app.wallet.invoices.remove(obj.key)
|
||||||
@@ -537,7 +537,7 @@ class RequestsScreen(CScreen):
|
|||||||
self.app.show_pr_details(req, status, False)
|
self.app.show_pr_details(req, status, False)
|
||||||
|
|
||||||
def do_delete(self, obj):
|
def do_delete(self, obj):
|
||||||
from dialogs.question import Question
|
from .dialogs.question import Question
|
||||||
def cb(result):
|
def cb(result):
|
||||||
if result:
|
if result:
|
||||||
self.app.wallet.remove_payment_request(obj.address, self.app.electrum_config)
|
self.app.wallet.remove_payment_request(obj.address, self.app.electrum_config)
|
||||||
|
|||||||
Reference in New Issue
Block a user