move wallet name to qewallet
This commit is contained in:
@@ -8,7 +8,7 @@ import org.electrum 1.0
|
|||||||
Pane {
|
Pane {
|
||||||
id: rootItem
|
id: rootItem
|
||||||
|
|
||||||
property string title: Daemon.walletName + ' - ' + qsTr('Addresses')
|
property string title: Daemon.currentWallet.name + ' - ' + qsTr('Addresses')
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: layout
|
id: layout
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import QtQml 2.6
|
|||||||
Item {
|
Item {
|
||||||
id: rootItem
|
id: rootItem
|
||||||
|
|
||||||
property string title: Daemon.walletName
|
property string title: Daemon.currentWallet.name
|
||||||
|
|
||||||
property QtObject menu: Menu {
|
property QtObject menu: Menu {
|
||||||
id: menu
|
id: menu
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Pane {
|
|||||||
columns: 4
|
columns: 4
|
||||||
|
|
||||||
Label { text: 'Wallet'; Layout.columnSpan: 2 }
|
Label { text: 'Wallet'; Layout.columnSpan: 2 }
|
||||||
Label { text: Daemon.walletName; Layout.columnSpan: 2; color: Material.accentColor }
|
Label { text: Daemon.currentWallet.name; Layout.columnSpan: 2; color: Material.accentColor }
|
||||||
|
|
||||||
Label { text: 'derivation path (BIP32)'; visible: Daemon.currentWallet.isDeterministic; Layout.columnSpan: 2 }
|
Label { text: 'derivation path (BIP32)'; visible: Daemon.currentWallet.isDeterministic; Layout.columnSpan: 2 }
|
||||||
Label { text: Daemon.currentWallet.derivationPath; visible: Daemon.currentWallet.isDeterministic; color: Material.accentColor; Layout.columnSpan: 2 }
|
Label { text: Daemon.currentWallet.derivationPath; visible: Daemon.currentWallet.isDeterministic; color: Material.accentColor; Layout.columnSpan: 2 }
|
||||||
|
|||||||
@@ -135,12 +135,6 @@ class QEDaemon(QObject):
|
|||||||
def currentWallet(self):
|
def currentWallet(self):
|
||||||
return self._current_wallet
|
return self._current_wallet
|
||||||
|
|
||||||
@pyqtProperty('QString', notify=walletLoaded)
|
|
||||||
def walletName(self):
|
|
||||||
if self._current_wallet != None:
|
|
||||||
return self._current_wallet.wallet.basename()
|
|
||||||
return ''
|
|
||||||
|
|
||||||
@pyqtProperty(QEWalletListModel, notify=activeWalletsChanged)
|
@pyqtProperty(QEWalletListModel, notify=activeWalletsChanged)
|
||||||
def activeWallets(self):
|
def activeWallets(self):
|
||||||
return self._loaded_wallets
|
return self._loaded_wallets
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ class QEWallet(QObject):
|
|||||||
def requestModel(self):
|
def requestModel(self):
|
||||||
return self._requestModel
|
return self._requestModel
|
||||||
|
|
||||||
|
nameChanged = pyqtSignal()
|
||||||
|
@pyqtProperty('QString', notify=nameChanged)
|
||||||
|
def name(self):
|
||||||
|
return self.wallet.basename()
|
||||||
|
|
||||||
@pyqtProperty('QString', notify=dataChanged)
|
@pyqtProperty('QString', notify=dataChanged)
|
||||||
def txinType(self):
|
def txinType(self):
|
||||||
return self.wallet.get_txin_type(self.wallet.dummy_address())
|
return self.wallet.get_txin_type(self.wallet.dummy_address())
|
||||||
|
|||||||
Reference in New Issue
Block a user