forked from CastroFidel/PortWINE
		
	Saves values when creating shortcuts
This commit is contained in:
		| @@ -4404,6 +4404,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 \ | ||||
| @@ -4414,9 +4418,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 | ||||
| @@ -4429,9 +4433,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 | ||||
| @@ -4447,6 +4451,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}" ]] | ||||
|   | ||||
		Reference in New Issue
	
	Block a user