ZENITY: improved some dialogs and added some colors

This commit is contained in:
XargonWan 2024-05-07 09:58:31 +02:00
parent 5455e1c992
commit 323a56df99
4 changed files with 13 additions and 10 deletions

View file

@ -76,8 +76,8 @@ check_for_version_update() {
log i "Showing new version found dialog"
choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="OK" --extra-button="Ignore this version" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Update Available" \
--text="There is a new version of RetroDECK on the stable release channel $online_version. Please update through the Discover app!\n\nIf you would like to ignore this version and recieve a notification at the NEXT version,\nclick the \"Ignore this version\" button.")
--title "RetroDECK - New Update Available" \
--text="There is a new version of RetroDECK available: <span foreground='$blue'><b>$online_version</b></span>.\nYou can easily update from the app store you have installed, examples: KDE Discover or Gnome Software.\n\nIf you would like to ignore this notification, click the \"Ignore this version\" button.")
rc=$? # Capture return code, as "OK" button has no text value
if [[ $rc == "1" ]]; then # If any button other than "OK" was clicked
log i "Selected: \"OK\""
@ -87,8 +87,8 @@ check_for_version_update() {
log i "Showing update request dialog as \"$online_version\" was found and is greater then \"$version\""
choice=$(zenity --icon-name=net.retrodeck.retrodeck --info --no-wrap --ok-label="Yes" --extra-button="No" --extra-button="Ignore this version" \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Update Available" \
--text="There is a more recent build of the RetroDECK cooker branch.\nYou are running version $hard_version, the latest is $online_version.\n\nWould you like to update to it?\nIf you would like to skip reminders about this version, click \"Ignore this version\".\nYou will be reminded again at the next version update.\n\nIf you would like to disable these update notifications entirely, disable Online Update Checks in the Configurator.")
--title "RetroDECK - New Cooker Version Available" \
--text="There is a more recent version of RetroDECK cooker.\nYou are running version <span foreground='$blue'><b>$hard_version</b></span>. The latest is <span foreground='$blue'><b>$online_version</b></span>.\n\nWould you like to update?\nIf you would like to ignore this notification, click the \"Ignore this version\" button.\n\nIf you would like to disable these notifications entirely: disable Online Update Checks in the Configurator.")
rc=$? # Capture return code, as "Yes" button has no text value
if [[ $rc == "1" ]]; then # If any button other than "Yes" was clicked
if [[ $choice == "Ignore this version" ]]; then

View file

@ -2,6 +2,10 @@
source /app/libexec/functions.sh
# Dialog colors
purple="#a864fc"
blue="#6fbfff"
debug_dialog() {
# This function is for displaying commands run by the Configurator without actually running them
# USAGE: debug_dialog "command"

View file

@ -372,9 +372,9 @@ post_update() {
) |
zenity --icon-name=net.retrodeck.retrodeck --progress --no-cancel --pulsate --auto-close \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title "RetroDECK Finishing Upgrade" \
--title "RetroDECK - Upgrade Process" \
--width=400 --height=200 \
--text="RetroDECK is finishing the upgrade process, please wait.\n\n If it feels like this is taking too much time, please ensure there aren't any windows that unexpectedly slipped into the background and need attention."
--text="RetroDECK is finishing up the upgrading process, please be patient.\n\n<span foreground='$purple' size='larger'><b>NOTICE - If the process is taking too long:</b></span>\n\nSome windows might be running in the background that could require your attention: pop-ups from emulators or the upgrade itself that needs user input to continue.\n\n"
version=$hard_version
conf_write

View file

@ -608,14 +608,13 @@ configurator_retrodeck_tools_dialog() {
(
update_rpcs3_firmware
) |
zenity --progress --pulsate \
zenity --progress --no-cancel --pulsate --auto-close \
--icon-name=net.retrodeck.retrodeck \
--window-icon="/app/share/icons/hicolor/scalable/apps/net.retrodeck.retrodeck.svg" \
--title="Downloading PS3 Firmware" \
--width=400 --height=200 \
--text="If it feels like this is taking too much time, please ensure there aren't any windows that unexpectedly slipped into the background and need attention.\n\n" \
--no-cancel \
--auto-close
--text="Dowloading and installing PS3 Firmware, please be patient.\n\n<span foreground='$purple' size='larger'><b>NOTICE - If the process is taking too long:</b></span>\n\nSome windows might be running in the background that could require your attention: pop-ups from emulators or the upgrade itself that needs user input to continue.\n\n"
else
configurator_generic_dialog "RetroDECK Configurator - Install: PS3 Firmware" "You do not appear to currently have Internet access, which is required by this tool. Please try again when network access has been restored."
configurator_retrodeck_tools_dialog