sed -i "s|$FILE_SHA256SUM\(.*\)|$FILE_SHA256SUM\1 L5-$LAST_LAUNCH|""$PORT_WINE_TMP_PATH/statistics"
else
else
# ремонт, если L4 по каким-то причинам сломался
sed -i "s|$FILE_SHA256SUM\(.*\)${line2[5]}|$FILE_SHA256SUM\1 L5-$LAST_LAUNCH|""$PORT_WINE_TMP_PATH/statistics"
if [[ ${line2[4]} =~ ^L4 ]] ; then
local NUMBER_OF_STARTS=$((${line2[4]//L4-/}+1))
else
SKIP_REPAIR=1
sed -i "s|$FILE_SHA256SUM\(.*\)${line2[4]}|$FILE_SHA256SUM\1 L4-1|""$PORT_WINE_TMP_PATH/statistics"
fi
fi
(( count_line ++ ))
# Пример для L5
# if [[ -z ${line2[5]} ]] ; then
# SKIP_REPAIR=1
# sed -i "s|$FILE_SHA256SUM\(.*\)|$FILE_SHA256SUM\1 L5-1|""$PORT_WINE_TMP_PATH/statistics"
# else
# if [[ ${line2[5]} =~ ^L5 ]] ; then
# local ЗДЕСЬ_НОВАЯ_ПЕРЕМЕННАЯ=$((${line2[5]//L5-/}+1))
# else
# SKIP_REPAIR=1
# sed -i "s|$FILE_SHA256SUM\(.*\)${line2[5]}|$FILE_SHA256SUM\1 L5-1|""$PORT_WINE_TMP_PATH/statistics"
# fi
# fi
# (( count_line ++ ))
if [[ $SKIP_REPAIR != 1 ]] ; then
# Ремонт, если количество элементов массива по каким-то причина больше, чем должно быть
if [[ -n ${line2["$count_line"]} ]] ; then
for i in $(seq$count_line${#line2[@]}) ; do
unset 'line2[$i]'
done
sed -i "s|${portwine_exe// /#@_@#}$FILE_SHA256SUM\(.*\)|${line2[*]}|""$PORT_WINE_TMP_PATH/statistics"
fi
# Сюда все sedы от L4, L5 и т.д. (после всех ремонтов)
sed -i "s|$FILE_SHA256SUM\(.*\)${line2[4]}|$FILE_SHA256SUM\1 L4-$NUMBER_OF_STARTS|""$PORT_WINE_TMP_PATH/statistics"
# sed -i "s|$FILE_SHA256SUM\(.*\)${line2[5]}|$FILE_SHA256SUM\1 L5-$NUMBER_OF_STARTS|""$PORT_WINE_TMP_PATH/statistics"
fi
fi
fi
fi
fi
fi
...
@@ -6032,12 +6027,12 @@ gui_userconf () {
...
@@ -6032,12 +6027,12 @@ gui_userconf () {
DESKTOP_WITH_TIME="disabled"
DESKTOP_WITH_TIME="disabled"
fi
fi
if [[ -n "$SORT_WITH_TIME" ]] \
if [[ $SORT_WITH_TIME == "lastlaunch" ]] ; then
&& [[ "$SORT_WITH_TIME" == "disabled" ]]
SORT_WITH_TIME=${translations[According to last launch]}
then
elif [[ $SORT_WITH_TIME == "bytime" ]] ; then
SORT_WITH_TIME="disabled"
SORT_WITH_TIME=${translations[By time]}
else
else
SORT_WITH_TIME="enabled"
SORT_WITH_TIME="disabled"
fi
fi
if [[ $PW_WINE_DPI_VALUE == "recommended" ]] ; then
if [[ $PW_WINE_DPI_VALUE == "recommended" ]] ; then
...
@@ -6074,7 +6069,7 @@ gui_userconf () {
...
@@ -6074,7 +6069,7 @@ gui_userconf () {
--field="${translations[Select PortProton theme]}!${translations[Allows you to select a theme for PortProton]} :CB" "$(combobox_fix "$GUI_THEME" "${translations[default]}!${translations[compact]}!${translations[classic]}")" \
--field="${translations[Select PortProton theme]}!${translations[Allows you to select a theme for PortProton]} :CB" "$(combobox_fix "$GUI_THEME" "${translations[default]}!${translations[compact]}!${translations[classic]}")" \
--field="${translations[Select gtk theme]}!${translations[Allows you to select a theme for GTK.]} :CB" "$(combobox_fix "$GTK_THEME" "${YAD_GTK_THEME}Adwaita:${translations[light]}!Adwaita:${translations[dark]}!${translations[default]}")" \
--field="${translations[Select gtk theme]}!${translations[Allows you to select a theme for GTK.]} :CB" "$(combobox_fix "$GTK_THEME" "${YAD_GTK_THEME}Adwaita:${translations[light]}!Adwaita:${translations[dark]}!${translations[default]}")" \
--field="${translations[Time display]}!${translations[Displays time spent in an application or game]} :CB" "$(combobox_fix --disabled "$DESKTOP_WITH_TIME" "${translations[Show in hours and minutes]}!${translations[Show in days, hours, minutes]}")" \
--field="${translations[Time display]}!${translations[Displays time spent in an application or game]} :CB" "$(combobox_fix --disabled "$DESKTOP_WITH_TIME" "${translations[Show in hours and minutes]}!${translations[Show in days, hours, minutes]}")" \
--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 --disabled "$SORT_WITH_TIME" "enabled")" \
--field="${translations[Sort shortcuts by]}!${translations[This setting sorts the shortcuts in the main menu]} :CB" "$(combobox_fix --disabled "$SORT_WITH_TIME" "${translations[According to last launch]}!${translations[By time]}")" \