mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-13 21:02:28 +00:00
Only display help options on platforms with web browsers
This commit is contained in:
parent
a3361363e4
commit
03c0be0720
8 changed files with 43 additions and 44 deletions
|
@ -50,11 +50,12 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
ErrorMessageDialog {
|
||||
id: errorDialog
|
||||
modality:Qt.WindowModal
|
||||
icon: StandardIcon.Critical
|
||||
standardButtons: StandardButton.Ok
|
||||
|
||||
onHelp: {
|
||||
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
if (!visible) {
|
||||
|
|
|
@ -64,14 +64,13 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
ErrorMessageDialog {
|
||||
id: errorDialog
|
||||
modality:Qt.WindowModal
|
||||
icon: StandardIcon.Critical
|
||||
standardButtons: StandardButton.Ok | StandardButton.Help
|
||||
|
||||
onHelp: {
|
||||
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
if (!visible) {
|
||||
Qt.quit();
|
||||
|
|
13
app/gui/ErrorMessageDialog.qml
Normal file
13
app/gui/ErrorMessageDialog.qml
Normal file
|
@ -0,0 +1,13 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick.Dialogs 1.2
|
||||
|
||||
import SystemProperties 1.0
|
||||
|
||||
MessageDialog {
|
||||
property string helpText
|
||||
|
||||
informativeText: SystemProperties.hasBrowser ? helpText : ""
|
||||
icon: StandardIcon.Critical
|
||||
standardButtons: StandardButton.Ok |
|
||||
(SystemProperties.hasBrowser ? StandardButton.Help : 0)
|
||||
}
|
|
@ -54,6 +54,7 @@ GridView {
|
|||
// Display a failed dialog if we got an error
|
||||
if (error !== undefined) {
|
||||
errorDialog.text = error
|
||||
errorDialog.helpText = ""
|
||||
errorDialog.open()
|
||||
}
|
||||
}
|
||||
|
@ -61,7 +62,8 @@ GridView {
|
|||
function addComplete(success)
|
||||
{
|
||||
if (!success) {
|
||||
errorDialog.text = "Unable to connect to the specified PC. Click the Help button for possible solutions."
|
||||
errorDialog.text = "Unable to connect to the specified PC."
|
||||
errorDialog.helpText = "Click the Help button for possible solutions."
|
||||
errorDialog.open()
|
||||
}
|
||||
}
|
||||
|
@ -171,6 +173,7 @@ GridView {
|
|||
else {
|
||||
// cannot pair while something is streaming or attempting to pair
|
||||
errorDialog.text = "You cannot pair while a previous session is still running on the host PC. Quit any running games or reboot the host PC, then try pairing again."
|
||||
errorDialog.helpText = ""
|
||||
errorDialog.open()
|
||||
}
|
||||
}
|
||||
|
@ -210,12 +213,8 @@ GridView {
|
|||
}
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
ErrorMessageDialog {
|
||||
id: errorDialog
|
||||
// don't allow edits to the rest of the window while open
|
||||
modality:Qt.WindowModal
|
||||
icon: StandardIcon.Critical
|
||||
standardButtons: StandardButton.Ok | StandardButton.Help
|
||||
onHelp: {
|
||||
// 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.
|
||||
|
|
|
@ -69,10 +69,10 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
ErrorMessageDialog {
|
||||
id: errorDialog
|
||||
modality:Qt.WindowModal
|
||||
icon: StandardIcon.Critical
|
||||
standardButtons: StandardButton.Ok
|
||||
onHelp: {
|
||||
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,24 +174,17 @@ Item {
|
|||
wrapMode: Text.Wrap
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
ErrorMessageDialog {
|
||||
id: errorDialog
|
||||
modality:Qt.WindowModal
|
||||
icon: StandardIcon.Critical
|
||||
standardButtons: StandardButton.Ok | StandardButton.Help
|
||||
|
||||
onAccepted: {
|
||||
if (quitAfter) {
|
||||
onVisibleChanged: {
|
||||
if (!visible) {
|
||||
Qt.quit()
|
||||
}
|
||||
}
|
||||
|
||||
onHelp: {
|
||||
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
|
||||
|
||||
if (quitAfter) {
|
||||
Qt.quit()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -256,6 +256,7 @@ ApplicationWindow {
|
|||
|
||||
NavigableToolButton {
|
||||
id: helpButton
|
||||
visible: SystemProperties.hasBrowser
|
||||
|
||||
Image {
|
||||
source: "qrc:/res/question_mark.svg"
|
||||
|
@ -342,26 +343,23 @@ ApplicationWindow {
|
|||
}
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
ErrorMessageDialog {
|
||||
id: noHwDecoderDialog
|
||||
modality:Qt.WindowModal
|
||||
icon: StandardIcon.Warning
|
||||
standardButtons: StandardButton.Ok | StandardButton.Help
|
||||
text: "No functioning hardware accelerated H.264 video decoder was detected by Moonlight. " +
|
||||
"Your streaming performance may be severely degraded in this configuration. " +
|
||||
"Click the Help button for more information on solving this problem."
|
||||
"Your streaming performance may be severely degraded in this configuration."
|
||||
helpText: "Click the Help button for more information on solving this problem."
|
||||
onHelp: {
|
||||
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Fixing-Hardware-Decoding-Problems");
|
||||
}
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
ErrorMessageDialog {
|
||||
id: waylandDialog
|
||||
modality:Qt.WindowModal
|
||||
icon: StandardIcon.Warning
|
||||
standardButtons: StandardButton.Ok | StandardButton.Help
|
||||
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."
|
||||
helpText: "Click the Help button for more information."
|
||||
onHelp: {
|
||||
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Fixing-Hardware-Decoding-Problems");
|
||||
}
|
||||
|
@ -369,7 +367,6 @@ ApplicationWindow {
|
|||
|
||||
MessageDialog {
|
||||
id: wow64Dialog
|
||||
modality:Qt.WindowModal
|
||||
icon: StandardIcon.Warning
|
||||
standardButtons: StandardButton.Ok | StandardButton.Cancel
|
||||
text: "This PC is running a 64-bit version of Windows. Please download the x64 version of Moonlight for the best streaming performance."
|
||||
|
@ -378,15 +375,12 @@ ApplicationWindow {
|
|||
}
|
||||
}
|
||||
|
||||
MessageDialog {
|
||||
ErrorMessageDialog {
|
||||
id: unmappedGamepadDialog
|
||||
property string unmappedGamepads : ""
|
||||
modality:Qt.WindowModal
|
||||
icon: StandardIcon.Warning
|
||||
standardButtons: StandardButton.Ok | StandardButton.Help
|
||||
text: "Moonlight detected gamepads without a proper mapping. " +
|
||||
"The following gamepads will not function until this is resolved: " + unmappedGamepads + "\n\n" +
|
||||
"Click the Help button for information on how to map your gamepads."
|
||||
text: "Moonlight detected gamepads without a mapping:\n" + unmappedGamepads
|
||||
helpText: "Click the Help button for information on how to map your gamepads."
|
||||
onHelp: {
|
||||
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Gamepad-Mapping");
|
||||
}
|
||||
|
@ -395,7 +389,6 @@ ApplicationWindow {
|
|||
// This dialog appears when quitting via keyboard or gamepad button
|
||||
MessageDialog {
|
||||
id: quitConfirmationDialog
|
||||
modality:Qt.WindowModal
|
||||
icon: StandardIcon.Warning
|
||||
standardButtons: StandardButton.Yes | StandardButton.No
|
||||
text: "Are you sure you want to quit?"
|
||||
|
|
|
@ -14,5 +14,6 @@
|
|||
<file>gui/CliStartStreamSegue.qml</file>
|
||||
<file>gui/AutoResizingComboBox.qml</file>
|
||||
<file>gui/NavigableMenu.qml</file>
|
||||
<file>gui/ErrorMessageDialog.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
Loading…
Reference in a new issue