diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index 25f1c26..3cdf040 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -625,16 +625,13 @@ combobox_fix () { restart_pp () { if [[ -n "$1" ]] ; then if [[ "$1" == "--userconf" ]] ; then - /usr/bin/env bash -c "${pw_full_command_line[0]} --gui_userconf" & - exit 0 + export RESTART_PP_USED="userconf" elif [[ "$1" == "--edit_db" ]] ; then - /usr/bin/env bash -c "${pw_full_command_line[0]} --gui_edit_db" & - exit 0 + export RESTART_PP_USED="edit_db" fi - else - /usr/bin/env bash -c ${pw_full_command_line[@]} & - exit 0 fi + /usr/bin/env bash -c ${pw_full_command_line[@]} & + exit 0 } pw_clear_pfx () { diff --git a/data_from_portwine/scripts/start.sh b/data_from_portwine/scripts/start.sh index d0d44e4..ac8bc7a 100755 --- a/data_from_portwine/scripts/start.sh +++ b/data_from_portwine/scripts/start.sh @@ -566,9 +566,11 @@ fi if [[ -f "${portwine_exe}" ]] ; then unset TAB_MAIN_MENU - if [[ "$1" == "--gui_edit_db" ]] ; then + if [[ "$RESTART_PP_USED" == "edit_db" ]] ; then + unset RESTART_PP_USED gui_edit_db - elif [[ "$1" == "--gui_userconf" ]] ; then + elif [[ "$RESTART_PP_USED" == "userconf" ]] ; then + unset RESTART_PP_USED gui_userconf fi if [[ "${PW_GUI_DISABLED_CS}" != 1 ]] ; then @@ -681,7 +683,8 @@ else then export PW_GUI_SORT_TABS=(1 2 3 4 5) else export PW_GUI_SORT_TABS=(2 3 4 5 1) fi - if [[ "$1" == "--gui_userconf" ]] ; then + if [[ "$RESTART_PP_USED" == "userconf" ]] ; then + unset RESTART_PP_USED gui_userconf fi