From 7e8eeaf0a78ac7429babf03dd8915c9f9ad16e68 Mon Sep 17 00:00:00 2001 From: Bumsik Kim Date: Wed, 16 May 2018 07:57:11 -0400 Subject: [PATCH] Displays error when ARandR is not installed --- main.qml | 2 +- qml/AppWindow.qml | 3 +++ virtscreen.py | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/main.qml b/main.qml index fe261ca..fdf2925 100644 --- a/main.qml +++ b/main.qml @@ -146,7 +146,7 @@ Item { text: "" Component.onCompleted : { backend.onError.connect(function(errMsg) { - errorText.text = ""; + errorText.text = ""; // To trigger onTextChanged signal errorText.text = errMsg; }); } diff --git a/qml/AppWindow.qml b/qml/AppWindow.qml index 82931f1..00e0622 100644 --- a/qml/AppWindow.qml +++ b/qml/AppWindow.qml @@ -234,9 +234,12 @@ ApplicationWindow { anchors.fill: parent Text { horizontalAlignment: Text.AlignHCenter + Layout.fillWidth: true + wrapMode: Text.WordWrap text: errorText.text onTextChanged: { if (text) { + busyDialog.close(); errorDialog.open(); } } diff --git a/virtscreen.py b/virtscreen.py index 73d1629..2024393 100755 --- a/virtscreen.py +++ b/virtscreen.py @@ -562,7 +562,8 @@ class Backend(QObject): if not shutil.which(arg.split()[0]): continue program.run(arg) - break + return + self.onError.emit('Failed to find a display settings program. Please install ARandR package.') @pyqtSlot() def stopVNC(self, force=False):