forked from CastroFidel/PortWINE
Added SORT_WITH_TIME and fixes spellcheck
This commit is contained in:
parent
ef9161c13a
commit
f7a5e591b0
@ -7,7 +7,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr "Project-Id-Version: PACKAGE VERSION\n"
|
msgstr "Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-10-07 11:18+0500\n"
|
"POT-Creation-Date: 2024-10-07 15:49+0500\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -1397,6 +1397,13 @@ msgstr ""
|
|||||||
msgid "Displays time spent in an application or game"
|
msgid "Displays time spent in an application or game"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Sort shortcuts by time"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "This setting sorts the shortcuts in the main menu depending on the "
|
||||||
|
"time spent in the application or game"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "GLOBAL SETTINGS (USER.CONF)"
|
msgid "GLOBAL SETTINGS (USER.CONF)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-10-07 10:51+0500\n"
|
"POT-Creation-Date: 2024-10-07 15:49+0500\n"
|
||||||
"PO-Revision-Date: 2024-09-19 23:35+0500\n"
|
"PO-Revision-Date: 2024-09-19 23:35+0500\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
@ -1831,6 +1831,14 @@ msgstr ""
|
|||||||
msgid "Displays time spent in an application or game"
|
msgid "Displays time spent in an application or game"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Sort shortcuts by time"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"This setting sorts the shortcuts in the main menu depending on the time "
|
||||||
|
"spent in the application or game"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "GLOBAL SETTINGS (USER.CONF)"
|
msgid "GLOBAL SETTINGS (USER.CONF)"
|
||||||
msgstr "AJUSTES USUARIO.CONF"
|
msgstr "AJUSTES USUARIO.CONF"
|
||||||
|
@ -7,8 +7,8 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: \n"
|
"Project-Id-Version: \n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-10-07 10:51+0500\n"
|
"POT-Creation-Date: 2024-10-07 15:49+0500\n"
|
||||||
"PO-Revision-Date: 2024-10-07 11:18+0500\n"
|
"PO-Revision-Date: 2024-10-07 15:52+0500\n"
|
||||||
"Last-Translator: \n"
|
"Last-Translator: \n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: ru_RU\n"
|
"Language: ru_RU\n"
|
||||||
@ -1805,6 +1805,16 @@ msgstr "Отображение времени"
|
|||||||
msgid "Displays time spent in an application or game"
|
msgid "Displays time spent in an application or game"
|
||||||
msgstr "Отображает общее время проведённое в приложении или игре"
|
msgstr "Отображает общее время проведённое в приложении или игре"
|
||||||
|
|
||||||
|
msgid "Sort shortcuts by time"
|
||||||
|
msgstr "Сортировка ярлыков по времени"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"This setting sorts the shortcuts in the main menu depending on the time "
|
||||||
|
"spent in the application or game"
|
||||||
|
msgstr ""
|
||||||
|
"Эта настройка сортирует ярлыки в главном меню в зависимости от времени, "
|
||||||
|
"проведенного в приложении или игре"
|
||||||
|
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid "GLOBAL SETTINGS (USER.CONF)"
|
msgid "GLOBAL SETTINGS (USER.CONF)"
|
||||||
msgstr "ГЛОБАЛЬНЫЕ НАСТРОЙКИ (USER.CONF)"
|
msgstr "ГЛОБАЛЬНЫЕ НАСТРОЙКИ (USER.CONF)"
|
||||||
|
@ -5225,12 +5225,20 @@ gui_userconf () {
|
|||||||
GPU_VAR="disabled"
|
GPU_VAR="disabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${DESKTOPS_WITH_TIME}" ]] \
|
if [[ -n "${DESKTOP_WITH_TIME}" ]] \
|
||||||
&& [[ "${DESKTOPS_WITH_TIME}" != "disabled" ]]
|
&& [[ "${DESKTOP_WITH_TIME}" != "disabled" ]]
|
||||||
then
|
then
|
||||||
DESKTOPS_WITH_TIME="${DESKTOPS_WITH_TIME}"
|
DESKTOP_WITH_TIME="enabled"
|
||||||
else
|
else
|
||||||
DESKTOPS_WITH_TIME="disabled"
|
DESKTOP_WITH_TIME="disabled"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${SORT_WITH_TIME}" ]] \
|
||||||
|
&& [[ "${SORT_WITH_TIME}" == "disabled" ]]
|
||||||
|
then
|
||||||
|
SORT_WITH_TIME="disabled"
|
||||||
|
else
|
||||||
|
SORT_WITH_TIME="enabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"${pw_yad}" --plug=$KEY_USERCONF_GUI --tabnum="2" --form --columns=1 --separator="%" --homogeneous-row \
|
"${pw_yad}" --plug=$KEY_USERCONF_GUI --tabnum="2" --form --columns=1 --separator="%" --homogeneous-row \
|
||||||
@ -5238,7 +5246,8 @@ gui_userconf () {
|
|||||||
--field="${translations[Choose a graphics card to run the game]}!${translations[Select which video card will be used to run the game (used for all running games and programs in PortProton)]} :CB" "$(combobox_fix --disabled "$GPU_VAR" "$GET_GPU_NAMES")" \
|
--field="${translations[Choose a graphics card to run the game]}!${translations[Select which video card will be used to run the game (used for all running games and programs in PortProton)]} :CB" "$(combobox_fix --disabled "$GPU_VAR" "$GET_GPU_NAMES")" \
|
||||||
--field="${translations[Choice wine audio driver]}!${translations[Fixes sound popling if choice alsa]} :CB" "$(combobox_fix --disabled "$SOUND_DRIVER_VAR" "alsa!oss!pulse")" \
|
--field="${translations[Choice wine audio driver]}!${translations[Fixes sound popling if choice alsa]} :CB" "$(combobox_fix --disabled "$SOUND_DRIVER_VAR" "alsa!oss!pulse")" \
|
||||||
--field="${translations[Choice gui themes]}!${translations[Allows you to select a theme for PortProton]} :CB" "$(combobox_fix "$GUI_THEME" "default!compact!classic")" \
|
--field="${translations[Choice gui themes]}!${translations[Allows you to select a theme for PortProton]} :CB" "$(combobox_fix "$GUI_THEME" "default!compact!classic")" \
|
||||||
--field="${translations[Time display]}!${translations[Displays time spent in an application or game]} :CB" "$(combobox_fix "$DESKTOPS_WITH_TIME" "enabled!disabled")" \
|
--field="${translations[Time display]}!${translations[Displays time spent in an application or game]} :CB" "$(combobox_fix "$DESKTOP_WITH_TIME" "enabled!disabled")" \
|
||||||
|
--field="${translations[Sort shortcuts by time]}!${translations[This setting sorts the shortcuts in the main menu depending on the time spent in the application or game]} :CB" "$(combobox_fix "$SORT_WITH_TIME" "enabled!disabled")" \
|
||||||
1> "${PW_TMPFS_PATH}/tmp_yad_userconf_set_cb" 2>/dev/null &
|
1> "${PW_TMPFS_PATH}/tmp_yad_userconf_set_cb" 2>/dev/null &
|
||||||
|
|
||||||
"${pw_yad}" --key=$KEY_USERCONF_GUI --paned --sensitive \
|
"${pw_yad}" --key=$KEY_USERCONF_GUI --paned --sensitive \
|
||||||
@ -5271,11 +5280,12 @@ gui_userconf () {
|
|||||||
166)
|
166)
|
||||||
IFS='%' read -r -a PW_ADD_SETTINGS_UC <"${PW_TMPFS_PATH}/tmp_yad_userconf_set_cb"
|
IFS='%' read -r -a PW_ADD_SETTINGS_UC <"${PW_TMPFS_PATH}/tmp_yad_userconf_set_cb"
|
||||||
IFS="$orig_IFS"
|
IFS="$orig_IFS"
|
||||||
PW_GPU_USE="${PW_ADD_SETTINGS_UC[0]}"
|
PW_GPU_USE=${PW_ADD_SETTINGS_UC[0]}
|
||||||
PW_SOUND_DRIVER_USE="${PW_ADD_SETTINGS_UC[1]}"
|
PW_SOUND_DRIVER_USE=${PW_ADD_SETTINGS_UC[1]}
|
||||||
GUI_THEME="${PW_ADD_SETTINGS_UC[2]}"
|
GUI_THEME="${PW_ADD_SETTINGS_UC[2]}"
|
||||||
DESKTOPS_WITH_TIME="${PW_ADD_SETTINGS_UC[3]}"
|
DESKTOP_WITH_TIME="${PW_ADD_SETTINGS_UC[3]}"
|
||||||
edit_user_conf_from_gui PW_GPU_USE PW_SOUND_DRIVER_USE GUI_THEME DESKTOPS_WITH_TIME
|
SORT_WITH_TIME="${PW_ADD_SETTINGS_UC[4]}"
|
||||||
|
edit_user_conf_from_gui PW_GPU_USE PW_SOUND_DRIVER_USE GUI_THEME DESKTOP_WITH_TIME SORT_WITH_TIME
|
||||||
restart_pp
|
restart_pp
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -5349,10 +5359,11 @@ portwine_create_shortcut () {
|
|||||||
[[ -z "${PW_SHORTCUT_STEAM}" ]] && PW_SHORTCUT_STEAM="FALSE"
|
[[ -z "${PW_SHORTCUT_STEAM}" ]] && PW_SHORTCUT_STEAM="FALSE"
|
||||||
|
|
||||||
if [[ -z "${PORTPROTON_NAME}" ]] ; then
|
if [[ -z "${PORTPROTON_NAME}" ]] ; then
|
||||||
export name_desktop="$(basename "$portwine_exe")"
|
name_desktop="$(basename "$portwine_exe")"
|
||||||
else
|
else
|
||||||
export name_desktop="${PORTPROTON_NAME}"
|
name_desktop="${PORTPROTON_NAME}"
|
||||||
fi
|
fi
|
||||||
|
export name_desktop
|
||||||
|
|
||||||
[[ -z "${name_desktop_png}" ]] && name_desktop_png="${PORTPROTON_NAME// /_}"
|
[[ -z "${name_desktop_png}" ]] && name_desktop_png="${PORTPROTON_NAME// /_}"
|
||||||
|
|
||||||
@ -5503,8 +5514,12 @@ pw_auto_create_shortcut () {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
[[ -z "$LINKS" ]] && return 0
|
[[ -z "${LINKS[0]}" ]] && return 0
|
||||||
SORTED_LINKS=($(echo ${LINKS[@]} | tr ' ' '\n' | sort -u))
|
SORTED_LINKS=()
|
||||||
|
while IFS= read -r line ; do
|
||||||
|
SORTED_LINKS+=("$line");
|
||||||
|
done < <(echo ${LINKS[@]} | tr ' ' '\n' | sort -u)
|
||||||
|
IFS="$orig_IFS"
|
||||||
|
|
||||||
for link_file in "${SORTED_LINKS[@]//@_@/ }" ; do
|
for link_file in "${SORTED_LINKS[@]//@_@/ }" ; do
|
||||||
if command -v exiftool &>/dev/null ; then
|
if command -v exiftool &>/dev/null ; then
|
||||||
|
@ -497,7 +497,7 @@ if [[ -f "${portwine_exe}" ]] ; then
|
|||||||
PW_SHORTCUT="${translations[DELETE SHORTCUT]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE.png!${translations[Delete shortcut for select file...]}:98"
|
PW_SHORTCUT="${translations[DELETE SHORTCUT]}!$PW_GUI_ICON_PATH/$BUTTON_SIZE.png!${translations[Delete shortcut for select file...]}:98"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $DESKTOPS_WITH_TIME == enabled ]] ; then
|
if [[ $DESKTOP_WITH_TIME == enabled ]] ; then
|
||||||
search_desktop_file
|
search_desktop_file
|
||||||
fi
|
fi
|
||||||
if [[ -z "${PW_COMMENT_DB}" ]] ; then
|
if [[ -z "${PW_COMMENT_DB}" ]] ; then
|
||||||
@ -638,7 +638,11 @@ else
|
|||||||
# Чтобы новый ярлык показало первым при первом запуске, потом уже по времени
|
# Чтобы новый ярлык показало первым при первом запуске, потом уже по времени
|
||||||
if [[ $WITH_TIME != 1 ]] ; then
|
if [[ $WITH_TIME != 1 ]] ; then
|
||||||
echo "#Time=0" >> "$desktop_file"
|
echo "#Time=0" >> "$desktop_file"
|
||||||
PW_AMOUNT_NO_TIME+=($AMOUNT_GENERATE_BUTTONS)
|
if [[ $SORT_WITH_TIME == enabled ]] ; then
|
||||||
|
PW_AMOUNT_NO_TIME+=($AMOUNT_GENERATE_BUTTONS)
|
||||||
|
else
|
||||||
|
PW_AMOUNT_WITH_TIME+=($AMOUNT_GENERATE_BUTTONS)
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
if [[ ! ${PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]} =~ [0-9]+ ]] ; then
|
if [[ ! ${PW_GAME_TIME["$AMOUNT_GENERATE_BUTTONS"]} =~ [0-9]+ ]] ; then
|
||||||
sed -i '/^#Time=/d' "$desktop_file"
|
sed -i '/^#Time=/d' "$desktop_file"
|
||||||
@ -655,26 +659,28 @@ else
|
|||||||
|
|
||||||
# Переопределение элементов в массивах в зависимости от PW_GAME_TIME, от большего значения к меньшему.
|
# Переопределение элементов в массивах в зависимости от PW_GAME_TIME, от большего значения к меньшему.
|
||||||
# 10 миллисекунд на 40 .desktop файлов, работает быстро
|
# 10 миллисекунд на 40 .desktop файлов, работает быстро
|
||||||
for i in "${!PW_GAME_TIME[@]}" ; do
|
if [[ $SORT_WITH_TIME == enabled ]] ; then
|
||||||
for j in "${!PW_GAME_TIME[@]}" ; do
|
for i in "${!PW_GAME_TIME[@]}" ; do
|
||||||
if (( ${PW_GAME_TIME[$i]} > ${PW_GAME_TIME[$j]} )) ; then
|
for j in "${!PW_GAME_TIME[@]}" ; do
|
||||||
tmp_0=${PW_GAME_TIME[$i]}
|
if (( ${PW_GAME_TIME[$i]} > ${PW_GAME_TIME[$j]} )) ; then
|
||||||
tmp_1=${PW_ALL_DF[$i]}
|
tmp_0=${PW_GAME_TIME[$i]}
|
||||||
tmp_2=${PW_NAME_D_ICON[$i]}
|
tmp_1=${PW_ALL_DF[$i]}
|
||||||
tmp_4=${PW_ICON_PATH[$i]}
|
tmp_2=${PW_NAME_D_ICON[$i]}
|
||||||
|
tmp_4=${PW_ICON_PATH[$i]}
|
||||||
|
|
||||||
PW_GAME_TIME[i]=${PW_GAME_TIME[$j]}
|
PW_GAME_TIME[i]=${PW_GAME_TIME[$j]}
|
||||||
PW_ALL_DF[i]=${PW_ALL_DF[$j]}
|
PW_ALL_DF[i]=${PW_ALL_DF[$j]}
|
||||||
PW_NAME_D_ICON[i]=${PW_NAME_D_ICON[$j]}
|
PW_NAME_D_ICON[i]=${PW_NAME_D_ICON[$j]}
|
||||||
PW_ICON_PATH[i]=${PW_ICON_PATH[$j]}
|
PW_ICON_PATH[i]=${PW_ICON_PATH[$j]}
|
||||||
|
|
||||||
PW_GAME_TIME[j]=$tmp_0
|
PW_GAME_TIME[j]=$tmp_0
|
||||||
PW_ALL_DF[j]=$tmp_1
|
PW_ALL_DF[j]=$tmp_1
|
||||||
PW_NAME_D_ICON[j]=$tmp_2
|
PW_NAME_D_ICON[j]=$tmp_2
|
||||||
PW_ICON_PATH[j]=$tmp_4
|
PW_ICON_PATH[j]=$tmp_4
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
done
|
done
|
||||||
done
|
fi
|
||||||
|
|
||||||
# Генерация .desktop баттанов для главного меню
|
# Генерация .desktop баттанов для главного меню
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
|
Loading…
Reference in New Issue
Block a user