Disable menu items when no key present

This commit is contained in:
Dag Heyman 2017-03-13 13:16:10 +01:00
parent 839f9a10e0
commit 735420632c
No known key found for this signature in database
GPG Key ID: 06FC004369E7D338

View File

@ -47,6 +47,7 @@ ApplicationWindow {
title: qsTr("File")
MenuItem {
text: qsTr('Add credential...')
enabled: device.hasDevice
onTriggered: {
if (settings.slotMode) {
addCredentialSlot.clear()
@ -60,12 +61,12 @@ ApplicationWindow {
}
MenuItem {
text: qsTr('Set password...')
enabled: !settings.slotMode
enabled: !settings.slotMode && device.hasDevice
onTriggered: setPassword.open()
}
MenuItem {
text: qsTr('Reset...')
enabled: !settings.slotMode
enabled: !settings.slotMode && device.hasDevice
onTriggered: reset.open()
}
MenuItem {