1
0
Fork 0
mirror of https://github.com/kbumsik/VirtScreen.git synced 2025-03-09 15:40:18 +00:00

Displays error when ARandR is not installed

This commit is contained in:
Bumsik Kim 2018-05-16 07:57:11 -04:00
parent fb868a4f7f
commit 7e8eeaf0a7
No known key found for this signature in database
GPG key ID: E31041C8EC5B01C6
3 changed files with 6 additions and 2 deletions

View file

@ -146,7 +146,7 @@ Item {
text: "" text: ""
Component.onCompleted : { Component.onCompleted : {
backend.onError.connect(function(errMsg) { backend.onError.connect(function(errMsg) {
errorText.text = ""; errorText.text = ""; // To trigger onTextChanged signal
errorText.text = errMsg; errorText.text = errMsg;
}); });
} }

View file

@ -234,9 +234,12 @@ ApplicationWindow {
anchors.fill: parent anchors.fill: parent
Text { Text {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
Layout.fillWidth: true
wrapMode: Text.WordWrap
text: errorText.text text: errorText.text
onTextChanged: { onTextChanged: {
if (text) { if (text) {
busyDialog.close();
errorDialog.open(); errorDialog.open();
} }
} }

View file

@ -562,7 +562,8 @@ class Backend(QObject):
if not shutil.which(arg.split()[0]): if not shutil.which(arg.split()[0]):
continue continue
program.run(arg) program.run(arg)
break return
self.onError.emit('Failed to find a display settings program. Please install ARandR package.')
@pyqtSlot() @pyqtSlot()
def stopVNC(self, force=False): def stopVNC(self, force=False):