Browse Source

move wallet name to qewallet

patch-4
Sander van Grieken 3 years ago
parent
commit
d427be70b2
  1. 2
      electrum/gui/qml/components/Addresses.qml
  2. 2
      electrum/gui/qml/components/WalletMainView.qml
  3. 2
      electrum/gui/qml/components/Wallets.qml
  4. 6
      electrum/gui/qml/qedaemon.py
  5. 5
      electrum/gui/qml/qewallet.py

2
electrum/gui/qml/components/Addresses.qml

@ -8,7 +8,7 @@ import org.electrum 1.0
Pane {
id: rootItem
property string title: Daemon.walletName + ' - ' + qsTr('Addresses')
property string title: Daemon.currentWallet.name + ' - ' + qsTr('Addresses')
ColumnLayout {
id: layout

2
electrum/gui/qml/components/WalletMainView.qml

@ -6,7 +6,7 @@ import QtQml 2.6
Item {
id: rootItem
property string title: Daemon.walletName
property string title: Daemon.currentWallet.name
property QtObject menu: Menu {
id: menu

2
electrum/gui/qml/components/Wallets.qml

@ -26,7 +26,7 @@ Pane {
columns: 4
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: Daemon.currentWallet.derivationPath; visible: Daemon.currentWallet.isDeterministic; color: Material.accentColor; Layout.columnSpan: 2 }

6
electrum/gui/qml/qedaemon.py

@ -135,12 +135,6 @@ class QEDaemon(QObject):
def currentWallet(self):
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)
def activeWallets(self):
return self._loaded_wallets

5
electrum/gui/qml/qewallet.py

@ -56,6 +56,11 @@ class QEWallet(QObject):
def requestModel(self):
return self._requestModel
nameChanged = pyqtSignal()
@pyqtProperty('QString', notify=nameChanged)
def name(self):
return self.wallet.basename()
@pyqtProperty('QString', notify=dataChanged)
def txinType(self):
return self.wallet.get_txin_type(self.wallet.dummy_address())

Loading…
Cancel
Save