diff --git a/electrum/gui/qml/components/Addresses.qml b/electrum/gui/qml/components/Addresses.qml index 90ea357f8..65ef50417 100644 --- a/electrum/gui/qml/components/Addresses.qml +++ b/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 diff --git a/electrum/gui/qml/components/WalletMainView.qml b/electrum/gui/qml/components/WalletMainView.qml index f899e0567..c21faecbb 100644 --- a/electrum/gui/qml/components/WalletMainView.qml +++ b/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 diff --git a/electrum/gui/qml/components/Wallets.qml b/electrum/gui/qml/components/Wallets.qml index 337dd8848..d4ca72a14 100644 --- a/electrum/gui/qml/components/Wallets.qml +++ b/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 } diff --git a/electrum/gui/qml/qedaemon.py b/electrum/gui/qml/qedaemon.py index 4402ee708..d31f16bb2 100644 --- a/electrum/gui/qml/qedaemon.py +++ b/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 diff --git a/electrum/gui/qml/qewallet.py b/electrum/gui/qml/qewallet.py index 7e0a6b40e..e694e8894 100644 --- a/electrum/gui/qml/qewallet.py +++ b/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())