Commit caa0ddcb authored by Vladislav's avatar Vladislav

Added open directory

parent 9fd99f02
......@@ -4696,7 +4696,7 @@ gui_userconf () {
KEY_USERCONF_GUI=$RANDOM
"${pw_yad}" --plug=$KEY_USERCONF_GUI --tabnum="1" --form --columns=3 --separator=" " --text-align=center \
"${pw_yad}" --plug=$KEY_USERCONF_GUI --tabnum="1" --form --columns=2 --separator=" " --text-align=center \
--text "$(gettext "Change settings for") <b>user.conf</b>\n $(gettext "<b>NOTE:</b> To display help for each item, simply hover your mouse over the text")" \
--align-buttons --homogeneous-column --gui-type-text="${PANED_GUI_TYPE_TEXT_UP}" --gui-type-layout="${PANED_GUI_TYPE_LAYOUT_UP}" \
--field=" $(gettext "Change mirror to") $NEW_MIRROR"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png"!"$(gettext "Depending on which mirror is selected, updates will be downloaded from there.")":"FBTN" '@bash -c "button_click --userconf change_mirror"' \
......@@ -5585,6 +5585,14 @@ change_download_grid () {
}
export -f change_download_grid
open_game_folder () {
xdg-open "${PATH_TO_GAME}"
/usr/bin/env bash -c ${pw_full_command_line[*]} &
print_info "Restarting PP after open game folder..."
exit 0
}
export -f open_game_folder
change_gui_start () {
if [[ "$PW_GUI_START" == "NOTEBOOK" ]] ; then
sed -i 's/="NOTEBOOK"/="PANED"/g' "$USER_CONF"
......
......@@ -594,6 +594,7 @@ if [[ -f "${portwine_exe}" ]] ; then
--gui-type-layout="${START_GUI_TYPE_LAYOUT_NOTEBOOK}" \
--field=" $(gettext "Base settings")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(gettext "Edit database file for") ${PORTWINE_DB}":"FBTN" '@bash -c "button_click --start 118"' \
--field=" $(gettext "Settings user.conf")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(gettext "Settings for user.conf")":"FBTN" '@bash -c "button_click --start 128"' \
--field=" $(gettext "Open directory")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(gettext "Open directory with <b>.ppdb</b> file")":"FBTN" '@bash -c "button_click --start open_game_folder"' \
--field=" vkBasalt"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(gettext "Enable vkBasalt by default to improve graphics in games running on Vulkan. (The HOME hotkey disables vkbasalt)")":"FBTN" '@bash -c "button_click --start 120"' \
--field=" MangoHud"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(gettext "Enable Mangohud by default (R_SHIFT + F12 keyboard shortcuts disable Mangohud)")":"FBTN" '@bash -c "button_click --start 122"' \
--field=" dgVoodoo2"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(gettext "Enable dgVoodoo2 by default (This wrapper fixes many compatibility and rendering issues when running old games)")":"FBTN" '@bash -c "button_click --start 124"' \
......@@ -638,6 +639,7 @@ if [[ -f "${portwine_exe}" ]] ; then
--align-buttons --homogeneous-row --homogeneous-column \
--field=" $(gettext "Base settings")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(gettext "Edit database file for") ${PORTWINE_DB}":"FBTN" '@bash -c "button_click --start 118"' \
--field=" $(gettext "Settings user.conf")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(gettext "Settings for user.conf")":"FBTN" '@bash -c "button_click --start 128"' \
--field=" $(gettext "Open directory")"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(gettext "Open directory with <b>.ppdb</b> file")":"FBTN" '@bash -c "button_click --start open_game_folder"' \
--field=" vkBasalt"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(gettext "Enable vkBasalt by default to improve graphics in games running on Vulkan. (The HOME hotkey disables vkbasalt)")":"FBTN" '@bash -c "button_click --start 120"' \
--field=" MangoHud"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(gettext "Enable Mangohud by default (R_SHIFT + F12 keyboard shortcuts disable Mangohud)")":"FBTN" '@bash -c "button_click --start 122"' \
--field=" dgVoodoo2"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE.png"!"$(gettext "Enable dgVoodoo2 by default (This wrapper fixes many compatibility and rendering issues when running old games)")":"FBTN" '@bash -c "button_click --start 124"' \
......@@ -902,6 +904,7 @@ esac
change_branch) change_branch ;;
change_gui_start) change_gui_start ;;
change_download_grid) change_download_grid ;;
open_game_folder) open_game_folder ;;
118) gui_edit_db ;;
120) gui_vkbasalt ;;
122) gui_mangohud ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment