From baded6750e33e04f2c2f5bc22f54b48352c5269d Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Tue, 3 Feb 2026 14:18:31 +0600 Subject: [PATCH] Switched package info function --- locale/ubinstall-gtk.pot | 54 +++++++++++++++++++++++++++++ locale/ubinstall-gtk_ru.po | 59 +++++++++++++++++++++++++++----- source/ubinstall-gtk-kernel.c | 7 ++-- source/ubl-strings.h | 20 ++++++++++- ubinstall-gtk-package-info.glade | 4 +-- 5 files changed, 131 insertions(+), 13 deletions(-) diff --git a/locale/ubinstall-gtk.pot b/locale/ubinstall-gtk.pot index 086cf87..c244c5a 100644 --- a/locale/ubinstall-gtk.pot +++ b/locale/ubinstall-gtk.pot @@ -266,6 +266,60 @@ msgstr "" msgid "Kb" msgstr "" +msgstr "Repository" +msgid "" + +msgstr "Name" +msgid "" + +msgstr "Version" +msgid "" + +msgstr "Description" +msgid "" + +msgstr "Architecture" +msgid "" + +msgstr "URL" +msgid "" + +msgstr "Licenses" +msgid "" + +msgstr "Groups" +msgid "" + +msgstr "Provides" +msgid "" + +msgstr "Depends On" +msgid "" + +msgstr "Optional Deps" +msgid "" + +msgstr "Conflicts With" +msgid "" + +msgstr "Replaces" +msgid "" + +msgstr "Download Size" +msgid "" + +msgstr "Installed Size" +msgid "" + +msgstr "Packager" +msgid "" + +msgstr "Build Date" +msgid "" + +msgstr "Validated By" +msgid "" + #: source/ubl-strings.h:69 msgid "Available languages in the system:" msgstr "" diff --git a/locale/ubinstall-gtk_ru.po b/locale/ubinstall-gtk_ru.po index 8c34c66..67445d7 100644 --- a/locale/ubinstall-gtk_ru.po +++ b/locale/ubinstall-gtk_ru.po @@ -277,6 +277,57 @@ msgstr "Мб" msgid "Kb" msgstr "Кб" +msgid "Repository" +msgstr "Репозиторий" + +msgid "Name" +msgstr "Название" + +msgid "Version" +msgstr "Версия" + +msgid "Architecture" +msgstr "Архитектура" + +msgid "URL" +msgstr "URL" + +msgid "Licenses" +msgstr "Лицензии" + +msgid "Groups" +msgstr "Группы" + +msgid "Provides" +msgstr "Предоставляет" + +msgid "Depends On" +msgstr "Зависит от" + +msgid "Optional Deps" +msgstr "Доп. зависимости" + +msgid "Conflicts With" +msgstr "Конфликтует с" + +msgid "Replaces" +msgstr "Заменяет" + +msgid "Download Size" +msgstr "Размер загрузки" + +msgid "Installed Size" +msgstr "Установленный размер" + +msgid "Packager" +msgstr "Сборщик" + +msgid "Build Date" +msgstr "Дата сборки" + +msgid "Validated By" +msgstr "Проверен" + #: source/ubl-strings.h:69 msgid "Available languages in the system:" msgstr "Доступные языки в системе:" @@ -857,10 +908,6 @@ msgstr "NumLock:" msgid "Variant" msgstr "Вариант" -#: source/ubl-strings.h:256 source/ubl-strings.h:312 -msgid "Name" -msgstr "Имя" - #: source/ubl-strings.h:258 msgid "Options:" msgstr "Опции:" @@ -1101,10 +1148,6 @@ msgstr "Маска:" msgid "DNS-server:" msgstr "DNS-сервер:" -#: source/ubl-strings.h:323 -msgid "Version" -msgstr "Версия" - #: source/ubl-strings.h:324 msgid "Unit:" msgstr "Юнит:" diff --git a/source/ubinstall-gtk-kernel.c b/source/ubinstall-gtk-kernel.c index 16f2e0c..a5ac137 100644 --- a/source/ubinstall-gtk-kernel.c +++ b/source/ubinstall-gtk-kernel.c @@ -284,7 +284,10 @@ void on_kernel_addon_info(GtkLabel *self){ } GtkWidget *label = NULL; - config_str info = yon_config_load(get_package_info_command(package),&size); + yon_packages_info *info_struct = yon_packages_get_info_struct(YON_PACKAGES_ALL,package); + if (!info_struct) return; + char* info_string = yon_packages_get_info_string(info_struct); + config_str info = yon_char_parse(info_string,&size,"\n"); if (size!=-1){ info_element *element = yon_package_info_element_new(); gtk_box_pack_start(GTK_BOX(window->MainBox),element->MainBox,1,1,0); @@ -292,7 +295,7 @@ void on_kernel_addon_info(GtkLabel *self){ yon_char_remove_last_symbol(info[i],'\n'); GtkTreeIter iter; int parsed_size; - config_str parsed = yon_char_parse(info[i],&parsed_size," : "); + config_str parsed = yon_char_parse(info[i],&parsed_size,":"); gtk_list_store_append(element->InfoList,&iter); gtk_list_store_set(element->InfoList,&iter,0,parsed[0],1,parsed[1],-1); diff --git a/source/ubl-strings.h b/source/ubl-strings.h index ef9fe21..62d21c2 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -438,6 +438,24 @@ NULL) // #define _LABEL _("System recovery successfully completed!") // #define _LABEL _("You can reboot the system and use the installed version or continue to work in the current system.") // #define _LABEL _("Selecting additional system kernel components from the repository. Internet access required") +// #define _LABEL _("Repository") +// #define _LABEL _("Name") +// #define _LABEL _("Version") +// #define _LABEL _("Description") +// #define _LABEL _("Architecture") +// #define _LABEL _("URL") +// #define _LABEL _("Licenses") +// #define _LABEL _("Groups") +// #define _LABEL _("Provides") +// #define _LABEL _("Depends On") +// #define _LABEL _("Optional Deps") +// #define _LABEL _("Conflicts With") +// #define _LABEL _("Replaces") +// #define _LABEL _("Download Size") +// #define _LABEL _("Installed Size") +// #define _LABEL _("Packager") +// #define _LABEL _("Build Date") +// #define _LABEL _("Validated By") #define slide_1_title _("Product ecosystem") #define slide_1_text _("Developed by a team of professionals and successfully presented on the market.\n\ @@ -543,4 +561,4 @@ For more information, visit our website the \"Support Levels\" section.") #define slide_21_text _("Continuously evolving and clearly describes the installation and configuration of the system, as well as the use of its features. Located at https://wiki.ublinux.com") #define slide_22_title _("Network Boot") -#define slide_22_text _("Allows system booting for diskless and standard workstations over a local network or the Internet (even over slow connection channels).") \ No newline at end of file +#define slide_22_text _("Allows system booting for diskless and standard workstations over a local network or the Internet (even over slow connection channels).") diff --git a/ubinstall-gtk-package-info.glade b/ubinstall-gtk-package-info.glade index 31f424e..be04a58 100644 --- a/ubinstall-gtk-package-info.glade +++ b/ubinstall-gtk-package-info.glade @@ -39,7 +39,7 @@ - 0 + 0 @@ -53,7 +53,7 @@ 150 - 1 + 1