summaryrefslogtreecommitdiff
path: root/gui/qml/main.qml
diff options
context:
space:
mode:
Diffstat (limited to 'gui/qml/main.qml')
-rw-r--r--gui/qml/main.qml22
1 files changed, 15 insertions, 7 deletions
diff --git a/gui/qml/main.qml b/gui/qml/main.qml
index 8d756c6..efcfef2 100644
--- a/gui/qml/main.qml
+++ b/gui/qml/main.qml
@@ -11,7 +11,6 @@ ApplicationWindow {
property var ctx
-
Connections {
target: jsonModel
onDataChanged: {
@@ -20,9 +19,24 @@ ApplicationWindow {
console.debug(jsonModel.getJson())
donate.visible = true
}
+ if (ctx.errors ) {
+ // TODO consider disabling on/off buttons, or quit after closing the dialog
+ if ( ctx.errors == "nohelpers" ) {
+ showInitFailure(qsTr("Could not find helpers. Check your installation"))
+ } else if ( ctx.errors == "nopolkit" ) {
+ showInitFailure(qsTr("Could not find polkit agent."))
+ } else {
+ console.debug(ctx.errors)
+ }
+ }
}
}
+ function showInitFailure(msg) {
+ initFailure.text = msg
+ initFailure.visible = true
+ }
+
Component.onCompleted: {
/* stupid as it sounds, windows doesn't like to have the systray icon
not being attached to an actual application window.
@@ -210,9 +224,6 @@ ApplicationWindow {
text: ""
detailedText: ""
visible: false
- //text: ctx ? qsTr("Can't connect to %1").arg(ctx.appName) : ""
- //detailedText: ctx ? ctx.errorStartingMsg : ""
- //visible: ctx.errorStartingMsg != ""
}
MessageDialog {
@@ -222,7 +233,6 @@ ApplicationWindow {
title: qsTr("Missing authentication agent")
text: qsTr("Could not find a polkit authentication agent. Please run one and try again.")
visible: false
- //visible: ctx.missingAuthAgent == "true"
}
MessageDialog {
@@ -232,7 +242,5 @@ ApplicationWindow {
title: qsTr("Initialization Error")
text: ""
visible: false
- //text: ctx ? ctx.errorInitMsg : ""
- //visible: ctx.errorInitMsg != ""
}
}