Consolidate help handling into ErrorMessageDialog

This commit is contained in:
Cameron Gutman
2019-03-31 15:16:48 -07:00
parent 2cd32bf25a
commit 060a00b9c7
8 changed files with 12 additions and 30 deletions
-1
View File
@@ -216,7 +216,6 @@ GridView {
NavigableMessageDialog { NavigableMessageDialog {
id: quitAppDialog id: quitAppDialog
modality:Qt.WindowModal
property string appName : "" property string appName : ""
property bool segueToStream : false property bool segueToStream : false
property string nextAppName: "" property string nextAppName: ""
-4
View File
@@ -51,10 +51,6 @@ Item {
ErrorMessageDialog { ErrorMessageDialog {
id: errorDialog id: errorDialog
onHelp: {
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
}
onVisibleChanged: { onVisibleChanged: {
if (!visible) { if (!visible) {
Qt.quit() Qt.quit()
-4
View File
@@ -67,10 +67,6 @@ Item {
ErrorMessageDialog { ErrorMessageDialog {
id: errorDialog id: errorDialog
onHelp: {
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
}
onVisibleChanged: { onVisibleChanged: {
if (!visible) { if (!visible) {
Qt.quit(); Qt.quit();
+5
View File
@@ -5,9 +5,14 @@ import SystemProperties 1.0
NavigableMessageDialog { NavigableMessageDialog {
property string helpText property string helpText
property string helpUrl : "https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting"
informativeText: SystemProperties.hasBrowser ? helpText : "" informativeText: SystemProperties.hasBrowser ? helpText : ""
icon: StandardIcon.Critical icon: StandardIcon.Critical
standardButtons: StandardButton.Ok | standardButtons: StandardButton.Ok |
(SystemProperties.hasBrowser ? StandardButton.Help : 0) (SystemProperties.hasBrowser ? StandardButton.Help : 0)
onHelp: {
Qt.openUrlExternally(helpUrl)
}
} }
+2 -3
View File
@@ -231,11 +231,10 @@ GridView {
ErrorMessageDialog { ErrorMessageDialog {
id: errorDialog id: errorDialog
onHelp: {
// Using Setup-Guide here instead of Troubleshooting because it's likely that users // Using Setup-Guide here instead of Troubleshooting because it's likely that users
// will arrive here by forgetting to enable GameStream or not forwarding ports. // will arrive here by forgetting to enable GameStream or not forwarding ports.
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Setup-Guide"); helpUrl: "https://github.com/moonlight-stream/moonlight-docs/wiki/Setup-Guide"
}
} }
NavigableMessageDialog { NavigableMessageDialog {
-3
View File
@@ -69,8 +69,5 @@ Item {
ErrorMessageDialog { ErrorMessageDialog {
id: errorDialog id: errorDialog
onHelp: {
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
}
} }
} }
-4
View File
@@ -182,9 +182,5 @@ Item {
Qt.quit() Qt.quit()
} }
} }
onHelp: {
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
}
} }
} }
+3 -9
View File
@@ -383,9 +383,7 @@ ApplicationWindow {
text: "No functioning hardware accelerated H.264 video decoder was detected by Moonlight. " + text: "No functioning hardware accelerated H.264 video decoder was detected by Moonlight. " +
"Your streaming performance may be severely degraded in this configuration." "Your streaming performance may be severely degraded in this configuration."
helpText: "Click the Help button for more information on solving this problem." helpText: "Click the Help button for more information on solving this problem."
onHelp: { helpUrl: "https://github.com/moonlight-stream/moonlight-docs/wiki/Fixing-Hardware-Decoding-Problems"
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Fixing-Hardware-Decoding-Problems");
}
} }
ErrorMessageDialog { ErrorMessageDialog {
@@ -394,9 +392,7 @@ ApplicationWindow {
text: "Moonlight does not support hardware acceleration on Wayland. Continuing on Wayland may result in poor streaming performance. " + text: "Moonlight does not support hardware acceleration on Wayland. Continuing on Wayland may result in poor streaming performance. " +
"Please switch to an X session for optimal performance." "Please switch to an X session for optimal performance."
helpText: "Click the Help button for more information." helpText: "Click the Help button for more information."
onHelp: { helpUrl: "https://github.com/moonlight-stream/moonlight-docs/wiki/Fixing-Hardware-Decoding-Problems"
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Fixing-Hardware-Decoding-Problems");
}
} }
NavigableMessageDialog { NavigableMessageDialog {
@@ -415,9 +411,7 @@ ApplicationWindow {
icon: StandardIcon.Warning icon: StandardIcon.Warning
text: "Moonlight detected gamepads without a mapping:\n" + unmappedGamepads text: "Moonlight detected gamepads without a mapping:\n" + unmappedGamepads
helpText: "Click the Help button for information on how to map your gamepads." helpText: "Click the Help button for information on how to map your gamepads."
onHelp: { helpUrl: "https://github.com/moonlight-stream/moonlight-docs/wiki/Gamepad-Mapping"
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Gamepad-Mapping");
}
} }
// This dialog appears when quitting via keyboard or gamepad button // This dialog appears when quitting via keyboard or gamepad button