diff options
| author | moneromooo.monero <moneromooo.monero@users.noreply.github.com> | 2016-11-26 14:46:42 +0000 |
|---|---|---|
| committer | moneromooo.monero <moneromooo.monero@users.noreply.github.com> | 2016-11-26 14:46:42 +0000 |
| commit | b5a993bd8a7526bfe43a827261a34f8427e42f1e (patch) | |
| tree | 2952c0d0bd304a9ad0886663fd117a57aebd4fa6 /components | |
| parent | 26abdee5c47017a80117b1bed5ee36586a240c62 (diff) | |
| download | monzero-gui-b5a993bd8a7526bfe43a827261a34f8427e42f1e.tar.gz monzero-gui-b5a993bd8a7526bfe43a827261a34f8427e42f1e.tar.xz monzero-gui-b5a993bd8a7526bfe43a827261a34f8427e42f1e.zip | |
Print wallet filename in password dialog where approrpiate
Diffstat (limited to 'components')
| -rw-r--r-- | components/PasswordDialog.qml | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/components/PasswordDialog.qml b/components/PasswordDialog.qml index 7d1a5bd6..325bf2b3 100644 --- a/components/PasswordDialog.qml +++ b/components/PasswordDialog.qml @@ -40,19 +40,28 @@ Window { modality: Qt.ApplicationModal flags: Qt.Window | Qt.FramelessWindowHint property alias password: passwordInput.text + property string walletName // same signals as Dialog has signal accepted() signal rejected() - function open() { + function open(walletName) { + root.walletName = walletName ? walletName : "" show() } + function usefulName(path) { + // arbitrary "short enough" limit + if (path.length < 32) + return path + return path.replace(/.*[\/\\]/, '').replace(/\.keys$/, '') + } + // TODO: implement without hardcoding sizes width: 480 - height: 200 + height: walletName ? 240 : 200 ColumnLayout { id: mainLayout @@ -65,7 +74,7 @@ Window { Layout.alignment: Qt.AlignHCenter Label { - text: qsTr("Please enter wallet password") + text: root.walletName.length > 0 ? qsTr("Please enter wallet password for:<br>") + usefulName(root.walletName) : qsTr("Please enter wallet password") Layout.alignment: Qt.AlignHCenter Layout.columnSpan: 2 Layout.fillWidth: true |
