mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-02 15:55:39 +00:00
Only display help options on platforms with web browsers
This commit is contained in:
parent
a3361363e4
commit
03c0be0720
@ -50,11 +50,12 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog {
|
ErrorMessageDialog {
|
||||||
id: errorDialog
|
id: errorDialog
|
||||||
modality:Qt.WindowModal
|
|
||||||
icon: StandardIcon.Critical
|
onHelp: {
|
||||||
standardButtons: StandardButton.Ok
|
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
|
||||||
|
}
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if (!visible) {
|
if (!visible) {
|
||||||
|
@ -64,14 +64,13 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog {
|
ErrorMessageDialog {
|
||||||
id: errorDialog
|
id: errorDialog
|
||||||
modality:Qt.WindowModal
|
|
||||||
icon: StandardIcon.Critical
|
|
||||||
standardButtons: StandardButton.Ok | StandardButton.Help
|
|
||||||
onHelp: {
|
onHelp: {
|
||||||
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
|
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
|
||||||
}
|
}
|
||||||
|
|
||||||
onVisibleChanged: {
|
onVisibleChanged: {
|
||||||
if (!visible) {
|
if (!visible) {
|
||||||
Qt.quit();
|
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
|
// Display a failed dialog if we got an error
|
||||||
if (error !== undefined) {
|
if (error !== undefined) {
|
||||||
errorDialog.text = error
|
errorDialog.text = error
|
||||||
|
errorDialog.helpText = ""
|
||||||
errorDialog.open()
|
errorDialog.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -61,7 +62,8 @@ GridView {
|
|||||||
function addComplete(success)
|
function addComplete(success)
|
||||||
{
|
{
|
||||||
if (!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()
|
errorDialog.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -171,6 +173,7 @@ GridView {
|
|||||||
else {
|
else {
|
||||||
// cannot pair while something is streaming or attempting to pair
|
// 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.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()
|
errorDialog.open()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -210,12 +213,8 @@ GridView {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog {
|
ErrorMessageDialog {
|
||||||
id: errorDialog
|
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: {
|
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.
|
||||||
|
@ -69,10 +69,10 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog {
|
ErrorMessageDialog {
|
||||||
id: errorDialog
|
id: errorDialog
|
||||||
modality:Qt.WindowModal
|
onHelp: {
|
||||||
icon: StandardIcon.Critical
|
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
|
||||||
standardButtons: StandardButton.Ok
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -174,24 +174,17 @@ Item {
|
|||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog {
|
ErrorMessageDialog {
|
||||||
id: errorDialog
|
id: errorDialog
|
||||||
modality:Qt.WindowModal
|
|
||||||
icon: StandardIcon.Critical
|
|
||||||
standardButtons: StandardButton.Ok | StandardButton.Help
|
|
||||||
|
|
||||||
onAccepted: {
|
onVisibleChanged: {
|
||||||
if (quitAfter) {
|
if (!visible) {
|
||||||
Qt.quit()
|
Qt.quit()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onHelp: {
|
onHelp: {
|
||||||
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
|
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting");
|
||||||
|
|
||||||
if (quitAfter) {
|
|
||||||
Qt.quit()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -256,6 +256,7 @@ ApplicationWindow {
|
|||||||
|
|
||||||
NavigableToolButton {
|
NavigableToolButton {
|
||||||
id: helpButton
|
id: helpButton
|
||||||
|
visible: SystemProperties.hasBrowser
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
source: "qrc:/res/question_mark.svg"
|
source: "qrc:/res/question_mark.svg"
|
||||||
@ -342,26 +343,23 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog {
|
ErrorMessageDialog {
|
||||||
id: noHwDecoderDialog
|
id: noHwDecoderDialog
|
||||||
modality:Qt.WindowModal
|
|
||||||
icon: StandardIcon.Warning
|
icon: StandardIcon.Warning
|
||||||
standardButtons: StandardButton.Ok | StandardButton.Help
|
|
||||||
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."
|
||||||
"Click the Help button for more information on solving this problem."
|
helpText: "Click the Help button for more information on solving this problem."
|
||||||
onHelp: {
|
onHelp: {
|
||||||
Qt.openUrlExternally("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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageDialog {
|
ErrorMessageDialog {
|
||||||
id: waylandDialog
|
id: waylandDialog
|
||||||
modality:Qt.WindowModal
|
|
||||||
icon: StandardIcon.Warning
|
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. " +
|
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."
|
||||||
onHelp: {
|
onHelp: {
|
||||||
Qt.openUrlExternally("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");
|
||||||
}
|
}
|
||||||
@ -369,7 +367,6 @@ ApplicationWindow {
|
|||||||
|
|
||||||
MessageDialog {
|
MessageDialog {
|
||||||
id: wow64Dialog
|
id: wow64Dialog
|
||||||
modality:Qt.WindowModal
|
|
||||||
icon: StandardIcon.Warning
|
icon: StandardIcon.Warning
|
||||||
standardButtons: StandardButton.Ok | StandardButton.Cancel
|
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."
|
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
|
id: unmappedGamepadDialog
|
||||||
property string unmappedGamepads : ""
|
property string unmappedGamepads : ""
|
||||||
modality:Qt.WindowModal
|
|
||||||
icon: StandardIcon.Warning
|
icon: StandardIcon.Warning
|
||||||
standardButtons: StandardButton.Ok | StandardButton.Help
|
text: "Moonlight detected gamepads without a mapping:\n" + unmappedGamepads
|
||||||
text: "Moonlight detected gamepads without a proper mapping. " +
|
helpText: "Click the Help button for information on how to map your gamepads."
|
||||||
"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."
|
|
||||||
onHelp: {
|
onHelp: {
|
||||||
Qt.openUrlExternally("https://github.com/moonlight-stream/moonlight-docs/wiki/Gamepad-Mapping");
|
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
|
// This dialog appears when quitting via keyboard or gamepad button
|
||||||
MessageDialog {
|
MessageDialog {
|
||||||
id: quitConfirmationDialog
|
id: quitConfirmationDialog
|
||||||
modality:Qt.WindowModal
|
|
||||||
icon: StandardIcon.Warning
|
icon: StandardIcon.Warning
|
||||||
standardButtons: StandardButton.Yes | StandardButton.No
|
standardButtons: StandardButton.Yes | StandardButton.No
|
||||||
text: "Are you sure you want to quit?"
|
text: "Are you sure you want to quit?"
|
||||||
|
@ -14,5 +14,6 @@
|
|||||||
<file>gui/CliStartStreamSegue.qml</file>
|
<file>gui/CliStartStreamSegue.qml</file>
|
||||||
<file>gui/AutoResizingComboBox.qml</file>
|
<file>gui/AutoResizingComboBox.qml</file>
|
||||||
<file>gui/NavigableMenu.qml</file>
|
<file>gui/NavigableMenu.qml</file>
|
||||||
|
<file>gui/ErrorMessageDialog.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user