diff --git a/app/gui/AppView.qml b/app/gui/AppView.qml index 1ebccddc..466b679c 100644 --- a/app/gui/AppView.qml +++ b/app/gui/AppView.qml @@ -166,7 +166,8 @@ GridView { property int nextAppIndex: 0 text:"Are you sure you want to quit " + appName +"? Any unsaved progress will be lost." standardButtons: StandardButton.Yes | StandardButton.No - onYes: { + + function quitApp() { var component = Qt.createComponent("QuitSegue.qml") var params = {"appName": appName} if (segueToStream) { @@ -185,6 +186,11 @@ GridView { // Trigger the quit after pushing the quit segue on screen appModel.quitRunningApp() } + + onYes: quitApp() + + // For keyboard/gamepad navigation + onAccepted: quitApp() } ScrollBar.vertical: ScrollBar { diff --git a/app/gui/PcView.qml b/app/gui/PcView.qml index a2b2df30..b7296269 100644 --- a/app/gui/PcView.qml +++ b/app/gui/PcView.qml @@ -305,10 +305,16 @@ GridView { property int pcIndex : -1; text:"Are you sure you want to remove this PC?" standardButtons: StandardButton.Yes | StandardButton.No - onYes: { + + function deletePc() { console.log("deleting PC pairing for PC at index: " + pcIndex) computerModel.deleteComputer(pcIndex); } + + onYes: deletePc() + + // For keyboard/gamepad activation + onAccepted: deletePc() } Dialog {