Commit 89b06f8b authored by Vladislav's avatar Vladislav

Added yad_question for change_branch

parent 2d44a0b0
......@@ -7,7 +7,7 @@
msgid ""
msgstr "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-11 19:56+0500\n"
"POT-Creation-Date: 2024-09-11 22:46+0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -1488,6 +1488,9 @@ msgstr ""
msgid "Mirror changed to:"
msgstr ""
msgid "Do you actually want to change the scripts version to:"
msgstr ""
msgid "Branch changed to:"
msgstr ""
......
......@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-11 19:39+0500\n"
"PO-Revision-Date: 2024-09-11 19:56+0500\n"
"POT-Creation-Date: 2024-09-11 22:45+0500\n"
"PO-Revision-Date: 2024-09-11 22:46+0500\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es_ES\n"
......@@ -1927,6 +1927,9 @@ msgstr "¿Realmente desea eliminar PortProton?"
msgid "Mirror changed to:"
msgstr "Espejo cambiado a:"
msgid "Do you actually want to change the scripts version to:"
msgstr "¿Realmente desea cambiar la versión de los scripts a:"
msgid "Branch changed to:"
msgstr "Rama cambiada a:"
......
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-09-11 19:39+0500\n"
"PO-Revision-Date: 2024-09-11 19:41+0500\n"
"POT-Creation-Date: 2024-09-11 22:45+0500\n"
"PO-Revision-Date: 2024-09-11 22:45+0500\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ru_RU\n"
......@@ -1900,6 +1900,9 @@ msgstr "Вы действительно хотите удалить PortProton?"
msgid "Mirror changed to:"
msgstr "Зеркало для скачивания изменено на:"
msgid "Do you actually want to change the scripts version to:"
msgstr "Вы действительно хотите изменить версию скриптов на:"
msgid "Branch changed to:"
msgstr "Версия изменена на:"
......
......@@ -4696,7 +4696,7 @@ gui_userconf () {
KEY_USERCONF_GUI=$RANDOM
"${pw_yad}" --plug=$KEY_USERCONF_GUI --tabnum="1" --form --columns=2 --separator=" " --text-align=center --align-buttons --separator=";" --homogeneous-column \
"${pw_yad}" --plug=$KEY_USERCONF_GUI --tabnum="1" --form --columns=2 --separator=" " --text-align=center --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"!"":"FBTN" '@bash -c "button_click --userconf change_mirror"' \
--field=" $(gettext "Change branch to") $NEW_BRANCH"!"$PW_GUI_ICON_PATH/$BUTTON_SIZE_MM.png"!"":"FBTN" '@bash -c "button_click --userconf change_branch"' \
......@@ -4761,7 +4761,6 @@ gui_userconf () {
change_mirror
;;
change_branch)
unset SKIP_CHECK_UPDATES
change_branch
;;
change_gui_start)
......@@ -5546,14 +5545,22 @@ export -f change_mirror
change_branch () {
if [[ "$BRANCH" == "master" ]] ; then
sed -i 's/="master"/="devel"/g' "$USER_CONF"
export MIRROR="GITHUB"
yad_info "$(gettext "Branch changed to:") <b>DEVEL</b>"
if yad_question "$(gettext "Do you actually want to change the scripts version to:") <b>DEVEL?</b>" ; then
sed -i 's/="master"/="devel"/g' "$USER_CONF"
export MIRROR="GITHUB"
pw_notify_send -i info \
"$(gettext "Branch changed to:")" "<b>DEVEL</b>"
unset SKIP_CHECK_UPDATES
fi
else
sed -i 's/="devel"/="master"/g' "$USER_CONF"
echo "2024" > "${PORT_WINE_TMP_PATH}/scripts_ver"
export PW_CHANGE_BRANCH="1"
yad_info "$(gettext "Branch changed to:") <b>STABLE</b>"
if yad_question "$(gettext "Do you actually want to change the scripts version to:") <b>STABLE?</b>" ; then
sed -i 's/="devel"/="master"/g' "$USER_CONF"
echo "2024" > "${PORT_WINE_TMP_PATH}/scripts_ver"
export PW_CHANGE_BRANCH="1"
pw_notify_send -i info \
"$(gettext "Branch changed to:")" "<b>STABLE</b>"
unset SKIP_CHECK_UPDATES
fi
fi
print_info "Restarting PP for change branch..."
/usr/bin/env bash -c "${pw_full_command_line[0]} --gui_userconf" &
......
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