Restarting PP when you press cancel when creating shortcuts

This commit is contained in:
Htylol 2024-09-11 19:37:56 +05:00
parent 6d750ef870
commit 890af9424d
2 changed files with 12 additions and 3 deletions

@ -4942,10 +4942,19 @@ portwine_create_shortcut () {
if [[ "$PW_NO_RESTART_PPDB" != "1" ]] ; then if [[ "$PW_NO_RESTART_PPDB" != "1" ]] ; then
print_info "Restarting PP..." print_info "Restarting PP..."
unset PW_YAD_FORM_TAB if [[ "${PW_GUI_START}" == "NOTEBOOK" ]] ; then
unset PW_YAD_FORM_TAB
fi
/usr/bin/env bash -c ${pw_full_command_line[*]} & /usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0 exit 0
fi fi
elif [[ "$PW_YAD_OUT" == "2" ]] ; then
print_info "Restarting PP..."
if [[ "${PW_GUI_START}" == "NOTEBOOK" ]] ; then
unset PW_YAD_FORM_TAB
fi
/usr/bin/env bash -c ${pw_full_command_line[*]} &
exit 0
fi fi
} }

@ -601,7 +601,7 @@ if [[ -f "${portwine_exe}" ]] ; then
2>/dev/null & 2>/dev/null &
if [[ "${PW_YAD_FORM_TAB}" == "1" ]] \ if [[ "${PW_YAD_FORM_TAB}" == "1" ]] \
&& [[ ! -z "${TAB_START}" ]] && [[ -n "${TAB_START}" ]]
then then
export TAB_START="2" export TAB_START="2"
unset PW_YAD_FORM_TAB unset PW_YAD_FORM_TAB
@ -655,7 +655,7 @@ if [[ -f "${portwine_exe}" ]] ; then
--button="$(gettext "LAUNCH")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(gettext "Run file ...")":106 2>/dev/null --button="$(gettext "LAUNCH")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(gettext "Run file ...")":106 2>/dev/null
PW_YAD_SET="$?" PW_YAD_SET="$?"
fi fi
[[ ! -z "$PW_YAD_SET" ]] && case "$PW_YAD_SET" in [[ -n "$PW_YAD_SET" ]] && case "$PW_YAD_SET" in
128) 128)
if [[ "${PW_GUI_START}" == "NOTEBOOK" ]] ; then if [[ "${PW_GUI_START}" == "NOTEBOOK" ]] ; then
unset PW_YAD_FORM_TAB unset PW_YAD_FORM_TAB