Merge branch 'Htylol-saved-state-shortcut' into devel
This commit is contained in:
commit
df5d1b2675
@ -4452,6 +4452,10 @@ portwine_create_shortcut () {
|
||||
unset PORTPROTON_NAME
|
||||
pw_create_gui_png
|
||||
|
||||
[[ -z "${PW_SHORTCUT_MENU}" ]] && PW_SHORTCUT_MENU="TRUE"
|
||||
[[ -z "${PW_SHORTCUT_DESKTOP}" ]] && PW_SHORTCUT_DESKTOP="TRUE"
|
||||
[[ -z "${PW_SHORTCUT_STEAM}" ]] && PW_SHORTCUT_STEAM="FALSE"
|
||||
|
||||
if [[ "$1" == "block_name" ]] ; then
|
||||
export name_desktop="${PORTPROTON_NAME}"
|
||||
OUTPUT=$("${pw_yad}" --title="$(gettext "Choices")" --form \
|
||||
@ -4462,9 +4466,9 @@ portwine_create_shortcut () {
|
||||
--image "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png" \
|
||||
--text-align="center" --text "$(gettext "The shortcut will be created in the PortProton directory.")" \
|
||||
--field=" ${name_desktop}":LBL "" \
|
||||
--field=" $(gettext "Add shortcut to MENU -> GAMES")":CHK "TRUE" \
|
||||
--field=" $(gettext "Add shortcut to Desktop")":CHK "TRUE" \
|
||||
--field=" $(gettext "Add shortcut to STEAM library")":CHK "FALSE" \
|
||||
--field=" $(gettext "Add shortcut to MENU -> GAMES")":CHK "$PW_SHORTCUT_MENU" \
|
||||
--field=" $(gettext "Add shortcut to Desktop")":CHK "$PW_SHORTCUT_DESKTOP" \
|
||||
--field=" $(gettext "Add shortcut to STEAM library")":CHK "$PW_SHORTCUT_STEAM" \
|
||||
--button="$(gettext "CREATE SHORTCUT")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png":0)
|
||||
PW_YAD_OUT=$?
|
||||
else
|
||||
@ -4477,9 +4481,9 @@ portwine_create_shortcut () {
|
||||
--image "${PORT_WINE_PATH}/data/img/${PORTPROTON_NAME}.png" \
|
||||
--text-align="center" --text "$(gettext "The shortcut will be created in the PortProton directory.")" \
|
||||
--field="$(gettext "Name")" "${name_desktop}" \
|
||||
--field=" $(gettext "Add shortcut to MENU -> GAMES")":CHK "TRUE" \
|
||||
--field=" $(gettext "Add shortcut to Desktop")":CHK "TRUE" \
|
||||
--field=" $(gettext "Add shortcut to STEAM library")":CHK "FALSE" \
|
||||
--field=" $(gettext "Add shortcut to MENU -> GAMES")":CHK "$PW_SHORTCUT_MENU" \
|
||||
--field=" $(gettext "Add shortcut to Desktop")":CHK "$PW_SHORTCUT_DESKTOP" \
|
||||
--field=" $(gettext "Add shortcut to STEAM library")":CHK "$PW_SHORTCUT_STEAM" \
|
||||
--button="$(gettext "CREATE SHORTCUT")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png":0)
|
||||
PW_YAD_OUT=$?
|
||||
fi
|
||||
@ -4495,6 +4499,12 @@ portwine_create_shortcut () {
|
||||
create_desktop_desktop_shortcut=$(echo "$OUTPUT" | awk -F'|' '{print $3}')
|
||||
create_menu_steam_shortcut=$(echo "$OUTPUT" | awk -F'|' '{print $4}')
|
||||
|
||||
PW_SHORTCUT_MENU="$create_menu_desktop_shortcut"
|
||||
PW_SHORTCUT_DESKTOP="$create_desktop_desktop_shortcut"
|
||||
PW_SHORTCUT_STEAM="$create_menu_steam_shortcut"
|
||||
|
||||
edit_user_conf_from_gui PW_SHORTCUT_MENU PW_SHORTCUT_DESKTOP PW_SHORTCUT_STEAM
|
||||
|
||||
try_remove_file "${PORT_WINE_PATH}/${name_desktop}.desktop"
|
||||
|
||||
if [[ "${PORTPROTON_NAME}" != "${name_desktop_png}" ]]
|
||||
|
Loading…
Reference in New Issue
Block a user