master #207

Merged
asmeron merged 92 commits from YanTheKaller/ubinstall-gtk:master into master 3 months ago

@ -77,7 +77,7 @@ build: depend prepare
uninstall: uninstall:
@echo "Uninstall ..." @echo "Uninstall ..."
@for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \ @for LANG in $$(find ./locale -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \
# PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ # PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \
PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \
$(RM) "$${PATH_FILE_MO}"; \ $(RM) "$${PATH_FILE_MO}"; \
done done
@ -96,16 +96,11 @@ uninstall:
done done
@$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}" @$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}"
@$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop"
@if [[ "${PREFIX}" == @("/usr"|"/usr/") ]]; then \ @$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"
$(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}.policy"; \
else \
# $(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
fi
@if [[ -z "${DESTDIR}" ]]; then \ @if [[ -z "${DESTDIR}" ]]; then \
[[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ]] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ [[ -d "${DESTDIR}/usr/share/icons/hicolor/" ]] && gtk-update-icon-cache -fiq "${DESTDIR}/usr/share/icons/hicolor/" &>/dev/null || true; \
update-desktop-database --quiet &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \
[[ -d "${DESTDIR}${PREFIX}/share/applications" ]] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ [[ -d "${DESTDIR}/usr/share/applications" ]] && touch "${DESTDIR}/usr/share/applications" &>/dev/null || true; \
fi fi
@echo "Uninstall: OK" @echo "Uninstall: OK"
@ -128,14 +123,8 @@ install: check uninstall
done done
@install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" @install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop"
@if [[ "${PREFIX}" == @("/usr"|"/usr/") ]]; then \ @install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"
install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.policy"; \ @sed -e "s+/usr/bin+/usr/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"
else \
# install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
install -Dm644 "com.ublinux.${PKGNAME}.policy" "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
# sed -e "s+/usr/bin+${PREFIX}/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
sed -e "s+/usr/bin+${PREFIX}/bin+" -e "s+\.run+$${PREFIX//\//-}\.run+g" -i "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}$${PREFIX//\//-}.policy"; \
fi
@if [[ -z "${DESTDIR}" ]]; then \ @if [[ -z "${DESTDIR}" ]]; then \
ldconfig -n ${DESTDIR}/usr/lib; \ ldconfig -n ${DESTDIR}/usr/lib; \
[ -d "${DESTDIR}/usr/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}/usr/share/icons/hicolor/" &>/dev/null || true; \ [ -d "${DESTDIR}/usr/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}/usr/share/icons/hicolor/" &>/dev/null || true; \

@ -1,39 +1,48 @@
# [UBInstall](https://ublinux.ru/) # ubinstall-gtk
![ubinstall-icon-gui](ublinux-ubinstall_gui.svg) ![ubinstall-icon-console](ublinux-ubinstall_console.svg)
## Описание ## Description
The operating system installer (<b>UBInstall-gtk</b>) allows you to conveniently install the operating system.
Установщик оерационной системы UBLinux (<b>UBInstall</b>) позволяет в удобно установить операционную систему. # Build
In order to build ubinstall-gtk you will need:
## Установка - CMake
- C compiler
- GTK+ 3 & dependencies
- webkit2gtk (optional)
- timezonemap (optional)
- [libublsettings](https://gitea.ublinux.ru/Applications/libublsettings)
- [libublsettings-gtk3](https://gitea.ublinux.ru/Applications/libublsettings-gtk3)
- [libublsettingsui-gtk3](https://gitea.ublinux.ru/Applications/libublsettingsui-gtk3)
1. Скачайте репозитрий с утилитами Once you have all the necessary dependencies, you can use:
``` ```sh
$ git clone http://git.ublinux.ru:3000/UBGroup/ubinstall.git $ make
```
2. Перейдите в каталог ubinstall
```
$ cd ubinstall
``` ```
3. Установите утилиту
# Installation
After a successful build, just use:
```sh
$ sudo make install clean
``` ```
$ make
# Uninstallation
After a successful build, just use:
```sh
$ sudo make uninstall
``` ```
## Использование ## Usage
### <b>Запуск</b> ### <b>Launch</b>
Запуск утилиты возможен двумя способами: The utility can be launched in two ways:
1. Терминал 1. Terminal
CLI версия:
```
$ ubinstall.cli
``` ```
GTK версия $ ubinstall-gtk
```
$ ubinstall.gtk
``` ```
2. Ярлык 2. Shortcut
![alt text](screenshot/screenshot.png)

@ -22,21 +22,11 @@
<file>ubinstall-gtk-layouts.glade</file> <file>ubinstall-gtk-layouts.glade</file>
<file>ubinstall-gtk-keyboard-layouts.glade</file> <file>ubinstall-gtk-keyboard-layouts.glade</file>
<file>ubinstall-gtk-slider.glade</file> <file>ubinstall-gtk-slider.glade</file>
<file>ubinstall-gtk-package-info.glade</file>
</gresource> </gresource>
<gresource prefix="/com/ublinux/css"> <gresource prefix="/com/ublinux/css">
<file>ubinstall-gtk.css</file> <file>ubinstall-gtk.css</file>
</gresource> </gresource>
<gresource prefix="/com/ublinux/images">
<file>install_type_custom_normal.png</file>
<file>install_type_data_only_normal.png</file>
<file>install_type_fast_normal.png</file>
<file>install_type_grub_install_normal.png</file>
<file>install_type_grub_update_normal.png</file>
<file>install_type_next_normal.png</file>
<file>install_type_part_normal.png</file>
<file>install_type_recovery_normal.png</file>
<file>install_type_system_only_normal.png</file>
</gresource>
<gresource prefix="/com/ublinux/csv"> <gresource prefix="/com/ublinux/csv">
<file>modules.csv</file> <file>modules.csv</file>
<file>kernel-list.csv</file> <file>kernel-list.csv</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

@ -0,0 +1,327 @@
msgid "UBLinux module the kernel and modules"
msgstr ""
msgid "UBLinux module headers and scripts for building modules"
msgstr ""
msgid "UBLinux module documentation for the UBLinux kernel"
msgstr ""
msgid "UBLinux module firmwares"
msgstr ""
msgid "UBLinux module includes the core developer components"
msgstr ""
msgid "UBLinux module includes basic components Xorg"
msgstr ""
msgid "UBLinux module includes basic fonts"
msgstr ""
msgid "UBLinux module includes graphics accelerators"
msgstr ""
msgid "UBLinux module includes GTK libs"
msgstr ""
msgid "UBLinux module includes Qt5 and Qt6 libs"
msgstr ""
msgid "UBLinux module includes QT5 libs"
msgstr ""
msgid "UBLinux module includes QT6 libs"
msgstr ""
msgid "UBLinux module includes Xfce applications"
msgstr ""
msgid "UBLinux module includes KDE Plasma applications"
msgstr ""
msgid "UBLinux module includes GNOME next generation desktop shell"
msgstr ""
msgid "UBLinux module includes MATE desktop shell"
msgstr ""
msgid "UBLinux module includes Pantheon desktop shell"
msgstr ""
msgid "UBLinux module includes GTK applications"
msgstr ""
msgid "UBLinux module includes QT applications"
msgstr ""
msgid "UBLinux module includes GTK and icons themes"
msgstr ""
msgid "UBLinux module includes Lightdm display manager"
msgstr ""
msgid "UBLinux module includes multimedia applications"
msgstr ""
msgid "UBLinux module include system utilites"
msgstr ""
msgid "UBLinux module include AnyDesk"
msgstr ""
msgid "UBLinux module include desktop backgrounds"
msgstr ""
msgid "UBLinux module include blender and utilities"
msgstr ""
msgid "UBLinux module includes Chromium and some plugins"
msgstr ""
msgid "UBLinux module includes postgresql, mariadb database and utilities"
msgstr ""
msgid "UBLinux module includes docker and webmanager and utils"
msgstr ""
msgid "UBLinux module include Brother printer drivers"
msgstr ""
msgid "UBLinux module include Canon CAPT Printer Driver"
msgstr ""
msgid "UBLinux module include Canon UFR II LIPSLX CARPS2 printer driver"
msgstr ""
msgid "UBLinux module include Epson printer drivers"
msgstr ""
msgid "UBLinux module include Kyocera printer drivers"
msgstr ""
msgid "UBLinux module include Lexmark drivers"
msgstr ""
msgid "UBLinux module include Pantum printer drivers"
msgstr ""
msgid "UBLinux module include hplip, gutenprint, foomatic"
msgstr ""
msgid "UBLinux module include Ricoh drivers"
msgstr ""
msgid "UBLinux module include Samsung drivers"
msgstr ""
msgid "UBLinux module include Xerox drivers"
msgstr ""
msgid "UBLinux module includes education soft"
msgstr ""
msgid "UBLinux module includes Firefox and some plugins"
msgstr ""
msgid "UBLinux module include Java OpenJFX 17 client application platform"
msgstr ""
msgid "UBLinux module includes OpenJDK Java 11 development kit"
msgstr ""
msgid "UBLinux module includes OpenJDK Java 17 development kit"
msgstr ""
msgid "UBLinux module includes OpenJDK Java 21 development kit"
msgstr ""
msgid "UBLinux module includes OpenJDK Java 8 development kit"
msgstr ""
msgid "UBLinux module includes some library 32-bit"
msgstr ""
msgid "UBLinux module include LibreOffice"
msgstr ""
msgid "UBLinux module includes dkms additionals modules"
msgstr ""
msgid "UBLinux module include NVIDIA 470xx driver for linux"
msgstr ""
msgid "UBLinux module include NVIDIA 390xx driver for linux"
msgstr ""
msgid "UBLinux module includes OnlyOffice suite"
msgstr ""
msgid "UBLinux module include apps patch"
msgstr ""
msgid "UBLinux module includes podman and webmanager and utils"
msgstr ""
msgid "UBLinux module include pycharm-community-edition and utilities"
msgstr ""
msgid "UBLinux module includes QEMU, manager and utils"
msgstr ""
msgid "UBLinux module includes R7 Office"
msgstr ""
msgid "UBLinux module includes realvnc viewer and server"
msgstr ""
msgid "UBLinux module includes rustdesk"
msgstr ""
msgid "UBLinux module includes Telegram"
msgstr ""
msgid "UBLinux module include UBPile Workflow"
msgstr ""
msgid "UBLinux module includes agents for Linux guest"
msgstr ""
msgid "UBLinux module includes VirtualBox and extension packs"
msgstr ""
msgid "UBLinux module includes Web servers"
msgstr ""
msgid "UBLinux module includes Webmin and Usermin"
msgstr ""
msgid "UBLinux module includes interactive whiteboard soft"
msgstr ""
msgid "UBLinux module include Winbox"
msgstr ""
msgid "UBLinux module includes wine and utilities"
msgstr ""
msgid "UBLinux module include Kingsoft Office (WPS Office) - an office productivity suite"
msgstr ""
msgid "UBLinux module includes Yandex Browser and some utils"
msgstr ""
msgid "UBLinux module the kernel and modules"
msgstr ""
msgid "UBLinux module headers and scripts for building modules for the Meta UBlinux kernel, modules, headers and documentation"
msgstr ""
msgid "UBLinux module includes the core developer components"
msgstr ""
msgid "UBLinux module includes Liquidshell basic desktop shell using QtWidgets"
msgstr ""
msgid "UBLinux module includes AMDGRU PRO driver and utilities"
msgstr ""
msgid "UBLinux module includes anydesk"
msgstr ""
msgid "UBLinux module includes Chromium-GOST and some plugins"
msgstr ""
msgid "UBLinux module includes database applications"
msgstr ""
msgid "UBLinux module includes docker and webmanager and utils"
msgstr ""
msgid "UBLinux module include Hedgewars game similiar to Worms"
msgstr ""
msgid "UBLinux module includes Gitea and MemCached"
msgstr ""
msgid "UBLinux module include Gitlab CLI tools"
msgstr ""
msgid "UBLinux module include Java OpenJFX 11 client application platform"
msgstr ""
msgid "UBLinux module include Free Pascal and Lazarus GTK2"
msgstr ""
msgid "UBLinux module include Free Pascal and Lazarus QT5"
msgstr ""
msgid "UBLinux module includes LSI MegaRaid SM, StorCLI, MegaCLI and utils"
msgstr ""
msgid "UBLinux module includes NVIDIA 340xx driver and utilities"
msgstr ""
msgid "UBLinux module includes NVIDIA 390xx driver and utilities"
msgstr ""
msgid "UBLinux module includes NVIDIA 470xx driver and utilities"
msgstr ""
msgid "UBLinux module includes NVIDIA 510xx driver and utilities"
msgstr ""
msgid "UBLinux module includes NVIDIA 515xx driver and utilities"
msgstr ""
msgid "UBLinux module includes NVIDIA Optimus"
msgstr ""
msgid "UBLinux module includes OnlyOffice DocumentServer suite"
msgstr ""
msgid "UBLinux module includes Opera and some plugins"
msgstr ""
msgid "UBLinux module includes patch"
msgstr ""
msgid "UBLinux module includes QEMU headless and utils"
msgstr ""
msgid "UBLinux module include QT4"
msgstr ""
msgid "UBLinux module include rustdesk-server"
msgstr ""
msgid "UBLinux module include Skype"
msgstr ""
msgid "UBLinux module include Tor utils and browser"
msgstr ""
msgid "UBLinux module includes agents for Linux guest without X support"
msgstr ""
msgid "UBLinux module includes VirtualBox headless and extension packs"
msgstr ""
msgid "UBLinux module includes phpvirtualbox for VirtualBox"
msgstr ""
msgid "UBLinux module include Vivaldi browser"
msgstr ""
msgid "UBLinux module includes VMware-Workstation 16"
msgstr ""
msgid "UBLinux module include Wiki.js"
msgstr ""
msgid "UBLinux module include X11 remote utils"
msgstr ""
msgid "UBLinux module include Zoom"
msgstr ""

@ -0,0 +1,333 @@
# Language translations for ubinstal package.
# Copyright (C) 2022, UBTech LLC
# This file is distributed under the same license as the ubinstal package.
# UBLinux Team <info@ublinux.com>, 2022
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: ubinstal 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-05-22 16:12+0600\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
msgid "UBLinux module headers and scripts for building modules"
msgstr "Заголовочные файлы и скрипты для сборки модулей UBLinux"
msgid "UBLinux module documentation for the UBLinux kernel"
msgstr "Документация по модулю UBLinux для ядра UBLinux"
msgid "UBLinux module firmwares"
msgstr "Прошивки модуля UBLinux"
msgid "UBLinux module includes basic components Xorg"
msgstr "Модуль UBLinux включает базовые компоненты Xorg"
msgid "UBLinux module includes basic fonts"
msgstr "Модуль UBLinux включает базовые шрифты"
msgid "UBLinux module includes graphics accelerators"
msgstr "Модуль UBLinux включает графические ускорители"
msgid "UBLinux module includes GTK libs"
msgstr "Модуль UBLinux включает библиотеки GTK"
msgid "UBLinux module includes Qt5 and Qt6 libs"
msgstr "Модуль UBLinux включает библиотеки Qt5 и Qt6"
msgid "UBLinux module includes QT5 libs"
msgstr "Модуль UBLinux включает библиотеки QT5"
msgid "UBLinux module includes QT6 libs"
msgstr "Модуль UBLinux включает библиотеки QT6"
msgid "UBLinux module includes Xfce applications"
msgstr "Модуль UBLinux включает приложения Xfce"
msgid "UBLinux module includes KDE Plasma applications"
msgstr "Модуль UBLinux включает приложения KDE Plasma"
msgid "UBLinux module includes GNOME next generation desktop shell"
msgstr "Модуль UBLinux включает оболочку рабочего стола GNOME следующего поколения"
msgid "UBLinux module includes MATE desktop shell"
msgstr "Модуль UBLinux включает оболочку рабочего стола MATE"
msgid "UBLinux module includes Pantheon desktop shell"
msgstr "Модуль UBLinux включает оболочку рабочего стола Pantheon"
msgid "UBLinux module includes GTK applications"
msgstr "Модуль UBLinux включает приложения GTK"
msgid "UBLinux module includes QT applications"
msgstr "Модуль UBLinux включает приложения QT"
msgid "UBLinux module includes GTK and icons themes"
msgstr "Модуль UBLinux включает темы GTK и значков"
msgid "UBLinux module includes Lightdm display manager"
msgstr "Модуль UBLinux включает Менеджер дисплея Lightdm"
msgid "UBLinux module includes multimedia applications"
msgstr "Модуль UBLinux включает мультимедийные приложения"
msgid "UBLinux module include system utilites"
msgstr "Модуль UBLinux включает системные утилиты"
msgid "UBLinux module include AnyDesk"
msgstr "Модуль UBLinux включает AnyDesk"
msgid "UBLinux module include desktop backgrounds"
msgstr "Модуль UBLinux включает фоновые изображения рабочего стола"
msgid "UBLinux module include blender and utilities"
msgstr "Модуль UBLinux включает Blender и утилиты"
msgid "UBLinux module includes Chromium and some plugins"
msgstr "Модуль UBLinux включает Chromium и некоторые плагины"
msgid "UBLinux module includes postgresql, mariadb database and utilities"
msgstr "Модуль UBLinux включает PostgreSQL, базу данных MariaDB и утилиты"
msgid "UBLinux module include Brother printer drivers"
msgstr "Модуль UBLinux включает драйверы принтеров Brother"
msgid "UBLinux module include Canon CAPT Printer Driver"
msgstr "Модуль UBLinux включает драйвер принтера Canon CAPT"
msgid "UBLinux module include Canon UFR II LIPSLX CARPS2 printer driver"
msgstr "Модуль UBLinux включает драйвер принтера Canon UFR II LIPSLX CARPS2"
msgid "UBLinux module include Epson printer drivers"
msgstr "Модуль UBLinux включает драйверы принтеров Epson"
msgid "UBLinux module include Kyocera printer drivers"
msgstr "Модуль UBLinux включает драйверы принтера Kyocera"
msgid "UBLinux module include Lexmark drivers"
msgstr "Модуль UBLinux включает драйверы Lexmark"
msgid "UBLinux module include Pantum printer drivers"
msgstr "Модуль UBLinux включает драйверы принтера Pantum"
msgid "UBLinux module include hplip, gutenprint, foomatic"
msgstr "В состав модулей UBLinux входят hplip, gutenprint, foomatic"
msgid "UBLinux module include Ricoh drivers"
msgstr "Модуль UBLinux включает драйверы Ricoh"
msgid "UBLinux module include Samsung drivers"
msgstr "Модуль UBlinux включает драйверы Samsung"
msgid "UBLinux module include Xerox drivers"
msgstr "Модуль UBLinux включает драйверы Xerox"
msgid "UBLinux module includes education soft"
msgstr "Модуль UBLinux включает в себя образовательное программное обеспечение"
msgid "UBLinux module includes Firefox and some plugins"
msgstr "Модуль UBLinux включает в себя Firefox и некоторые плагины"
msgid "UBLinux module include Java OpenJFX 17 client application platform"
msgstr "Модуль UBLinux включает в себя платформу клиентских приложений Java OpenJFX 17"
msgid "UBLinux module includes OpenJDK Java 11 development kit"
msgstr "Модуль UBLinux включает в себя OpenJDK и комплект разработки Java 11"
msgid "UBLinux module includes OpenJDK Java 17 development kit"
msgstr "Модуль UBLinux включает в себя OpenJDK и комплект разработки Java 17"
msgid "UBLinux module includes OpenJDK Java 21 development kit"
msgstr "Модуль UBLinux включает в себя OpenJDK и комплект разработки Java 21"
msgid "UBLinux module includes OpenJDK Java 8 development kit"
msgstr "Модуль UBLinux включает в себя OpenJDK и комплект разработки Java 8"
msgid "UBLinux module includes some library 32-bit"
msgstr "Модуль UBLinux включает в себя некоторые 32-битные библиотеки."
msgid "UBLinux module include LibreOffice"
msgstr "Модуль UBLinux включает LibreOffice"
msgid "UBLinux module includes dkms additionals modules"
msgstr "Модуль UBLinux включает дополнительные модули dkms"
msgid "UBLinux module include NVIDIA 470xx driver for linux"
msgstr "Модуль UBLinux включает драйвер NVIDIA 470xx для Linux"
msgid "UBLinux module include NVIDIA 390xx driver for linux"
msgstr "Модуль UBLinux включает драйвер NVIDIA 390xx для Linux"
msgid "UBLinux module includes OnlyOffice suite"
msgstr "Модуль UBLinux включает пакет OnlyOffice"
msgid "UBLinux module include apps patch"
msgstr "Модуль UBLinux включает патчи для приложений"
msgid "UBLinux module includes podman and webmanager and utils"
msgstr "Модуль UBLinux включает podman, webmanager и утилиты"
msgid "UBLinux module include pycharm-community-edition and utilities"
msgstr "Модуль UBLinux включает pycharm-community-edition и утилиты"
msgid "UBLinux module includes QEMU, manager and utils"
msgstr "Модуль UBLinux включает QEMU, менеджер и утилиты"
msgid "UBLinux module includes R7 Office"
msgstr "Модуль UBLinux включает R7 Office"
msgid "UBLinux module includes realvnc viewer and server"
msgstr "Модуль UBLinux включает RealVNC Viewer и сервер"
msgid "UBLinux module includes rustdesk"
msgstr "Модуль UBLinux включает RustDesk"
msgid "UBLinux module includes Telegram"
msgstr "Модуль UBLinux включает Telegram"
msgid "UBLinux module include UBPile Workflow"
msgstr "Модуль UBLinux включает UBPile Workflow"
msgid "UBLinux module includes agents for Linux guest"
msgstr "Модуль UBLinux включает агенты для гостевой системы Linux"
msgid "UBLinux module includes VirtualBox and extension packs"
msgstr "Модуль UBLinux включает VirtualBox и пакеты расширений"
msgid "UBLinux module includes Web servers"
msgstr "Модуль UBLinux включает веб-серверы"
msgid "UBLinux module includes Webmin and Usermin"
msgstr "Модуль UBLinux включает Webmin и Usermin"
msgid "UBLinux module includes interactive whiteboard soft"
msgstr "Модуль UBLinux включает программное обеспечение для интерактивной доски"
msgid "UBLinux module include Winbox"
msgstr "Модуль UBLinux включает Winbox"
msgid "UBLinux module includes wine and utilities"
msgstr "Модуль UBLinux включает Wine и утилиты"
msgid "UBLinux module include Kingsoft Office (WPS Office) - an office productivity suite"
msgstr "В модуль UBLinux входят Kingsoft Office (WPS Office) — офисный пакет для повышения производительности"
msgid "UBLinux module includes Yandex Browser and some utils"
msgstr "В модуль UBLinux входят Yandex Browser и некоторые утилиты"
msgid "UBLinux module headers and scripts for building modules for the Meta UBlinux kernel, modules, headers and documentation"
msgstr "В модуль UBLinux входят заголовочные файлы и скрипты для сборки модулей для ядра Meta UBlinux, модули, заголовочные файлы и документация"
msgid "UBLinux module includes the core developer components"
msgstr "В модуль UBLinux входят основные компоненты для разработчиков"
msgid "UBLinux module includes Liquidshell basic desktop shell using QtWidgets"
msgstr "В модуль UBLinux входит базовая оболочка рабочего стола Liquidshell с использованием QtWidgets"
msgid "UBLinux module includes AMDGRU PRO driver and utilities"
msgstr "В модуль UBLinux входят драйвер AMDGRU PRO и утилиты"
msgid "UBLinux module includes anydesk"
msgstr "В модуль UBLinux входит anydesk"
msgid "UBLinux module includes Chromium-GOST and some plugins"
msgstr "В модуль UBLinux входит Chromium-GOST и некоторые плагины"
msgid "UBLinux module includes database applications"
msgstr "В модуль UBLinux входят приложения для работы с базами данных"
msgid "UBLinux module includes docker and webmanager and utils"
msgstr "В модуль UBLinux входят Docker, WebManager и утилиты"
msgid "UBLinux module include Hedgewars game similiar to Worms"
msgstr "В модуль UBLinux входит игра Hedgewars, похожая на Worms"
msgid "UBLinux module includes Gitea and MemCached"
msgstr "В модуль UBLinux входят Gitea и MemCached"
msgid "UBLinux module include Gitlab CLI tools"
msgstr "В модуль UBLinux входят инструменты командной строки Gitlab"
msgid "UBLinux module include Java OpenJFX 11 client application platform"
msgstr "В модуль UBLinux входит платформа клиентских приложений Java OpenJFX 11"
msgid "UBLinux module include Free Pascal and Lazarus GTK2"
msgstr "В модуль UBLinux входят Free Pascal и Lazarus GTK2"
msgid "UBLinux module include Free Pascal and Lazarus QT5"
msgstr "В модуль UBLinux входят Free Pascal и Lazarus QT5"
msgid "UBLinux module includes LSI MegaRaid SM, StorCLI, MegaCLI and utils"
msgstr "В модуль UBLinux входят LSI MegaRaid SM, StorCLI, MegaCLI и утилиты"
msgid "UBLinux module includes NVIDIA 340xx driver and utilities"
msgstr "В модуль UBLinux входят драйвер и утилиты для NVIDIA 340xx"
msgid "UBLinux module includes NVIDIA 390xx driver and utilities"
msgstr "В модуль UBLinux входят драйвер и утилиты для NVIDIA 390xx"
msgid "UBLinux module includes NVIDIA 470xx driver and utilities"
msgstr "Модуль UBLinux включает драйвер и утилиты для NVIDIA 470xx"
msgid "UBLinux module includes NVIDIA 510xx driver and utilities"
msgstr "Модуль UBLinux включает драйвер и утилиты для NVIDIA 510xx"
msgid "UBLinux module includes NVIDIA 515xx driver and utilities"
msgstr "Модуль UBLinux включает драйвер и утилиты для NVIDIA 515xx"
msgid "UBLinux module includes NVIDIA Optimus"
msgstr "Модуль UBLinux включает NVIDIA Optimus"
msgid "UBLinux module includes OnlyOffice DocumentServer suite"
msgstr "Модуль UBLinux включает пакет OnlyOffice DocumentServer"
msgid "UBLinux module includes Opera and some plugins"
msgstr "Модуль UBLinux включает Opera и некоторые плагины"
msgid "UBLinux module includes patch"
msgstr "Модуль UBLinux включает патч"
msgid "UBLinux module includes QEMU headless and utils"
msgstr "Модуль UBLinux включает QEMU headless и утилиты"
msgid "UBLinux module include QT4"
msgstr "Модуль UBLinux включает QT4"
msgid "UBLinux module include rustdesk-server"
msgstr "Модуль UBLinux включает rustdesk-server"
msgid "UBLinux module include Skype"
msgstr "Модуль UBLinux включает Skype"
msgid "UBLinux module include Tor utils and browser"
msgstr "Модуль UBLinux включает утилиты Tor и браузер"
msgid "UBLinux module includes agents for Linux guest without X support"
msgstr "Модуль UBLinux включает агенты для гостевой системы Linux без поддержки X"
msgid "UBLinux module includes VirtualBox headless and extension packs"
msgstr "Модуль UBLinux включает VirtualBox в режиме без графического интерфейса и пакеты расширений"
msgid "UBLinux module includes phpvirtualbox for VirtualBox"
msgstr "Модуль UBLinux включает phpvirtualbox для VirtualBox"
msgid "UBLinux module include Vivaldi browser"
msgstr "Модуль UBLinux включает браузер Vivaldi"
msgid "UBLinux module includes VMware-Workstation 16"
msgstr "Модуль UBLinux включает VMware-Workstation 16"
msgid "UBLinux module include Wiki.js"
msgstr "Модуль UBLinux включает Wiki.js"
msgid "UBLinux module include X11 remote utils"
msgstr "Модуль UBLinux включает удаленные утилиты X11"
msgid "UBLinux module include Zoom"
msgstr "Модуль UBLinux включает Zoom"

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,208 @@
OS_VERSION_ID;PACKAGE_UBM;NAME_UBM;TAG_UBM;DESCRIPTION_UBM
2405;ubm-001-linux515;001-linux515-*-*-*.ubm;base;UBLinux module the kernel and modules
2405;ubm-001-linux61;001-linux61-*-*-*.ubm;base;UBLinux module the kernel and modules
2405;ubm-001-linux66;001-linux66-*-*-*.ubm;base;UBLinux module the kernel and modules
2405;ubm-002-linux515-headers;002-linux515-headers-*-*-*.ubm;base;UBLinux module headers and scripts for building modules
2405;ubm-002-linux61-headers;002-linux61-headers-*-*-*.ubm;base;UBLinux module headers and scripts for building modules
2405;ubm-002-linux66-headers;002-linux66-headers-*-*-*.ubm;base;UBLinux module headers and scripts for building modules
2405;ubm-003-linux515-docs;003-linux515-docs-*-*-*.ubm;base;UBLinux module documentation for the UBLinux kernel
2405;ubm-003-linux61-docs;003-linux61-docs-*-*-*.ubm;base;UBLinux module documentation for the UBLinux kernel
2405;ubm-003-linux66-docs;003-linux66-docs-*-*-*.ubm;base;UBLinux module documentation for the UBLinux kernel
2405;ubm-004-linux-firmware;004-linux-firmware-*-*-*.ubm;base;UBLinux module firmwares
2405;ubm-010-core;010-core-*-*-*.ubm;base;UBLinux module includes the core developer components
2405;ubm-010-core-devel;010-core-devel-*-*-*.ubm;base;UBLinux module includes the core developer components
2405;ubm-020-xorg-base;020-xorg-base-*-*-*.ubm;base;UBLinux module includes basic components Xorg
2405;ubm-021-xorg-fonts;021-xorg-fonts-*-*-*.ubm;base;UBLinux module includes basic fonts
2405;ubm-025-xorg-gl;025-xorg-gl-*-*-*.ubm;base;UBLinux module includes graphics accelerators
2405;ubm-030-xorg-gtk;030-xorg-gtk-*-*-*.ubm;base;UBLinux module includes GTK libs
2405;ubm-035-xorg-qt;035-xorg-qt-*-*-*.ubm;base;UBLinux module includes Qt5 and Qt6 libs
2405;ubm-036-xorg-qt5;036-xorg-qt5-*-*-*.ubm;base;UBLinux module includes QT5 libs
2405;ubm-037-xorg-qt6;037-xorg-qt6-*-*-*.ubm;base;UBLinux module includes QT6 libs
2405;ubm-040-xorg-xfce;040-xorg-xfce-*-*-*.ubm;base;UBLinux module includes Xfce applications
2405;ubm-041-xorg-plasma;041-xorg-plasma-*-*-*.ubm;base;UBLinux module includes KDE Plasma applications
2405;ubm-042-xorg-gnome;042-xorg-gnome-*-*-*.ubm;base;UBLinux module includes GNOME next generation desktop shell
2405;ubm-043-xorg-mate;043-xorg-mate-*-*-*.ubm;base;UBLinux module includes MATE desktop shell
2405;ubm-045-xorg-pantheon;045-xorg-pantheon-*-*-*.ubm;base;UBLinux module includes Pantheon desktop shell
2405;ubm-050-xorg-gtk-app;050-xorg-gtk-app-*-*-*.ubm;base;UBLinux module includes GTK applications
2405;ubm-055-xorg-qt-app;055-xorg-qt-app-*-*-*.ubm;base;UBLinux module includes QT applications
2405;ubm-060-xorg-theme;060-xorg-theme-*-*-*.ubm;base;UBLinux module includes GTK and icons themes
2405;ubm-070-dm-lightdm;070-dm-lightdm-*-*-*.ubm;base;UBLinux module includes Lightdm display manager
2405;ubm-080-multimedia;080-multimedia-*-*-*.ubm;base;UBLinux module includes multimedia applications
2405;ubm-100-ublinux;100-ublinux-*-*-*.ubm;base;UBLinux module include system utilites
2405;ubm-anydesk;anydesk-*-*-*.ubm;extra;UBLinux module include AnyDesk
2405;ubm-backgrounds;backgrounds-*-*-*.ubm;extra;UBLinux module include desktop backgrounds
2405;ubm-blender;blender-*-*-*.ubm;extra;UBLinux module include blender and utilities
2405;ubm-chromium;chromium-*-*-*.ubm;extra;UBLinux module includes Chromium and some plugins
2405;ubm-chromium-gost;chromium-gost-*-*-*.ubm;extra;UBLinux module includes Chromium and some plugins
2405;ubm-database;database-*-*-*.ubm;extra;UBLinux module includes postgresql, mariadb database and utilities
2405;ubm-docker;docker-*-*-*.ubm;extra;UBLinux module includes docker and webmanager and utils
2405;ubm-drv-brother;drv-brother-*-*-*.ubm;extra;UBLinux module include Brother printer drivers
2405;ubm-drv-canon-capt;drv-canon-capt-*-*-*.ubm;extra;UBLinux module include Canon CAPT Printer Driver
2405;ubm-drv-canon-ufrii;drv-canon-ufrii-*-*-*.ubm;extra;UBLinux module include Canon UFR II LIPSLX CARPS2 printer driver
2405;ubm-drv-epson;drv-epson-*-*-*.ubm;extra;UBLinux module include Epson printer drivers
2405;ubm-drv-kyocera;drv-kyocera-*-*-*.ubm;extra;UBLinux module include Kyocera printer drivers
2405;ubm-drv-lexmark;drv-lexmark-*-*-*.ubm;extra;UBLinux module include Lexmark drivers
2405;ubm-drv-pantum;drv-pantum-*-*-*.ubm;extra;UBLinux module include Pantum printer drivers
2405;ubm-drv-printer;drv-printer-*-*-*.ubm;extra;UBLinux module include hplip, gutenprint, foomatic
2405;ubm-drv-ricoh;drv-ricoh-*-*-*.ubm;extra;UBLinux module include Ricoh drivers
2405;ubm-drv-samsung;drv-samsung-*-*-*.ubm;extra;UBLinux module include Samsung drivers
2405;ubm-drv-xerox;drv-xerox-*-*-*.ubm;extra;UBLinux module include Xerox drivers
2405;ubm-education;education-*-*-*.ubm;extra;UBLinux module includes education soft
2405;ubm-firefox;firefox-*-*-*.ubm;extra;UBLinux module includes Firefox and some plugins
2405;ubm-java17-openjfx;java17-openjfx-*-*-*.ubm;extra;UBLinux module include Java OpenJFX 17 client application platform
2405;ubm-jdk11;jdk11-*-*-*.ubm;extra;UBLinux module includes OpenJDK Java 11 development kit
2405;ubm-jdk17;jdk17-*-*-*.ubm;extra;UBLinux module includes OpenJDK Java 17 development kit
2405;ubm-jdk21;jdk21-*-*-*.ubm;extra;UBLinux module includes OpenJDK Java 21 development kit
2405;ubm-jdk8;jdk8-*-*-*.ubm;extra;UBLinux module includes OpenJDK Java 8 development kit
2405;ubm-lib32;lib32-*-*-*.ubm;extra;UBLinux module includes some library 32-bit
2405;ubm-libreoffice;libreoffice-*-*-*.ubm;extra;UBLinux module include LibreOffice
2405;ubm-linux515-dkms;linux515-dkms-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules
2405;ubm-linux515-nvidia;linux515-nvidia-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux
2405;ubm-linux515-nvidia-390xx;linux515-nvidia-390xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 390xx driver for linux
2405;ubm-linux515-nvidia-470xx;linux515-nvidia-470xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux
2405;ubm-linux61-dkms;linux61-dkms-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules
2405;ubm-linux61-nvidia;linux61-nvidia-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux
2405;ubm-linux61-nvidia-390xx;linux61-nvidia-390xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 390xx driver for linux
2405;ubm-linux61-nvidia-470xx;linux61-nvidia-470xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux
2405;ubm-linux61-r8168-8136;linux61-r8168-8136-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules
2405;ubm-linux66-dkms;linux66-dkms-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules
2405;ubm-onlyoffice;onlyoffice-*-*-*.ubm;extra;UBLinux module includes OnlyOffice suite
2405;ubm-patch;patch-*-*-*.ubm;extra;UBLinux module include apps patch
2405;ubm-podman;podman-*-*-*.ubm;extra;UBLinux module includes podman and webmanager and utils
2405;ubm-pycharm;pycharm-*-*-*.ubm;extra;UBLinux module include pycharm-community-edition and utilities
2405;ubm-qaratms-ru;qaratms-ru-*-*-*.ubm;extra;UBLinux module include pycharm-community-edition and utilities
2405;ubm-qemu;qemu-*-*-*.ubm;extra;UBLinux module includes QEMU, manager and utils
2405;ubm-r7-office;r7-office-*-*-*.ubm;extra;UBLinux module includes R7 Office
2405;ubm-realvnc;realvnc-*-*-*.ubm;extra;UBLinux module includes realvnc viewer and server
2405;ubm-rustdesk;rustdesk-*-*-*.ubm;extra;UBLinux module includes rustdesk
2405;ubm-rustdesk-server;rustdesk-server-*-*-*.ubm;extra;UBLinux module includes rustdesk
2405;ubm-telegram;telegram-*-*-*.ubm;extra;UBLinux module includes Telegram
2405;ubm-ubpile-workflow;ubpile-workflow-*-*-*.ubm;extra;UBLinux module include UBPile Workflow
2405;ubm-virtual-guest;virtual-guest-*-*-*.ubm;extra;UBLinux module includes agents for Linux guest
2405;ubm-virtualbox-host;virtualbox-host-*-*-*.ubm;extra;UBLinux module includes VirtualBox and extension packs
2405;ubm-web;web-*-*-*.ubm;extra;UBLinux module includes Web servers
2405;ubm-webmin;webmin-*-*-*.ubm;extra;UBLinux module includes Webmin and Usermin
2405;ubm-whiteboard;whiteboard-*-*-*.ubm;extra;UBLinux module includes interactive whiteboard soft
2405;ubm-winbox;winbox-*-*-*.ubm;extra;UBLinux module include Winbox
2405;ubm-wine;wine-*-*-*.ubm;extra;UBLinux module includes wine and utilities
2405;ubm-wps-office;wps-office-*-*-*.ubm;extra;UBLinux module include Kingsoft Office (WPS Office) - an office productivity suite
2405;ubm-yandex-browser;yandex-browser-*-*-*.ubm;extra;UBLinux module includes Yandex Browser and some utils
2204;ubm-001-linux;001-linux-*-*-*.ubm;base;UBLinux module the kernel and modules
2204;ubm-001-linux515;001-linux515-*-*-*.ubm;base;UBLinux module the kernel and modules
2204;ubm-001-linux61;001-linux61-*-*-*.ubm;base;UBLinux module the kernel and modules
2204;ubm-001-linux66;001-linux66-*-*-*.ubm;base;UBLinux module the kernel and modules
2204;ubm-002-linux-headers;002-linux-headers-*-*-*.ubm;base;UBLinux module headers and scripts for building modules for the Meta UBlinux kernel, modules, headers and documentation
2204;ubm-002-linux515-headers;002-linux515-headers-*-*-*.ubm;base;UBLinux module headers and scripts for building modules
2204;ubm-002-linux61-headers;002-linux61-headers-*-*-*.ubm;base;UBLinux module headers and scripts for building modules
2204;ubm-002-linux66-headers;002-linux66-headers-*-*-*.ubm;base;UBLinux module headers and scripts for building modules
2204;ubm-003-linux-docs;003-linux-docs-*-*-*.ubm;base;UBLinux module documentation for the UBLinux kernel
2204;ubm-003-linux515-docs;003-linux515-docs-*-*-*.ubm;base;UBLinux module documentation for the UBLinux kernel
2204;ubm-003-linux61-docs;003-linux61-docs-*-*-*.ubm;base;UBLinux module documentation for the UBLinux kernel
2204;ubm-003-linux66-docs;003-linux66-docs-*-*-*.ubm;base;UBLinux module documentation for the UBLinux kernel
2204;ubm-004-linux-firmware;004-linux-firmware-*-*-*.ubm;base;UBLinux module firmwares
2204;ubm-010-core;010-core-*-*-*.ubm;base;UBLinux module includes the core developer components
2204;ubm-010-core-devel;010-core-devel-*-*-*.ubm;base;UBLinux module includes the core developer components
2204;ubm-020-xorg-base;020-xorg-base-*-*-*.ubm;base;UBLinux module includes basic components Xorg
2204;ubm-021-xorg-fonts;021-xorg-fonts-*-*-*.ubm;base;UBLinux module includes basic fonts
2204;ubm-025-xorg-gl;025-xorg-gl-*-*-*.ubm;base;UBLinux module includes graphics accelerators
2204;ubm-030-xorg-gtk;030-xorg-gtk-*-*-*.ubm;base;UBLinux module includes GTK libs
2204;ubm-035-xorg-qt5;035-xorg-qt5-*-*-*.ubm;base;UBLinux module includes QT5 libs
2204;ubm-036-xorg-qt6;036-xorg-qt6-*-*-*.ubm;base;UBLinux module includes QT6 libs
2204;ubm-040-xorg-xfce;040-xorg-xfce-*-*-*.ubm;base;UBLinux module includes Xfce applications
2204;ubm-041-xorg-plasma;041-xorg-plasma-*-*-*.ubm;base;UBLinux module includes KDE Plasma applications
2204;ubm-042-xorg-gnome;042-xorg-gnome-*-*-*.ubm;base;UBLinux module includes GNOME next generation desktop shell
2204;ubm-043-xorg-mate;043-xorg-mate-*-*-*.ubm;base;UBLinux module includes MATE desktop shell
2204;ubm-045-xorg-pantheon;045-xorg-pantheon-*-*-*.ubm;base;UBLinux module includes Pantheon desktop shell
2204;ubm-049-xorg-liquidshell;049-xorg-liquidshell-*-*-*.ubm;base;UBLinux module includes Liquidshell basic desktop shell using QtWidgets
2204;ubm-050-xorg-gtk-app;050-xorg-gtk-app-*-*-*.ubm;base;UBLinux module includes GTK applications
2204;ubm-055-xorg-qt-app;055-xorg-qt-app-*-*-*.ubm;base;UBLinux module includes QT applications
2204;ubm-060-xorg-theme;060-xorg-theme-*-*-*.ubm;base;UBLinux module includes GTK and icons themes
2204;ubm-070-dm-lightdm;070-dm-lightdm-*-*-*.ubm;base;UBLinux module includes Lightdm display manager
2204;ubm-080-multimedia;080-multimedia-*-*-*.ubm;base;UBLinux module includes multimedia applications
2204;ubm-100-ublinux;100-ublinux-*-*-*.ubm;base;UBLinux module include system utilites
2204;ubm-amdgpu-pro;amdgpu-pro-*-*-*.ubm;extra;UBLinux module includes AMDGRU PRO driver and utilities
2204;ubm-anydesk;anydesk-*-*-*.ubm;extra;UBLinux module includes anydesk
2204;ubm-backgrounds;backgrounds-*-*-*.ubm;extra;UBLinux module include desktop backgrounds
2204;ubm-blender;blender-*-*-*.ubm;extra;UBLinux module includes wine and utilities
2204;ubm-chromium;chromium-*-*-*.ubm;extra;UBLinux module includes Chromium-GOST and some plugins
2204;ubm-chromium-gost;chromium-gost-*-*-*.ubm;extra;UBLinux module includes Chromium-GOST and some plugins
2204;ubm-database;database-*-*-*.ubm;extra;UBLinux module includes database applications
2204;ubm-docker;docker-*-*-*.ubm;extra;UBLinux module includes docker and webmanager and utils
2204;ubm-drv-brother;drv-brother-*-*-*.ubm;extra;UBLinux module include Brother printer drivers
2204;ubm-drv-canon-capt;drv-canon-capt-*-*-*.ubm;extra;UBLinux module include Canon CAPT Printer Driver
2204;ubm-drv-canon-ufrii;drv-canon-ufrii-*-*-*.ubm;extra;UBLinux module include Canon UFR II LIPSLX CARPS2 printer driver
2204;ubm-drv-epson;drv-epson-*-*-*.ubm;extra;UBLinux module include Epson printer drivers
2204;ubm-drv-kyocera;drv-kyocera-*-*-*.ubm;extra;UBLinux module include Kyocera printer drivers
2204;ubm-drv-lexmark;drv-lexmark-*-*-*.ubm;extra;UBLinux module include Lexmark drivers
2204;ubm-drv-pantum;drv-pantum-*-*-*.ubm;extra;UBLinux module include Pantum printer drivers
2204;ubm-drv-printer;drv-printer-*-*-*.ubm;extra;UBLinux module include hplip, gutenprint, foomatic
2204;ubm-drv-ricoh;drv-ricoh-*-*-*.ubm;extra;UBLinux module include Ricoh drivers
2204;ubm-drv-samsung;drv-samsung-*-*-*.ubm;extra;UBLinux module include Samsung drivers
2204;ubm-drv-xerox;drv-xerox-*-*-*.ubm;extra;UBLinux module include Xerox drivers
2204;ubm-firefox;firefox-*-*-*.ubm;extra;UBLinux module includes Firefox and some plugins
2204;ubm-gambas3;gambas3-*-*-*.ubm;extra;UBLinux module includes Gambas3 and components
2204;ubm-game-hedgewars;game-hedgewars-*-*-*.ubm;extra;UBLinux module include Hedgewars game similiar to Worms
2204;ubm-game-warfork;game-warfork-*-*-*.ubm;extra;UBLinux module include Hedgewars game similiar to Worms
2204;ubm-gitea;gitea-*-*-*.ubm;extra;UBLinux module includes Gitea and MemCached
2204;ubm-gitlab;gitlab-*-*-*.ubm;extra;UBLinux module include Gitlab CLI tools
2204;ubm-gitlab-cli;gitlab-cli-*-*-*.ubm;extra;UBLinux module include Gitlab CLI tools
2204;ubm-java11-openjfx;java11-openjfx-*-*-*.ubm;extra;UBLinux module include Java OpenJFX 11 client application platform
2204;ubm-java17-openjfx;java17-openjfx-*-*-*.ubm;extra;UBLinux module include Java OpenJFX 17 client application platform
2204;ubm-jdk11;jdk11-*-*-*.ubm;extra;UBLinux module includes OpenJDK Java 11 development kit
2204;ubm-jdk17;jdk17-*-*-*.ubm;extra;UBLinux module includes OpenJDK Java 17 development kit
2204;ubm-jdk8;jdk8-*-*-*.ubm;extra;UBLinux module includes OpenJDK Java 8 development kit
2204;ubm-lazarus-gtk2;lazarus-gtk2-*-*-*.ubm;extra;UBLinux module include Free Pascal and Lazarus GTK2
2204;ubm-lazarus-qt5;lazarus-qt5-*-*-*.ubm;extra;UBLinux module include Free Pascal and Lazarus QT5
2204;ubm-lib32;lib32-*-*-*.ubm;extra;UBLinux module includes some library 32-bit
2204;ubm-libreoffice;libreoffice-*-*-*.ubm;extra;UBLinux module includes rustdesk
2204;ubm-linux-dkms;linux-dkms-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules
2204;ubm-linux515-dkms;linux515-dkms-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules
2204;ubm-linux515-nvidia;linux515-nvidia-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux
2204;ubm-linux515-nvidia-390xx;linux515-nvidia-390xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 390xx driver for linux
2204;ubm-linux515-nvidia-470xx;linux515-nvidia-470xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux
2204;ubm-linux61-dkms;linux61-dkms-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules
2204;ubm-linux61-nvidia;linux61-nvidia-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux
2204;ubm-linux61-nvidia-390xx;linux61-nvidia-390xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 390xx driver for linux
2204;ubm-linux61-nvidia-470xx;linux61-nvidia-470xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux
2204;ubm-linux66-dkms;linux66-dkms-*-*-*.ubm;extra;UBLinux module includes dkms additionals modules
2204;ubm-linux66-nvidia;linux66-nvidia-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux
2204;ubm-linux66-nvidia-390xx;linux66-nvidia-390xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 390xx driver for linux
2204;ubm-linux66-nvidia-470xx;linux66-nvidia-470xx-*-*-*.ubm;extra;UBLinux module include NVIDIA 470xx driver for linux
2204;ubm-lsi-megaraid;lsi-megaraid-*-*-*.ubm;extra;UBLinux module includes LSI MegaRaid SM, StorCLI, MegaCLI and utils
2204;ubm-nvidia-340;nvidia-340-*-*-*.ubm;extra;UBLinux module includes NVIDIA 340xx driver and utilities
2204;ubm-nvidia-390;nvidia-390-*-*-*.ubm;extra;UBLinux module includes NVIDIA 390xx driver and utilities
2204;ubm-nvidia-470;nvidia-470-*-*-*.ubm;extra;UBLinux module includes NVIDIA 470xx driver and utilities
2204;ubm-nvidia-510;nvidia-510-*-*-*.ubm;extra;UBLinux module includes NVIDIA 510xx driver and utilities
2204;ubm-nvidia-515;nvidia-515-*-*-*.ubm;extra;UBLinux module includes NVIDIA 515xx driver and utilities
2204;ubm-nvidia-optimus;nvidia-optimus-*-*-*.ubm;extra;UBLinux module includes NVIDIA Optimus
2204;ubm-onlyoffice;onlyoffice-*-*-*.ubm;extra;UBLinux module includes OnlyOffice DocumentServer suite
2204;ubm-onlyoffice-documentserver;onlyoffice-documentserver-*-*-*.ubm;extra;UBLinux module includes OnlyOffice DocumentServer suite
2204;ubm-opera;opera-*-*-*.ubm;extra;UBLinux module includes Opera and some plugins
2204;ubm-patch;patch-*-*-*.ubm;extra;UBLinux module includes patch
2204;ubm-podman;podman-*-*-*.ubm;extra;UBLinux module includes podman and webmanager and utils
2204;ubm-qemu;qemu-*-*-*.ubm;extra;UBLinux module includes QEMU headless and utils
2204;ubm-qemu-headless;qemu-headless-*-*-*.ubm;extra;UBLinux module includes QEMU headless and utils
2204;ubm-qt4;qt4-*-*-*.ubm;extra;UBLinux module include QT4
2204;ubm-realvnc;realvnc-*-*-*.ubm;extra;UBLinux module includes realvnc viewer and server
2204;ubm-rustdesk;rustdesk-*-*-*.ubm;extra;UBLinux module include rustdesk-server
2204;ubm-rustdesk-server;rustdesk-server-*-*-*.ubm;extra;UBLinux module include rustdesk-server
2204;ubm-skype;skype-*-*-*.ubm;extra;UBLinux module include Skype
2204;ubm-telegram;telegram-*-*-*.ubm;extra;UBLinux module includes Telegram
2204;ubm-tor;tor-*-*-*.ubm;extra;UBLinux module include Tor utils and browser
2204;ubm-ubpile-workflow;ubpile-workflow-*-*-*.ubm;extra;UBLinux module include UBPile Workflow
2204;ubm-virtual-guest;virtual-guest-*-*-*.ubm;extra;UBLinux module includes agents for Linux guest without X support
2204;ubm-virtual-guest-nox;virtual-guest-nox-*-*-*.ubm;extra;UBLinux module includes agents for Linux guest without X support
2204;ubm-virtualbox-host;virtualbox-host-*-*-*.ubm;extra;UBLinux module includes VirtualBox headless and extension packs
2204;ubm-virtualbox-host-headless;virtualbox-host-headless-*-*-*.ubm;extra;UBLinux module includes VirtualBox headless and extension packs
2204;ubm-virtualbox-web;virtualbox-web-*-*-*.ubm;extra;UBLinux module includes phpvirtualbox for VirtualBox
2204;ubm-vivaldi;vivaldi-*-*-*.ubm;extra;UBLinux module include Vivaldi browser
2204;ubm-vmware-workstation16;vmware-workstation16-*-*-*.ubm;extra;UBLinux module includes VMware-Workstation 16
2204;ubm-web;web-*-*-*.ubm;extra;UBLinux module includes Webmin and Usermin
2204;ubm-webmin;webmin-*-*-*.ubm;extra;UBLinux module includes Webmin and Usermin
2204;ubm-wiki-js;wiki-js-*-*-*.ubm;extra;UBLinux module include Wiki.js
2204;ubm-winbox;winbox-*-*-*.ubm;extra;UBLinux module include Winbox
2204;ubm-wine;wine-*-*-*.ubm;extra;UBLinux module includes wine and utilities
2204;ubm-wps-office;wps-office-*-*-*.ubm;extra;UBLinux module include Kingsoft Office (WPS Office) - an office productivity suite
2204;ubm-xremote;xremote-*-*-*.ubm;extra;UBLinux module include X11 remote utils
2204;ubm-yandex-browser;yandex-browser-*-*-*.ubm;extra;UBLinux module includes Yandex Browser and some utils
2204;ubm-zoom;zoom-*-*-*.ubm;extra;UBLinux module include Zoom
1 OS_VERSION_ID PACKAGE_UBM NAME_UBM TAG_UBM DESCRIPTION_UBM
2 2405 ubm-001-linux515 001-linux515-*-*-*.ubm base UBLinux module the kernel and modules
3 2405 ubm-001-linux61 001-linux61-*-*-*.ubm base UBLinux module the kernel and modules
4 2405 ubm-001-linux66 001-linux66-*-*-*.ubm base UBLinux module the kernel and modules
5 2405 ubm-002-linux515-headers 002-linux515-headers-*-*-*.ubm base UBLinux module headers and scripts for building modules
6 2405 ubm-002-linux61-headers 002-linux61-headers-*-*-*.ubm base UBLinux module headers and scripts for building modules
7 2405 ubm-002-linux66-headers 002-linux66-headers-*-*-*.ubm base UBLinux module headers and scripts for building modules
8 2405 ubm-003-linux515-docs 003-linux515-docs-*-*-*.ubm base UBLinux module documentation for the UBLinux kernel
9 2405 ubm-003-linux61-docs 003-linux61-docs-*-*-*.ubm base UBLinux module documentation for the UBLinux kernel
10 2405 ubm-003-linux66-docs 003-linux66-docs-*-*-*.ubm base UBLinux module documentation for the UBLinux kernel
11 2405 ubm-004-linux-firmware 004-linux-firmware-*-*-*.ubm base UBLinux module firmwares
12 2405 ubm-010-core 010-core-*-*-*.ubm base UBLinux module includes the core developer components
13 2405 ubm-010-core-devel 010-core-devel-*-*-*.ubm base UBLinux module includes the core developer components
14 2405 ubm-020-xorg-base 020-xorg-base-*-*-*.ubm base UBLinux module includes basic components Xorg
15 2405 ubm-021-xorg-fonts 021-xorg-fonts-*-*-*.ubm base UBLinux module includes basic fonts
16 2405 ubm-025-xorg-gl 025-xorg-gl-*-*-*.ubm base UBLinux module includes graphics accelerators
17 2405 ubm-030-xorg-gtk 030-xorg-gtk-*-*-*.ubm base UBLinux module includes GTK libs
18 2405 ubm-035-xorg-qt 035-xorg-qt-*-*-*.ubm base UBLinux module includes Qt5 and Qt6 libs
19 2405 ubm-036-xorg-qt5 036-xorg-qt5-*-*-*.ubm base UBLinux module includes QT5 libs
20 2405 ubm-037-xorg-qt6 037-xorg-qt6-*-*-*.ubm base UBLinux module includes QT6 libs
21 2405 ubm-040-xorg-xfce 040-xorg-xfce-*-*-*.ubm base UBLinux module includes Xfce applications
22 2405 ubm-041-xorg-plasma 041-xorg-plasma-*-*-*.ubm base UBLinux module includes KDE Plasma applications
23 2405 ubm-042-xorg-gnome 042-xorg-gnome-*-*-*.ubm base UBLinux module includes GNOME next generation desktop shell
24 2405 ubm-043-xorg-mate 043-xorg-mate-*-*-*.ubm base UBLinux module includes MATE desktop shell
25 2405 ubm-045-xorg-pantheon 045-xorg-pantheon-*-*-*.ubm base UBLinux module includes Pantheon desktop shell
26 2405 ubm-050-xorg-gtk-app 050-xorg-gtk-app-*-*-*.ubm base UBLinux module includes GTK applications
27 2405 ubm-055-xorg-qt-app 055-xorg-qt-app-*-*-*.ubm base UBLinux module includes QT applications
28 2405 ubm-060-xorg-theme 060-xorg-theme-*-*-*.ubm base UBLinux module includes GTK and icons themes
29 2405 ubm-070-dm-lightdm 070-dm-lightdm-*-*-*.ubm base UBLinux module includes Lightdm display manager
30 2405 ubm-080-multimedia 080-multimedia-*-*-*.ubm base UBLinux module includes multimedia applications
31 2405 ubm-100-ublinux 100-ublinux-*-*-*.ubm base UBLinux module include system utilites
32 2405 ubm-anydesk anydesk-*-*-*.ubm extra UBLinux module include AnyDesk
33 2405 ubm-backgrounds backgrounds-*-*-*.ubm extra UBLinux module include desktop backgrounds
34 2405 ubm-blender blender-*-*-*.ubm extra UBLinux module include blender and utilities
35 2405 ubm-chromium chromium-*-*-*.ubm extra UBLinux module includes Chromium and some plugins
36 2405 ubm-chromium-gost chromium-gost-*-*-*.ubm extra UBLinux module includes Chromium and some plugins
37 2405 ubm-database database-*-*-*.ubm extra UBLinux module includes postgresql, mariadb database and utilities
38 2405 ubm-docker docker-*-*-*.ubm extra UBLinux module includes docker and webmanager and utils
39 2405 ubm-drv-brother drv-brother-*-*-*.ubm extra UBLinux module include Brother printer drivers
40 2405 ubm-drv-canon-capt drv-canon-capt-*-*-*.ubm extra UBLinux module include Canon CAPT Printer Driver
41 2405 ubm-drv-canon-ufrii drv-canon-ufrii-*-*-*.ubm extra UBLinux module include Canon UFR II LIPSLX CARPS2 printer driver
42 2405 ubm-drv-epson drv-epson-*-*-*.ubm extra UBLinux module include Epson printer drivers
43 2405 ubm-drv-kyocera drv-kyocera-*-*-*.ubm extra UBLinux module include Kyocera printer drivers
44 2405 ubm-drv-lexmark drv-lexmark-*-*-*.ubm extra UBLinux module include Lexmark drivers
45 2405 ubm-drv-pantum drv-pantum-*-*-*.ubm extra UBLinux module include Pantum printer drivers
46 2405 ubm-drv-printer drv-printer-*-*-*.ubm extra UBLinux module include hplip, gutenprint, foomatic
47 2405 ubm-drv-ricoh drv-ricoh-*-*-*.ubm extra UBLinux module include Ricoh drivers
48 2405 ubm-drv-samsung drv-samsung-*-*-*.ubm extra UBLinux module include Samsung drivers
49 2405 ubm-drv-xerox drv-xerox-*-*-*.ubm extra UBLinux module include Xerox drivers
50 2405 ubm-education education-*-*-*.ubm extra UBLinux module includes education soft
51 2405 ubm-firefox firefox-*-*-*.ubm extra UBLinux module includes Firefox and some plugins
52 2405 ubm-java17-openjfx java17-openjfx-*-*-*.ubm extra UBLinux module include Java OpenJFX 17 client application platform
53 2405 ubm-jdk11 jdk11-*-*-*.ubm extra UBLinux module includes OpenJDK Java 11 development kit
54 2405 ubm-jdk17 jdk17-*-*-*.ubm extra UBLinux module includes OpenJDK Java 17 development kit
55 2405 ubm-jdk21 jdk21-*-*-*.ubm extra UBLinux module includes OpenJDK Java 21 development kit
56 2405 ubm-jdk8 jdk8-*-*-*.ubm extra UBLinux module includes OpenJDK Java 8 development kit
57 2405 ubm-lib32 lib32-*-*-*.ubm extra UBLinux module includes some library 32-bit
58 2405 ubm-libreoffice libreoffice-*-*-*.ubm extra UBLinux module include LibreOffice
59 2405 ubm-linux515-dkms linux515-dkms-*-*-*.ubm extra UBLinux module includes dkms additionals modules
60 2405 ubm-linux515-nvidia linux515-nvidia-*-*-*.ubm extra UBLinux module include NVIDIA 470xx driver for linux
61 2405 ubm-linux515-nvidia-390xx linux515-nvidia-390xx-*-*-*.ubm extra UBLinux module include NVIDIA 390xx driver for linux
62 2405 ubm-linux515-nvidia-470xx linux515-nvidia-470xx-*-*-*.ubm extra UBLinux module include NVIDIA 470xx driver for linux
63 2405 ubm-linux61-dkms linux61-dkms-*-*-*.ubm extra UBLinux module includes dkms additionals modules
64 2405 ubm-linux61-nvidia linux61-nvidia-*-*-*.ubm extra UBLinux module include NVIDIA 470xx driver for linux
65 2405 ubm-linux61-nvidia-390xx linux61-nvidia-390xx-*-*-*.ubm extra UBLinux module include NVIDIA 390xx driver for linux
66 2405 ubm-linux61-nvidia-470xx linux61-nvidia-470xx-*-*-*.ubm extra UBLinux module include NVIDIA 470xx driver for linux
67 2405 ubm-linux61-r8168-8136 linux61-r8168-8136-*-*-*.ubm extra UBLinux module includes dkms additionals modules
68 2405 ubm-linux66-dkms linux66-dkms-*-*-*.ubm extra UBLinux module includes dkms additionals modules
69 2405 ubm-onlyoffice onlyoffice-*-*-*.ubm extra UBLinux module includes OnlyOffice suite
70 2405 ubm-patch patch-*-*-*.ubm extra UBLinux module include apps patch
71 2405 ubm-podman podman-*-*-*.ubm extra UBLinux module includes podman and webmanager and utils
72 2405 ubm-pycharm pycharm-*-*-*.ubm extra UBLinux module include pycharm-community-edition and utilities
73 2405 ubm-qaratms-ru qaratms-ru-*-*-*.ubm extra UBLinux module include pycharm-community-edition and utilities
74 2405 ubm-qemu qemu-*-*-*.ubm extra UBLinux module includes QEMU, manager and utils
75 2405 ubm-r7-office r7-office-*-*-*.ubm extra UBLinux module includes R7 Office
76 2405 ubm-realvnc realvnc-*-*-*.ubm extra UBLinux module includes realvnc viewer and server
77 2405 ubm-rustdesk rustdesk-*-*-*.ubm extra UBLinux module includes rustdesk
78 2405 ubm-rustdesk-server rustdesk-server-*-*-*.ubm extra UBLinux module includes rustdesk
79 2405 ubm-telegram telegram-*-*-*.ubm extra UBLinux module includes Telegram
80 2405 ubm-ubpile-workflow ubpile-workflow-*-*-*.ubm extra UBLinux module include UBPile Workflow
81 2405 ubm-virtual-guest virtual-guest-*-*-*.ubm extra UBLinux module includes agents for Linux guest
82 2405 ubm-virtualbox-host virtualbox-host-*-*-*.ubm extra UBLinux module includes VirtualBox and extension packs
83 2405 ubm-web web-*-*-*.ubm extra UBLinux module includes Web servers
84 2405 ubm-webmin webmin-*-*-*.ubm extra UBLinux module includes Webmin and Usermin
85 2405 ubm-whiteboard whiteboard-*-*-*.ubm extra UBLinux module includes interactive whiteboard soft
86 2405 ubm-winbox winbox-*-*-*.ubm extra UBLinux module include Winbox
87 2405 ubm-wine wine-*-*-*.ubm extra UBLinux module includes wine and utilities
88 2405 ubm-wps-office wps-office-*-*-*.ubm extra UBLinux module include Kingsoft Office (WPS Office) - an office productivity suite
89 2405 ubm-yandex-browser yandex-browser-*-*-*.ubm extra UBLinux module includes Yandex Browser and some utils
90 2204 ubm-001-linux 001-linux-*-*-*.ubm base UBLinux module the kernel and modules
91 2204 ubm-001-linux515 001-linux515-*-*-*.ubm base UBLinux module the kernel and modules
92 2204 ubm-001-linux61 001-linux61-*-*-*.ubm base UBLinux module the kernel and modules
93 2204 ubm-001-linux66 001-linux66-*-*-*.ubm base UBLinux module the kernel and modules
94 2204 ubm-002-linux-headers 002-linux-headers-*-*-*.ubm base UBLinux module headers and scripts for building modules for the Meta UBlinux kernel, modules, headers and documentation
95 2204 ubm-002-linux515-headers 002-linux515-headers-*-*-*.ubm base UBLinux module headers and scripts for building modules
96 2204 ubm-002-linux61-headers 002-linux61-headers-*-*-*.ubm base UBLinux module headers and scripts for building modules
97 2204 ubm-002-linux66-headers 002-linux66-headers-*-*-*.ubm base UBLinux module headers and scripts for building modules
98 2204 ubm-003-linux-docs 003-linux-docs-*-*-*.ubm base UBLinux module documentation for the UBLinux kernel
99 2204 ubm-003-linux515-docs 003-linux515-docs-*-*-*.ubm base UBLinux module documentation for the UBLinux kernel
100 2204 ubm-003-linux61-docs 003-linux61-docs-*-*-*.ubm base UBLinux module documentation for the UBLinux kernel
101 2204 ubm-003-linux66-docs 003-linux66-docs-*-*-*.ubm base UBLinux module documentation for the UBLinux kernel
102 2204 ubm-004-linux-firmware 004-linux-firmware-*-*-*.ubm base UBLinux module firmwares
103 2204 ubm-010-core 010-core-*-*-*.ubm base UBLinux module includes the core developer components
104 2204 ubm-010-core-devel 010-core-devel-*-*-*.ubm base UBLinux module includes the core developer components
105 2204 ubm-020-xorg-base 020-xorg-base-*-*-*.ubm base UBLinux module includes basic components Xorg
106 2204 ubm-021-xorg-fonts 021-xorg-fonts-*-*-*.ubm base UBLinux module includes basic fonts
107 2204 ubm-025-xorg-gl 025-xorg-gl-*-*-*.ubm base UBLinux module includes graphics accelerators
108 2204 ubm-030-xorg-gtk 030-xorg-gtk-*-*-*.ubm base UBLinux module includes GTK libs
109 2204 ubm-035-xorg-qt5 035-xorg-qt5-*-*-*.ubm base UBLinux module includes QT5 libs
110 2204 ubm-036-xorg-qt6 036-xorg-qt6-*-*-*.ubm base UBLinux module includes QT6 libs
111 2204 ubm-040-xorg-xfce 040-xorg-xfce-*-*-*.ubm base UBLinux module includes Xfce applications
112 2204 ubm-041-xorg-plasma 041-xorg-plasma-*-*-*.ubm base UBLinux module includes KDE Plasma applications
113 2204 ubm-042-xorg-gnome 042-xorg-gnome-*-*-*.ubm base UBLinux module includes GNOME next generation desktop shell
114 2204 ubm-043-xorg-mate 043-xorg-mate-*-*-*.ubm base UBLinux module includes MATE desktop shell
115 2204 ubm-045-xorg-pantheon 045-xorg-pantheon-*-*-*.ubm base UBLinux module includes Pantheon desktop shell
116 2204 ubm-049-xorg-liquidshell 049-xorg-liquidshell-*-*-*.ubm base UBLinux module includes Liquidshell basic desktop shell using QtWidgets
117 2204 ubm-050-xorg-gtk-app 050-xorg-gtk-app-*-*-*.ubm base UBLinux module includes GTK applications
118 2204 ubm-055-xorg-qt-app 055-xorg-qt-app-*-*-*.ubm base UBLinux module includes QT applications
119 2204 ubm-060-xorg-theme 060-xorg-theme-*-*-*.ubm base UBLinux module includes GTK and icons themes
120 2204 ubm-070-dm-lightdm 070-dm-lightdm-*-*-*.ubm base UBLinux module includes Lightdm display manager
121 2204 ubm-080-multimedia 080-multimedia-*-*-*.ubm base UBLinux module includes multimedia applications
122 2204 ubm-100-ublinux 100-ublinux-*-*-*.ubm base UBLinux module include system utilites
123 2204 ubm-amdgpu-pro amdgpu-pro-*-*-*.ubm extra UBLinux module includes AMDGRU PRO driver and utilities
124 2204 ubm-anydesk anydesk-*-*-*.ubm extra UBLinux module includes anydesk
125 2204 ubm-backgrounds backgrounds-*-*-*.ubm extra UBLinux module include desktop backgrounds
126 2204 ubm-blender blender-*-*-*.ubm extra UBLinux module includes wine and utilities
127 2204 ubm-chromium chromium-*-*-*.ubm extra UBLinux module includes Chromium-GOST and some plugins
128 2204 ubm-chromium-gost chromium-gost-*-*-*.ubm extra UBLinux module includes Chromium-GOST and some plugins
129 2204 ubm-database database-*-*-*.ubm extra UBLinux module includes database applications
130 2204 ubm-docker docker-*-*-*.ubm extra UBLinux module includes docker and webmanager and utils
131 2204 ubm-drv-brother drv-brother-*-*-*.ubm extra UBLinux module include Brother printer drivers
132 2204 ubm-drv-canon-capt drv-canon-capt-*-*-*.ubm extra UBLinux module include Canon CAPT Printer Driver
133 2204 ubm-drv-canon-ufrii drv-canon-ufrii-*-*-*.ubm extra UBLinux module include Canon UFR II LIPSLX CARPS2 printer driver
134 2204 ubm-drv-epson drv-epson-*-*-*.ubm extra UBLinux module include Epson printer drivers
135 2204 ubm-drv-kyocera drv-kyocera-*-*-*.ubm extra UBLinux module include Kyocera printer drivers
136 2204 ubm-drv-lexmark drv-lexmark-*-*-*.ubm extra UBLinux module include Lexmark drivers
137 2204 ubm-drv-pantum drv-pantum-*-*-*.ubm extra UBLinux module include Pantum printer drivers
138 2204 ubm-drv-printer drv-printer-*-*-*.ubm extra UBLinux module include hplip, gutenprint, foomatic
139 2204 ubm-drv-ricoh drv-ricoh-*-*-*.ubm extra UBLinux module include Ricoh drivers
140 2204 ubm-drv-samsung drv-samsung-*-*-*.ubm extra UBLinux module include Samsung drivers
141 2204 ubm-drv-xerox drv-xerox-*-*-*.ubm extra UBLinux module include Xerox drivers
142 2204 ubm-firefox firefox-*-*-*.ubm extra UBLinux module includes Firefox and some plugins
143 2204 ubm-gambas3 gambas3-*-*-*.ubm extra UBLinux module includes Gambas3 and components
144 2204 ubm-game-hedgewars game-hedgewars-*-*-*.ubm extra UBLinux module include Hedgewars game similiar to Worms
145 2204 ubm-game-warfork game-warfork-*-*-*.ubm extra UBLinux module include Hedgewars game similiar to Worms
146 2204 ubm-gitea gitea-*-*-*.ubm extra UBLinux module includes Gitea and MemCached
147 2204 ubm-gitlab gitlab-*-*-*.ubm extra UBLinux module include Gitlab CLI tools
148 2204 ubm-gitlab-cli gitlab-cli-*-*-*.ubm extra UBLinux module include Gitlab CLI tools
149 2204 ubm-java11-openjfx java11-openjfx-*-*-*.ubm extra UBLinux module include Java OpenJFX 11 client application platform
150 2204 ubm-java17-openjfx java17-openjfx-*-*-*.ubm extra UBLinux module include Java OpenJFX 17 client application platform
151 2204 ubm-jdk11 jdk11-*-*-*.ubm extra UBLinux module includes OpenJDK Java 11 development kit
152 2204 ubm-jdk17 jdk17-*-*-*.ubm extra UBLinux module includes OpenJDK Java 17 development kit
153 2204 ubm-jdk8 jdk8-*-*-*.ubm extra UBLinux module includes OpenJDK Java 8 development kit
154 2204 ubm-lazarus-gtk2 lazarus-gtk2-*-*-*.ubm extra UBLinux module include Free Pascal and Lazarus GTK2
155 2204 ubm-lazarus-qt5 lazarus-qt5-*-*-*.ubm extra UBLinux module include Free Pascal and Lazarus QT5
156 2204 ubm-lib32 lib32-*-*-*.ubm extra UBLinux module includes some library 32-bit
157 2204 ubm-libreoffice libreoffice-*-*-*.ubm extra UBLinux module includes rustdesk
158 2204 ubm-linux-dkms linux-dkms-*-*-*.ubm extra UBLinux module includes dkms additionals modules
159 2204 ubm-linux515-dkms linux515-dkms-*-*-*.ubm extra UBLinux module includes dkms additionals modules
160 2204 ubm-linux515-nvidia linux515-nvidia-*-*-*.ubm extra UBLinux module include NVIDIA 470xx driver for linux
161 2204 ubm-linux515-nvidia-390xx linux515-nvidia-390xx-*-*-*.ubm extra UBLinux module include NVIDIA 390xx driver for linux
162 2204 ubm-linux515-nvidia-470xx linux515-nvidia-470xx-*-*-*.ubm extra UBLinux module include NVIDIA 470xx driver for linux
163 2204 ubm-linux61-dkms linux61-dkms-*-*-*.ubm extra UBLinux module includes dkms additionals modules
164 2204 ubm-linux61-nvidia linux61-nvidia-*-*-*.ubm extra UBLinux module include NVIDIA 470xx driver for linux
165 2204 ubm-linux61-nvidia-390xx linux61-nvidia-390xx-*-*-*.ubm extra UBLinux module include NVIDIA 390xx driver for linux
166 2204 ubm-linux61-nvidia-470xx linux61-nvidia-470xx-*-*-*.ubm extra UBLinux module include NVIDIA 470xx driver for linux
167 2204 ubm-linux66-dkms linux66-dkms-*-*-*.ubm extra UBLinux module includes dkms additionals modules
168 2204 ubm-linux66-nvidia linux66-nvidia-*-*-*.ubm extra UBLinux module include NVIDIA 470xx driver for linux
169 2204 ubm-linux66-nvidia-390xx linux66-nvidia-390xx-*-*-*.ubm extra UBLinux module include NVIDIA 390xx driver for linux
170 2204 ubm-linux66-nvidia-470xx linux66-nvidia-470xx-*-*-*.ubm extra UBLinux module include NVIDIA 470xx driver for linux
171 2204 ubm-lsi-megaraid lsi-megaraid-*-*-*.ubm extra UBLinux module includes LSI MegaRaid SM, StorCLI, MegaCLI and utils
172 2204 ubm-nvidia-340 nvidia-340-*-*-*.ubm extra UBLinux module includes NVIDIA 340xx driver and utilities
173 2204 ubm-nvidia-390 nvidia-390-*-*-*.ubm extra UBLinux module includes NVIDIA 390xx driver and utilities
174 2204 ubm-nvidia-470 nvidia-470-*-*-*.ubm extra UBLinux module includes NVIDIA 470xx driver and utilities
175 2204 ubm-nvidia-510 nvidia-510-*-*-*.ubm extra UBLinux module includes NVIDIA 510xx driver and utilities
176 2204 ubm-nvidia-515 nvidia-515-*-*-*.ubm extra UBLinux module includes NVIDIA 515xx driver and utilities
177 2204 ubm-nvidia-optimus nvidia-optimus-*-*-*.ubm extra UBLinux module includes NVIDIA Optimus
178 2204 ubm-onlyoffice onlyoffice-*-*-*.ubm extra UBLinux module includes OnlyOffice DocumentServer suite
179 2204 ubm-onlyoffice-documentserver onlyoffice-documentserver-*-*-*.ubm extra UBLinux module includes OnlyOffice DocumentServer suite
180 2204 ubm-opera opera-*-*-*.ubm extra UBLinux module includes Opera and some plugins
181 2204 ubm-patch patch-*-*-*.ubm extra UBLinux module includes patch
182 2204 ubm-podman podman-*-*-*.ubm extra UBLinux module includes podman and webmanager and utils
183 2204 ubm-qemu qemu-*-*-*.ubm extra UBLinux module includes QEMU headless and utils
184 2204 ubm-qemu-headless qemu-headless-*-*-*.ubm extra UBLinux module includes QEMU headless and utils
185 2204 ubm-qt4 qt4-*-*-*.ubm extra UBLinux module include QT4
186 2204 ubm-realvnc realvnc-*-*-*.ubm extra UBLinux module includes realvnc viewer and server
187 2204 ubm-rustdesk rustdesk-*-*-*.ubm extra UBLinux module include rustdesk-server
188 2204 ubm-rustdesk-server rustdesk-server-*-*-*.ubm extra UBLinux module include rustdesk-server
189 2204 ubm-skype skype-*-*-*.ubm extra UBLinux module include Skype
190 2204 ubm-telegram telegram-*-*-*.ubm extra UBLinux module includes Telegram
191 2204 ubm-tor tor-*-*-*.ubm extra UBLinux module include Tor utils and browser
192 2204 ubm-ubpile-workflow ubpile-workflow-*-*-*.ubm extra UBLinux module include UBPile Workflow
193 2204 ubm-virtual-guest virtual-guest-*-*-*.ubm extra UBLinux module includes agents for Linux guest without X support
194 2204 ubm-virtual-guest-nox virtual-guest-nox-*-*-*.ubm extra UBLinux module includes agents for Linux guest without X support
195 2204 ubm-virtualbox-host virtualbox-host-*-*-*.ubm extra UBLinux module includes VirtualBox headless and extension packs
196 2204 ubm-virtualbox-host-headless virtualbox-host-headless-*-*-*.ubm extra UBLinux module includes VirtualBox headless and extension packs
197 2204 ubm-virtualbox-web virtualbox-web-*-*-*.ubm extra UBLinux module includes phpvirtualbox for VirtualBox
198 2204 ubm-vivaldi vivaldi-*-*-*.ubm extra UBLinux module include Vivaldi browser
199 2204 ubm-vmware-workstation16 vmware-workstation16-*-*-*.ubm extra UBLinux module includes VMware-Workstation 16
200 2204 ubm-web web-*-*-*.ubm extra UBLinux module includes Webmin and Usermin
201 2204 ubm-webmin webmin-*-*-*.ubm extra UBLinux module includes Webmin and Usermin
202 2204 ubm-wiki-js wiki-js-*-*-*.ubm extra UBLinux module include Wiki.js
203 2204 ubm-winbox winbox-*-*-*.ubm extra UBLinux module include Winbox
204 2204 ubm-wine wine-*-*-*.ubm extra UBLinux module includes wine and utilities
205 2204 ubm-wps-office wps-office-*-*-*.ubm extra UBLinux module include Kingsoft Office (WPS Office) - an office productivity suite
206 2204 ubm-xremote xremote-*-*-*.ubm extra UBLinux module include X11 remote utils
207 2204 ubm-yandex-browser yandex-browser-*-*-*.ubm extra UBLinux module includes Yandex Browser and some utils
208 2204 ubm-zoom zoom-*-*-*.ubm extra UBLinux module include Zoom

@ -8,27 +8,37 @@ include_directories(${GTK_INCLUDE_DIRS})
link_directories(${GTK_LIBRARY_DIRS}) link_directories(${GTK_LIBRARY_DIRS})
add_definitions(${GTK_CFLAGS_OTHER}) add_definitions(${GTK_CFLAGS_OTHER})
pkg_check_modules(VTE291 REQUIRED vte-2.91)
include_directories(${VTE291_INCLUDE_DIRS})
link_directories(${VTE291_LIBRARY_DIRS})
add_definitions(${VTE291_CFLAGS_OTHER})
pkg_check_modules(JSON REQUIRED json-c) pkg_check_modules(JSON REQUIRED json-c)
include_directories(${JSON_INCLUDE_DIRS}) include_directories(${JSON_INCLUDE_DIRS})
link_directories(${JSON_LIBRARY_DIRS}) link_directories(${JSON_LIBRARY_DIRS})
add_definitions(${JSON_CFLAGS_OTHER}) add_definitions(${JSON_CFLAGS_OTHER})
pkg_check_modules(PWQUALITY REQUIRED pwquality)
include_directories(${PWQUALITY_INCLUDE_DIRS})
link_directories(${PWQUALITY_LIBRARY_DIRS})
add_definitions(${PWQUALITY_CFLAGS_OTHER})
find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0) find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
find_library(TIMEZONEMAP_LIBRARIES_FOUND timezonemap)
option(WEBKIT_FOUND "No" OFF)
if(WEBKIT_LIBRARIES_FOUND) if(WEBKIT_LIBRARIES_FOUND)
option(WEBKIT_FOUND "Yes" ON) add_definitions(-DWEBKIT_INCLUDE)
PKG_CHECK_MODULES(WEBKIT REQUIRED webkit2gtk-4.0 webkit2gtk-web-extension-4.0) PKG_CHECK_MODULES(WEBKIT REQUIRED webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
include_directories(${WEBKIT_INCLUDE_DIRS}) include_directories(${WEBKIT_INCLUDE_DIRS})
link_directories(${WEBKIT_LIBRARY_DIRS}) link_directories(${WEBKIT_LIBRARY_DIRS})
add_definitions(${WEBKIT_CFLAGS_OTHER}) add_definitions(${WEBKIT_CFLAGS_OTHER})
endif() endif()
if(TIMEZONEMAP_LIBRARIES_FOUND)
message("TIMEZONEMAP ENABLED")
add_definitions(-DTIMEZONEMAP_INCLUDE)
PKG_CHECK_MODULES(TIMEZONEMAP REQUIRED timezonemap)
include_directories(${TIMEZONEMAP_INCLUDE_DIRS})
link_directories(${TIMEZONEMAP_LIBRARY_DIRS})
add_definitions(${TIMEZONEMAP_CFLAGS_OTHER})
endif()
set(GRESOURCE_C resources.c) set(GRESOURCE_C resources.c)
set(GRESOURCE_XML gresource.xml) set(GRESOURCE_XML gresource.xml)
@ -57,6 +67,7 @@ set(DEPENDFILES
../ubinstall-gtk-layouts.glade ../ubinstall-gtk-layouts.glade
../ubinstall-gtk-keyboard-layouts.glade ../ubinstall-gtk-keyboard-layouts.glade
../ubinstall-gtk-slider.glade ../ubinstall-gtk-slider.glade
../ubinstall-gtk-package-info.glade
../gresource.xml ../gresource.xml
../ubinstall-gtk.css ../ubinstall-gtk.css
../modules.csv ../modules.csv
@ -68,15 +79,6 @@ set(DEPENDFILES
../groups-list.csv ../groups-list.csv
../vfs-list.csv ../vfs-list.csv
../applications-list.csv ../applications-list.csv
../icons-builtin/install_type_custom_normal.png
../icons-builtin/install_type_data_only_normal.png
../icons-builtin/install_type_fast_normal.png
../icons-builtin/install_type_grub_install_normal.png
../icons-builtin/install_type_grub_update_normal.png
../icons-builtin/install_type_next_normal.png
../icons-builtin/install_type_part_normal.png
../icons-builtin/install_type_recovery_normal.png
../icons-builtin/install_type_system_only_normal.png
) )
file(COPY ${DEPENDFILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) file(COPY ${DEPENDFILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
@ -99,7 +101,7 @@ add_custom_target(
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
) )
add_definitions(-DVTE_INCLUDE) # add_definitions(-DVTE_INCLUDE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \
-O2 -pipe -fno-plt -fexceptions \ -O2 -pipe -fno-plt -fexceptions \
@ -138,6 +140,7 @@ set(SOURCE_FILES
ubinstall-gtk-language.c ubinstall-gtk-language.c
ubinstall-gtk-config-hub.c ubinstall-gtk-config-hub.c
ubinstall-gtk-startup-apps.c ubinstall-gtk-startup-apps.c
ubinstall-gtk-ui-lang.c
ubinstall-gtk.h ubinstall-gtk.h
ubl-strings.h ubl-strings.h
) )
@ -148,6 +151,8 @@ set(LIBRARIES
${UTILS_LIBRARIES} ${UTILS_LIBRARIES}
${VTE291_LIBRARIES} ${VTE291_LIBRARIES}
${JSON_LIBRARIES} ${JSON_LIBRARIES}
${PWQUALITY_LIBRARIES}
${TIMEZONEMAP_LIBRARIES}
pthread pthread
ublsettings ublsettings
ublsettings-gtk3 ublsettings-gtk3

@ -116,7 +116,7 @@ void yon_advanced_partition_set_from_section(advanced_partition *part, advanced_
if (!yon_char_is_empty(part->part)) part->part_type = ADVANCED_PART_NEW; if (!yon_char_is_empty(part->part)) part->part_type = ADVANCED_PART_NEW;
else part->part_type = ADVANCED_PART_EXISTING; else part->part_type = ADVANCED_PART_EXISTING;
if (section->format){ if (section->format){
gtk_switch_set_active(GTK_SWITCH(part->FormatSwitch),1); gtk_switch_set_active(GTK_SWITCH(part->FormatCombo),1);
if (section->size){ if (section->size){
gtk_spin_button_set_value(GTK_SPIN_BUTTON(part->SizeSpin),section->size); gtk_spin_button_set_value(GTK_SPIN_BUTTON(part->SizeSpin),section->size);
gtk_combo_box_set_active(GTK_COMBO_BOX(part->SizeCombo),yon_get_size_get_from_letter(section->size_letter)-1); gtk_combo_box_set_active(GTK_COMBO_BOX(part->SizeCombo),yon_get_size_get_from_letter(section->size_letter)-1);
@ -692,8 +692,11 @@ void yon_advanced_part_parameter_changed(GtkWidget *self, advanced_partition *pa
} else if (self == part->EncryptionCombo||self == part->EncryptionEntry){ } else if (self == part->EncryptionCombo||self == part->EncryptionEntry){
section->encryption = yon_char_new(gtk_combo_box_get_active_id(GTK_COMBO_BOX(part->EncryptionCombo))); section->encryption = yon_char_new(gtk_combo_box_get_active_id(GTK_COMBO_BOX(part->EncryptionCombo)));
section->encryption_password = yon_char_new(gtk_entry_get_text(GTK_ENTRY(part->EncryptionEntry))); section->encryption_password = yon_char_new(gtk_entry_get_text(GTK_ENTRY(part->EncryptionEntry)));
} else if (self == part->FormatSwitch){ } else if (self == part->FormatCombo){
if (gtk_switch_get_active(GTK_SWITCH(part->FormatSwitch))){ int format_active = gtk_combo_box_get_active(GTK_COMBO_BOX(part->FormatCombo));
if (format_active == 2){
section->format=2;
} else if (format_active == 1){
section->format=1; section->format=1;
} else { } else {
section->format=0; section->format=0;
@ -701,9 +704,15 @@ void yon_advanced_part_parameter_changed(GtkWidget *self, advanced_partition *pa
} }
} }
gboolean on_format_changed(GtkWidget *self, gboolean , advanced_partition *part){ void on_format_changed(GtkWidget *self, advanced_partition *part){
int active = gtk_combo_box_get_active(GTK_COMBO_BOX(self));
switch (active){
case 0:
case 1: gtk_revealer_set_reveal_child(GTK_REVEALER(part->FormatRevealer),0);
break;
case 2: gtk_revealer_set_reveal_child(GTK_REVEALER(part->FormatRevealer),1);
}
yon_advanced_part_parameter_changed(self, part); yon_advanced_part_parameter_changed(self, part);
return 0;
} }
advanced_partition *yon_advanced_partition_new(){ advanced_partition *yon_advanced_partition_new(){
@ -714,7 +723,7 @@ advanced_partition *yon_advanced_partition_new(){
part->SystemSectionToggle = yon_gtk_builder_get_widget(builder,"SystemSectionToggle"); part->SystemSectionToggle = yon_gtk_builder_get_widget(builder,"SystemSectionToggle");
part->UserDataSectionToggle = yon_gtk_builder_get_widget(builder,"UserDataSectionToggle"); part->UserDataSectionToggle = yon_gtk_builder_get_widget(builder,"UserDataSectionToggle");
part->RemoveButton = yon_gtk_builder_get_widget(builder,"RemoveButton"); part->RemoveButton = yon_gtk_builder_get_widget(builder,"RemoveButton");
part->FormatSwitch = yon_gtk_builder_get_widget(builder,"FormatSwitch"); part->FormatCombo = yon_gtk_builder_get_widget(builder,"FormatCombo");
part->SizeSpin = yon_gtk_builder_get_widget(builder,"SizeSpin"); part->SizeSpin = yon_gtk_builder_get_widget(builder,"SizeSpin");
part->SizeCombo = yon_gtk_builder_get_widget(builder,"SizeCombo"); part->SizeCombo = yon_gtk_builder_get_widget(builder,"SizeCombo");
part->PartLabelEntry = yon_gtk_builder_get_widget(builder,"PartLabelEntry"); part->PartLabelEntry = yon_gtk_builder_get_widget(builder,"PartLabelEntry");
@ -728,12 +737,22 @@ advanced_partition *yon_advanced_partition_new(){
part->part = NULL; part->part = NULL;
part->device = NULL; part->device = NULL;
yon_gtk_revealer_set_from_switch(GTK_REVEALER(part->FormatRevealer),GTK_SWITCH(part->FormatSwitch)); gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(part->SizeCombo),"K",_("Kb"));
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(part->SizeCombo),"M",_("Mb"));
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(part->SizeCombo),"G",_("Gb"));
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(part->SizeCombo),"T",_("Tb"));
gtk_combo_box_set_active(GTK_COMBO_BOX(part->SizeCombo),0);
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(part->FormatCombo),DO_NOT_FORMAT_LABEL);
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(part->FormatCombo),AUTOMATIC_FORMAT_LABEL);
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(part->FormatCombo),FORMAT_LABEL);
gtk_combo_box_set_active(GTK_COMBO_BOX(part->FormatCombo),0);
g_signal_connect(G_OBJECT(part->EncryptionButton),"clicked",G_CALLBACK(on_advanced_password_clicked),part); g_signal_connect(G_OBJECT(part->EncryptionButton),"clicked",G_CALLBACK(on_advanced_password_clicked),part);
g_signal_connect(G_OBJECT(part->EncryptionCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),part->EncryptionButton); g_signal_connect(G_OBJECT(part->EncryptionCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),part->EncryptionButton);
g_signal_connect(G_OBJECT(part->EncryptionCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),part->EncryptionEntry); g_signal_connect(G_OBJECT(part->EncryptionCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),part->EncryptionEntry);
g_signal_connect(G_OBJECT(part->EncryptionEntry),"changed",G_CALLBACK(yon_advanced_part_parameter_changed),part); g_signal_connect(G_OBJECT(part->EncryptionEntry),"changed",G_CALLBACK(yon_advanced_part_parameter_changed),part);
g_signal_connect(G_OBJECT(part->FormatSwitch),"state-set",G_CALLBACK(on_format_changed),part); g_signal_connect(G_OBJECT(part->FormatCombo),"changed",G_CALLBACK(on_format_changed),part);
g_signal_connect(G_OBJECT(part->SizeCombo),"changed",G_CALLBACK(yon_advanced_part_parameter_changed),part); g_signal_connect(G_OBJECT(part->SizeCombo),"changed",G_CALLBACK(yon_advanced_part_parameter_changed),part);
g_signal_connect(G_OBJECT(part->SizeSpin),"changed",G_CALLBACK(yon_advanced_part_parameter_changed),part); g_signal_connect(G_OBJECT(part->SizeSpin),"changed",G_CALLBACK(yon_advanced_part_parameter_changed),part);
g_signal_connect(G_OBJECT(part->PartLabelEntry),"changed",G_CALLBACK(yon_advanced_part_parameter_changed),part); g_signal_connect(G_OBJECT(part->PartLabelEntry),"changed",G_CALLBACK(yon_advanced_part_parameter_changed),part);
@ -741,7 +760,6 @@ advanced_partition *yon_advanced_partition_new(){
g_signal_connect(G_OBJECT(part->FileSystemLabelEntry),"changed",G_CALLBACK(yon_advanced_part_parameter_changed),part); g_signal_connect(G_OBJECT(part->FileSystemLabelEntry),"changed",G_CALLBACK(yon_advanced_part_parameter_changed),part);
g_signal_connect(G_OBJECT(part->EncryptionCombo),"changed",G_CALLBACK(yon_advanced_part_parameter_changed),part); g_signal_connect(G_OBJECT(part->EncryptionCombo),"changed",G_CALLBACK(yon_advanced_part_parameter_changed),part);
yon_fs_type_setup(GTK_COMBO_BOX_TEXT(part->FileSystemTypeCombo)); yon_fs_type_setup(GTK_COMBO_BOX_TEXT(part->FileSystemTypeCombo));
g_object_set_data(G_OBJECT(part->MainBox),"advanced_partition",part); g_object_set_data(G_OBJECT(part->MainBox),"advanced_partition",part);

@ -7,12 +7,6 @@ int yon_bootloader_save(main_window *widgets){
} else { } else {
yon_config_remove_by_key(GRUB_TIMEOUT_parameter); yon_config_remove_by_key(GRUB_TIMEOUT_parameter);
} }
char *OS = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->BootloadDefaultOSEntry));
if (strcmp(OS,DEFAULT_BOOTLOAD_MENU_ITEM_LABEL)){
yon_config_register(GRUB_DEFAULT_parameter,GRUB_DEFAULT_parameter_command,OS);
} else {
yon_config_remove_by_key(GRUB_DEFAULT_parameter);
}
if (gtk_switch_get_active(GTK_SWITCH(widgets->BootloadNoPasswordSwitch))){ if (gtk_switch_get_active(GTK_SWITCH(widgets->BootloadNoPasswordSwitch))){
GtkTreeIter iter; GtkTreeIter iter;
yon_config_register(AUTOLOGINUSER_parameter,AUTOLOGINUSER_parameter_command,"yes"); yon_config_register(AUTOLOGINUSER_parameter,AUTOLOGINUSER_parameter_command,"yes");
@ -164,7 +158,9 @@ void on_bootloader_user_add(GtkWidget *, main_window *widgets){
void yon_menu_open_submenu(yon_menu_window *window, yon_menu_item *item){ void yon_menu_open_submenu(yon_menu_window *window, yon_menu_item *item){
int size; int size;
config_str options = yon_config_load(get_menus_entry_command,&size); config_str options = yon_config_load(get_menus_entry_command,&size);
bind_textdomain_codeset("ublinux-init-grub-functions","UTF-8");
textdomain("ublinux-init-grub-functions"); textdomain("ublinux-init-grub-functions");
for (int i=1;i<size;i++){ for (int i=1;i<size;i++){
yon_char_remove_last_symbol(options[i],'\n'); yon_char_remove_last_symbol(options[i],'\n');
int parsed_size; int parsed_size;
@ -184,6 +180,7 @@ void yon_menu_open_submenu(yon_menu_window *window, yon_menu_item *item){
yon_char_parsed_free(parsed,parsed_size); yon_char_parsed_free(parsed,parsed_size);
} }
textdomain(LocaleName); textdomain(LocaleName);
} }
void yon_menu_ungrab(yon_menu_window *window){ void yon_menu_ungrab(yon_menu_window *window){
@ -239,15 +236,19 @@ yon_menu_window *yon_menu_window_open(GtkWidget *, main_window *widgets){
gtk_list_box_insert(GTK_LIST_BOX(window->ItemsListBox),item->MenuItemRow,-1); gtk_list_box_insert(GTK_LIST_BOX(window->ItemsListBox),item->MenuItemRow,-1);
gtk_widget_hide(item->ArrowImage); gtk_widget_hide(item->ArrowImage);
} }
int size; int size;
config_str options = yon_config_load(get_menus_entry_command,&size); config_str options = yon_config_load(get_menus_entry_command,&size);
GHashTable *created = g_hash_table_new(g_str_hash,g_str_equal); GHashTable *created = g_hash_table_new(g_str_hash,g_str_equal);
bind_textdomain_codeset("ublinux-init-grub-functions","UTF-8");
textdomain("ublinux-init-grub-functions"); textdomain("ublinux-init-grub-functions");
for (int i=1;i<size;i++){ for (int i=1;i<size;i++){
yon_char_remove_last_symbol(options[i],'\n'); yon_char_remove_last_symbol(options[i],'\n');
int parsed_size; int parsed_size;
config_str parsed = yon_char_parse(options[i],&parsed_size,";"); config_str parsed = yon_char_parse(options[i],&parsed_size,";");
{
char *temp = _(parsed[1]);
parsed[1] = yon_char_new(temp);
}
int have_children=0; int have_children=0;
char *children_id; char *children_id;
if ((children_id=strstr(parsed[0],">"))){ if ((children_id=strstr(parsed[0],">"))){
@ -373,6 +374,32 @@ yon_menu_item *yon_menu_item_new(){
return item; return item;
} }
char *yon_bootloader_get_os_name(char *parameter){
bind_textdomain_codeset("ublinux-init-grub-functions","UTF-8");
textdomain("ublinux-init-grub-functions");
char *final_os_name = NULL;
int size;
config_str menu_entries = yon_config_load(get_menus_entry_command,&size);
for (int i=0;i<size;i++){
yon_char_remove_last_symbol(menu_entries[i],'\n');
int parsed_size;
config_str parsed = yon_char_parse(menu_entries[i],&parsed_size,";");
if (!strcmp(parsed[0],parameter)){
char *name = strstr(_(parsed[1]),">");
if (!yon_char_is_empty(name)){
name++;
final_os_name = yon_char_new(name);
} else {
final_os_name = yon_char_new(_(parsed[1]));
}
}
yon_char_parsed_free(parsed,parsed_size);
}
yon_char_parsed_free(menu_entries,size);
textdomain(LocaleName);
return final_os_name;
}
void yon_bootloader_interface_update(main_window *widgets){ void yon_bootloader_interface_update(main_window *widgets){
char *timeout = config(GRUB_TIMEOUT_parameter); char *timeout = config(GRUB_TIMEOUT_parameter);
char *admins = config(GRUB_SUPERUSERS_parameter); char *admins = config(GRUB_SUPERUSERS_parameter);
@ -423,11 +450,16 @@ void yon_bootloader_init(main_window *widgets){
gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->BootloadTimerSpin),0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->BootloadTimerSpin),0);
} }
if (!yon_char_is_empty(os)){ if (!yon_char_is_empty(os)){
gtk_entry_set_text(GTK_ENTRY(widgets->BootloadDefaultOSEntry),os); char *os_name = yon_bootloader_get_os_name(os);
if (!yon_char_is_empty(os_name)){
gtk_entry_set_text(GTK_ENTRY(widgets->BootloadDefaultOSEntry),os_name);
free(os_name);
}
} else { } else {
gtk_entry_set_text(GTK_ENTRY(widgets->BootloadDefaultOSEntry),DEFAULT_BOOTLOAD_MENU_ITEM_LABEL); gtk_entry_set_text(GTK_ENTRY(widgets->BootloadDefaultOSEntry),DEFAULT_BOOTLOAD_MENU_ITEM_LABEL);
} }
if (!yon_char_is_empty(autologin)&&(!strcmp(autologin,"yes")||!strcmp(autologin,"enable"))){ if (!yon_char_is_empty(autologin)&&(!strcmp(autologin,"yes")||!strcmp(autologin,"enable"))){
gtk_list_store_clear(widgets->BootloadUsersList);
gtk_switch_set_active(GTK_SWITCH(widgets->BootloadNoPasswordSwitch),1); gtk_switch_set_active(GTK_SWITCH(widgets->BootloadNoPasswordSwitch),1);
int admins_size; int admins_size;
config_str admins_parsed = yon_char_parse(admins,&admins_size,","); config_str admins_parsed = yon_char_parse(admins,&admins_size,",");

@ -20,13 +20,12 @@ int yon_kernel_save(main_window *widgets){
} }
} }
if (yon_char_is_empty(enabled_module)){ if (!yon_char_is_empty(enabled_module)){
yon_config_register(KERNEL_BOOT_parameter,KERNEL_BOOT_parameter_command,enabled_module); yon_config_register(KERNEL_BOOT_parameter,KERNEL_BOOT_parameter_command,enabled_module);
} else { } else {
yon_config_remove_by_key(KERNEL_BOOT_parameter); yon_config_remove_by_key(KERNEL_BOOT_parameter);
} }
return 1; return 1;
} }
@ -53,7 +52,7 @@ int yon_kernel_addon_save(main_window *widgets){
int yon_os_components_save(main_window *widgets){ int yon_os_components_save(main_window *widgets){
GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox)); GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->OSSoftwareListBox));
GList *iter; GList *iter;
int size; int size=0;
int overall_num=0; int overall_num=0;
config_str modules = NULL; config_str modules = NULL;
for(iter = list;iter;iter=iter->next){ for(iter = list;iter;iter=iter->next){
@ -104,12 +103,12 @@ void yon_os_row_setup(os_row *row, char *name, char *version,char *tags, char *d
row->name = yon_char_new(name); row->name = yon_char_new(name);
char *description_full = yon_char_new(description); char *description_full = yon_char_new(description);
if (strlen(description)>100){ // if (strlen(description)>100){
guint size; // guint size;
config_str description_wrapped = yon_char_wrap_to_lines(description,3,&size); // config_str description_wrapped = yon_char_wrap_to_lines(description,2,&size);
description_full = yon_char_parsed_to_string(description_wrapped,size,"\n"); // description_full = yon_char_parsed_to_string(description_wrapped,size,"\n");
yon_char_parsed_free(description_wrapped,size); // yon_char_parsed_free(description_wrapped,size);
} // }
gtk_label_set_label(GTK_LABEL(row->NameLabel),name); gtk_label_set_label(GTK_LABEL(row->NameLabel),name);
gtk_label_set_label(GTK_LABEL(row->VersionLabel),version); gtk_label_set_label(GTK_LABEL(row->VersionLabel),version);
gtk_label_set_label(GTK_LABEL(row->DescriptionLabel),description_full); gtk_label_set_label(GTK_LABEL(row->DescriptionLabel),description_full);
@ -123,7 +122,11 @@ gboolean yon_os_component_insert(struct row_data *row_input){
main_window *widgets = row_input->widgets; main_window *widgets = row_input->widgets;
gtk_list_box_insert(GTK_LIST_BOX(widgets->OSSoftwareListBox),row->row,-1); gtk_list_box_insert(GTK_LIST_BOX(widgets->OSSoftwareListBox),row->row,-1);
yon_os_row_setup(row,row_input->name,row_input->version,row_input->tags,row_input->description); yon_os_row_setup(row,row_input->name,row_input->version,row_input->tags,_(row_input->description));
char *modules = config(modules_parameter);
if (yon_char_is_empty(modules)||yon_char_check_element(modules,row_input->name,",")||!strcmp(modules,"auto")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),1);
}
return G_SOURCE_REMOVE; return G_SOURCE_REMOVE;
} }
@ -201,6 +204,9 @@ int yon_software_save(main_window *widgets){
GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->AdditionalComponentsList)); GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->AdditionalComponentsList));
GList *iter; GList *iter;
char *config_val = config(modules_extra_parameter); char *config_val = config(modules_extra_parameter);
if (yon_char_is_empty(config_val)){
yon_config_register(modules_extra_parameter,modules_extra_parameter_command,"");
}
for(iter = list;iter;iter=iter->next){ for(iter = list;iter;iter=iter->next){
os_row *row = g_object_get_data(iter->data,"kernel_row"); os_row *row = g_object_get_data(iter->data,"kernel_row");
char *target = row->name; char *target = row->name;
@ -220,8 +226,15 @@ gboolean yon_software_insert(struct row_data *row_input){
main_window *widgets = row_input->widgets; main_window *widgets = row_input->widgets;
gtk_list_box_insert(GTK_LIST_BOX(widgets->AdditionalComponentsList),row->row,-1); gtk_list_box_insert(GTK_LIST_BOX(widgets->AdditionalComponentsList),row->row,-1);
yon_os_row_setup(row,row_input->name,row_input->version,row_input->tags,row_input->description); yon_os_row_setup(row,row_input->name,row_input->version,row_input->tags,_(row_input->description));
char *modules = config(modules_extra_parameter);
if (yon_char_check_element(modules,row_input->name,",")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),1);
} else {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),0); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),0);
}
// gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(row->InstallCheck),0);
return G_SOURCE_REMOVE; return G_SOURCE_REMOVE;
} }
@ -284,7 +297,7 @@ void yon_pacman_init(main_window *widgets){
char *version = yon_packages_get_version(YON_PACKAGES_SYNC,parsed[i]); char *version = yon_packages_get_version(YON_PACKAGES_SYNC,parsed[i]);
GtkTreeIter iter; GtkTreeIter iter;
gtk_list_store_append(widgets->PacmanSoftwareChosenList,&iter); gtk_list_store_append(widgets->PacmanSoftwareChosenList,&iter);
gtk_list_store_set(widgets->PacmanSoftwareChosenList,&iter,0,1,1,parsed[i],2,version,3,description,-1); gtk_list_store_set(widgets->PacmanSoftwareChosenList,&iter,0,1,1,parsed[i],2,version,3,_(description),-1);
} }
yon_char_parsed_free(parsed,size); yon_char_parsed_free(parsed,size);
} }

@ -1,7 +1,12 @@
#include "ubinstall-gtk.h" #include "ubinstall-gtk.h"
int yon_configuration_hub_save(main_window *){ int yon_configuration_hub_save(main_window *widgets){
char *finish_button = (char *)gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->ConfigHubRebootCombo));
if (!yon_char_is_empty(finish_button)){
yon_config_register(finish_parameter,finish_parameter_command,finish_button);
} else {
yon_config_remove_by_key(finish_parameter);
}
if (!main_config.configure_mode){ if (!main_config.configure_mode){
int size; int size;
config_str parameters = yon_config_get_save_parameters_by_key(&size,modules_parameter, config_str parameters = yon_config_get_save_parameters_by_key(&size,modules_parameter,
@ -32,6 +37,7 @@ int yon_configuration_hub_save(main_window *){
GRUB_TIMEOUT_parameter, GRUB_TIMEOUT_parameter,
GRUB_DEFAULT_parameter, GRUB_DEFAULT_parameter,
AUTOLOGINUSER_parameter, AUTOLOGINUSER_parameter,
finish_parameter,
NULL); NULL);
if (parameters){ if (parameters){
char *command_parameters = yon_char_parsed_to_string(parameters,size," -- "); char *command_parameters = yon_char_parsed_to_string(parameters,size," -- ");
@ -140,26 +146,25 @@ void yon_configuration_hub_add(GtkFlowBox *target, char *name, char *icon, enum
GtkIconInfo *info = gtk_icon_theme_lookup_icon_for_scale(gtk_icon_theme_get_default(),icon,54,1,GTK_ICON_LOOKUP_FORCE_SIZE); GtkIconInfo *info = gtk_icon_theme_lookup_icon_for_scale(gtk_icon_theme_get_default(),icon,54,1,GTK_ICON_LOOKUP_FORCE_SIZE);
char *name_wrapped = yon_char_wrap_to_length_str(name,10);
cur_icon->MainBox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5); cur_icon->MainBox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
cur_icon->Label = gtk_label_new(name_wrapped); cur_icon->Label = gtk_label_new(name);
cur_icon->Image = gtk_image_new_from_pixbuf(gtk_icon_info_load_icon(info,NULL)); cur_icon->Image = gtk_image_new_from_pixbuf(gtk_icon_info_load_icon(info,NULL));
cur_icon->page = page; cur_icon->page = page;
GtkWidget *flow = gtk_flow_box_child_new(); GtkWidget *flow = gtk_flow_box_child_new();
gtk_style_context_add_class(gtk_widget_get_style_context(flow),"bggrey"); gtk_style_context_add_class(gtk_widget_get_style_context(flow),"bggrey");
gtk_widget_set_margin_end(cur_icon->Label,5);
gtk_label_set_line_wrap(GTK_LABEL(cur_icon->Label),1);
gtk_label_set_max_width_chars(GTK_LABEL(cur_icon->Label),15);
gtk_label_set_xalign(GTK_LABEL(cur_icon->Label), GTK_ALIGN_FILL);
gtk_label_set_line_wrap_mode(GTK_LABEL(cur_icon->Label),PANGO_WRAP_WORD);
gtk_label_set_xalign(GTK_LABEL(cur_icon->Label),0);
g_object_set_data(G_OBJECT(flow),"config_hub_icon",cur_icon); g_object_set_data(G_OBJECT(flow),"config_hub_icon",cur_icon);
gtk_container_add(GTK_CONTAINER(flow),cur_icon->MainBox); gtk_container_add(GTK_CONTAINER(flow),cur_icon->MainBox);
gtk_widget_set_hexpand(flow,0);
gtk_box_pack_start(GTK_BOX(cur_icon->MainBox),cur_icon->Image,0,0,0); gtk_box_pack_start(GTK_BOX(cur_icon->MainBox),cur_icon->Image,0,0,0);
gtk_box_pack_start(GTK_BOX(cur_icon->MainBox),cur_icon->Label,0,0,0); gtk_box_pack_start(GTK_BOX(cur_icon->MainBox),cur_icon->Label,1,1,0);
gtk_widget_set_margin_bottom(cur_icon->MainBox,10);
gtk_widget_set_margin_top(cur_icon->MainBox,10);
gtk_widget_set_margin_start(cur_icon->MainBox,10);
gtk_widget_set_margin_end(cur_icon->MainBox,10);
gtk_flow_box_insert(target,flow,-1); gtk_flow_box_insert(target,flow,-1);
gtk_widget_show_all(flow); gtk_widget_show_all(flow);
free(name_wrapped);
} }
void yon_flow_box_clear(GtkFlowBox *target){ void yon_flow_box_clear(GtkFlowBox *target){
@ -171,6 +176,18 @@ void yon_flow_box_clear(GtkFlowBox *target){
} }
void yon_configuration_hub_init(main_window *widgets){ void yon_configuration_hub_init(main_window *widgets){
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->ConfigHubRebootCombo));
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->ConfigHubRebootCombo),NULL,DEFAULT_LABEL);
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->ConfigHubRebootCombo),"reboot",REBOOT_LABEL);
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->ConfigHubRebootCombo),"shutdown",SHUTDOWN_LABEL);
char *finish_string = config(finish_parameter);
if (!yon_char_is_empty(finish_string)){
gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->ConfigHubRebootCombo),finish_string);
} else {
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ConfigHubRebootCombo),0);
}
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ConfigHubRebootCombo),0);
yon_flow_box_clear(GTK_FLOW_BOX(widgets->HubPersonalListBox)); yon_flow_box_clear(GTK_FLOW_BOX(widgets->HubPersonalListBox));
yon_flow_box_clear(GTK_FLOW_BOX(widgets->HubSystemListBox)); yon_flow_box_clear(GTK_FLOW_BOX(widgets->HubSystemListBox));
yon_flow_box_clear(GTK_FLOW_BOX(widgets->HubPackagesListBox)); yon_flow_box_clear(GTK_FLOW_BOX(widgets->HubPackagesListBox));

@ -1,18 +1,10 @@
#include "ubinstall-gtk.h" #include "ubinstall-gtk.h"
void configuration_mode_accept(GtkWidget *,configuration_window *window){ int yon_configuration_path_check(const char *path){
const char *path = gtk_entry_get_text(GTK_ENTRY(window->PathEntry)); char *full_path = NULL;
if (yon_char_is_empty(path)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->PathEntry);
return;
}
if (access(path,F_OK)){
int homedir_create = 0; int homedir_create = 0;
int file_create = 0;
int pos = yon_char_find_last((char*)path,'/'); int pos = yon_char_find_last((char*)path,'/');
if (pos>=-1){ if (pos>-1){
char *path_copy = yon_char_new(path); char *path_copy = yon_char_new(path);
char *dir_path = yon_char_divide(path_copy,pos); char *dir_path = yon_char_divide(path_copy,pos);
if (access(dir_path,F_OK)){ if (access(dir_path,F_OK)){
@ -20,25 +12,41 @@ void configuration_mode_accept(GtkWidget *,configuration_window *window){
} }
free(path_copy); free(path_copy);
free(dir_path); free(dir_path);
} else {
homedir_create = 1;
} }
dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
data->action_text = homedir_create?CREATE_CONFIG_DIALOG_LABEL_HOMEDIR:CREATE_CONFIG_DIALOG_LABEL;
data->title = WARNING_TITLE_LABEL;
if (yon_confirmation_dialog_call(window->Window,data)==GTK_RESPONSE_ACCEPT){
char *full_path = NULL;
if (homedir_create){ if (homedir_create){
full_path = yon_char_unite(yon_ubl_user_get_home_directory(),"/",path,NULL); full_path = yon_char_unite(yon_ubl_user_get_home_directory(),"/",path,NULL);
} else if (file_create){
} else { } else {
full_path = yon_char_new(path); full_path = yon_char_new(path);
} }
if (access(full_path,F_OK)){
dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
data->action_text = homedir_create?CREATE_CONFIG_DIALOG_LABEL_HOMEDIR:CREATE_CONFIG_DIALOG_LABEL;
data->title = WARNING_TITLE_LABEL;
if (yon_confirmation_dialog_call(NULL,data)==GTK_RESPONSE_ACCEPT){
yon_launch(ubconfig_file_create(full_path)); yon_launch(ubconfig_file_create(full_path));
} else return; struct passwd *user = getpwnam(yon_ubl_root_user_get());
if (chown(full_path,user->pw_uid,user->pw_gid)){};
} }
}
main_config.config_load_path = full_path;
if (!yon_char_is_empty(main_config.config_save_path)) free(main_config.config_save_path); if (!yon_char_is_empty(main_config.config_save_path)) free(main_config.config_save_path);
main_config.config_save_path = yon_char_new(path); main_config.config_save_path = yon_char_new(full_path);
return 1;
}
void configuration_mode_accept(GtkWidget *,configuration_window *window){
const char *path = gtk_entry_get_text(GTK_ENTRY(window->PathEntry));
if (yon_char_is_empty(path)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->PathEntry);
return;
}
yon_configuration_path_check(path);
gtk_widget_destroy(window->Window); gtk_widget_destroy(window->Window);
} }
@ -56,7 +64,6 @@ void on_configuration_exit(GtkWidget *,configuration_window *window){
GList *box = gtk_container_get_children(GTK_CONTAINER(widgets->ConfigurationModeMenuItem)); GList *box = gtk_container_get_children(GTK_CONTAINER(widgets->ConfigurationModeMenuItem));
GList *children = gtk_container_get_children(GTK_CONTAINER(box->data)); GList *children = gtk_container_get_children(GTK_CONTAINER(box->data));
GtkWidget *Check = GTK_WIDGET(g_list_nth_data(children,1)); GtkWidget *Check = GTK_WIDGET(g_list_nth_data(children,1));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Check),0); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Check),0);
g_list_free(box); g_list_free(box);
@ -74,7 +81,7 @@ void on_configuration_mode_switch(GtkWidget *self,main_window *widgets){
GtkWidget *Check = GTK_WIDGET(g_list_nth_data(children,1)); GtkWidget *Check = GTK_WIDGET(g_list_nth_data(children,1));
int active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Check)); int active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Check));
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(Check))){ if (!active){
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_configuration_mode); GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_configuration_mode);
configuration_window *window = malloc(sizeof(configuration_window)); configuration_window *window = malloc(sizeof(configuration_window));
window->Window = yon_gtk_builder_get_widget(builder,"MainWindow"); window->Window = yon_gtk_builder_get_widget(builder,"MainWindow");

@ -153,3 +153,77 @@ gboolean on_install_slider_slide(main_window *widgets){
} }
return G_SOURCE_REMOVE; return G_SOURCE_REMOVE;
} }
// void yon_resize_images_update(main_window *widgets){
// enum YON_PAGES page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook));
// gtk_widget_hide(widgets->BootloaderImage);
// gtk_widget_hide(widgets->RegionImage);
// gtk_widget_hide(widgets->KeyboardImage);
// gtk_widget_hide(widgets->UserImage);
// gtk_widget_hide(widgets->StartupImage);
// gtk_widget_hide(widgets->NetworkImage);
// switch(page){
// case YON_PAGE_BOOTLOADER:
// gtk_widget_show(widgets->BootloaderImage);
// break;
// case YON_PAGE_REGION:
// gtk_widget_show(widgets->RegionImage);
// break;
// case YON_PAGE_KEYBOARD:
// gtk_widget_show(widgets->KeyboardImage);
// break;
// case YON_PAGE_USERS:
// gtk_widget_show(widgets->UserImage);
// break;
// case YON_PAGE_STARTUP:
// gtk_widget_show(widgets->StartupImage);
// break;
// case YON_PAGE_NETWORK:
// gtk_widget_show(widgets->NetworkImage);
// break;
// case YON_PAGE_INSTALLATION:
// gtk_widget_show(widgets->SlidesImage);
// g_timeout_add(7000,on_image_slide,widgets);
// break;
// default:
// break;
// }
// }
// void on_region_resized(GtkWidget *,main_window *widgets){
// enum YON_PAGES page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook));
// GtkImage *target = NULL;
// GdkPixbuf *pixbuf = NULL;
// target = GTK_IMAGE(widgets->RegionImage);
// pixbuf = widgets->region_original;
// if (target){
// yon_image_resize_from_container(target,pixbuf);
// }
// }
// int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled){
// int width = gtk_widget_get_allocated_width((gtk_widget_get_parent(GTK_WIDGET(target))));
// int height = gtk_widget_get_allocated_height((gtk_widget_get_parent(GTK_WIDGET(target))));
// int newImgWidthDef = (width <= 217) ? width : width - 30;
// int newImgHeightDef = (height <= 120) ? height : height - 80;
// int originalWidth = gdk_pixbuf_get_width(pixbuf_unscaled);
// int originalHeight = gdk_pixbuf_get_height(pixbuf_unscaled);
// int newImgHeight = (int)(originalHeight / ((double) originalWidth / newImgWidthDef));
// if (newImgHeight > newImgHeightDef) {
// newImgHeight = newImgHeightDef;
// newImgWidthDef = (int)(originalWidth / ((double) originalHeight / newImgHeight));
// }
// int newImageWidth = (int)(originalWidth / ((double) originalHeight / newImgHeight));
// GdkPixbuf *scaledPixBuf = gdk_pixbuf_scale_simple(pixbuf_unscaled, newImageWidth, newImgHeight, GDK_INTERP_BILINEAR);
// gtk_image_set_from_pixbuf(target, scaledPixBuf);
// g_object_unref(scaledPixBuf);
// return 1;
// }

@ -1,5 +1,15 @@
#include "ubinstall-gtk.h" #include "ubinstall-gtk.h"
char *yon_size_get_name_from_letter(char letter){
switch (letter){
case 'K': return yon_char_new(KB_LABEL); break;
case 'M': return yon_char_new(MB_LABEL); break;
case 'G': return yon_char_new(GB_LABEL); break;
case 'T': return yon_char_new(TB_LABEL); break;
}
return NULL;
}
int yon_install_common_save(main_window *widgets){ int yon_install_common_save(main_window *widgets){
GtkTreeModel *model; GtkTreeModel *model;
GtkTreeIter iter; GtkTreeIter iter;
@ -184,8 +194,8 @@ int yon_advanced_sections_save(dictionary *dict){
char *part = yon_char_unite(part_first,last_section?",":NULL,part_last,NULL); char *part = yon_char_unite(part_first,last_section?",":NULL,part_last,NULL);
yon_config_register(part_parameter,part_parameter_command,part); yon_config_register(part_parameter,part_parameter_command,part);
char * format_first = gtk_switch_get_active(GTK_SWITCH(first_section->FormatSwitch))?"yes":"no"; char * format_first = gtk_switch_get_active(GTK_SWITCH(first_section->FormatCombo))?"yes":"no";
char * format_last = last_section?gtk_switch_get_active(GTK_SWITCH(last_section->FormatSwitch))?"yes":"no":NULL; char * format_last = last_section?gtk_switch_get_active(GTK_SWITCH(last_section->FormatCombo))?"yes":"no":NULL;
char *format = yon_char_unite(format_first,part_last?",":NULL,format_last,NULL); char *format = yon_char_unite(format_first,part_last?",":NULL,format_last,NULL);
yon_config_register(part_format_parameter,part_format_parameter_command,format); yon_config_register(part_format_parameter,part_format_parameter_command,format);
@ -246,6 +256,22 @@ void yon_set_max_size_from_partition(GtkTreeView *table, GtkSpinButton *spin_but
} }
} }
} }
// char *parameter = config(part_size_parameter);
// if (!yon_char_is_empty(parameter)){
// GtkAdjustment *adj = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->OSFormatSizeSpin));
// gtk_adjustment_set_value(adj,atol(parameter));
// g_signal_handlers_block_by_func(G_OBJECT(widgets->NextInstallationSizeTypeSpin),G_CALLBACK(on_partition_changed),widgets);
// g_signal_handlers_block_by_func(G_OBJECT(widgets->OSFormatSizeCombo),G_CALLBACK(on_partition_changed),widgets);
// g_signal_handlers_block_by_func(G_OBJECT(widgets->UserdataFormatSizeCombo),G_CALLBACK(on_partition_changed),widgets);
// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->OSFormatSizeCombo),yon_get_size_get_from_letter(parameter[strlen(parameter)-1])-1);
// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->UserdataFormatSizeCombo),yon_get_size_get_from_letter(parameter[strlen(parameter)-1])-1);
// gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->NextInstallationSizeTypeSpin),yon_get_size_get_from_letter(parameter[strlen(parameter)-1])-1);
// g_signal_handlers_unblock_by_func(G_OBJECT(widgets->NextInstallationSizeTypeSpin),G_CALLBACK(on_partition_changed),widgets);
// g_signal_handlers_unblock_by_func(G_OBJECT(widgets->OSFormatSizeCombo),G_CALLBACK(on_partition_changed),widgets);
// g_signal_handlers_unblock_by_func(G_OBJECT(widgets->UserdataFormatSizeCombo),G_CALLBACK(on_partition_changed),widgets);
// }
void on_partition_changed(GtkWidget *self, main_window *widgets){ void on_partition_changed(GtkWidget *self, main_window *widgets){
if (self==widgets->NextInstallationSysSectionTree||self == widgets->NextInstallationSizeTypeSpin){ if (self==widgets->NextInstallationSysSectionTree||self == widgets->NextInstallationSizeTypeSpin){
@ -283,14 +309,16 @@ void on_device_selection_changed(GtkWidget *self, main_window *widgets){
capacity_long = atol(parsed[2]); capacity_long = atol(parsed[2]);
char *temp = yon_char_from_double(yon_size_long_convert_automatic(capacity_long,&sizemod)); char *temp = yon_char_from_double(yon_size_long_convert_automatic(capacity_long,&sizemod));
capacity = yon_char_append_c(temp,sizemod); char *size_str = yon_size_get_name_from_letter(sizemod);
capacity = yon_char_unite(temp," ", size_str,NULL);
free(temp); free(temp);
} }
if (parsed_size>7&&!yon_char_is_empty(parsed[7])){ if (parsed_size>7&&!yon_char_is_empty(parsed[7])){
char sizemod='\0'; char sizemod='\0';
free_space_long = capacity_long-atol(parsed[7]); free_space_long = capacity_long-atol(parsed[7]);
char *temp = yon_char_from_double(yon_size_long_convert_automatic(free_space_long,&sizemod)); char *temp = yon_char_from_double(yon_size_long_convert_automatic(free_space_long,&sizemod));
free_space = yon_char_append_c(temp,sizemod); char *size_str = yon_size_get_name_from_letter(sizemod);
capacity = yon_char_unite(temp," ", size_str,NULL);
free(temp); free(temp);
} }
if (parsed_size>3){ if (parsed_size>3){
@ -306,14 +334,13 @@ void on_device_selection_changed(GtkWidget *self, main_window *widgets){
yon_char_parsed_free(parsed,parsed_size); yon_char_parsed_free(parsed,parsed_size);
} }
} }
gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin),0.0); // gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin),0.0);
gtk_adjustment_set_upper(gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin)),0.0); gtk_adjustment_set_upper(gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(widgets->NextInstallationSizeSpin)),0.0);
} }
} }
void yon_devices_setup(main_window *widgets){ void yon_devices_setup(main_window *widgets){
GtkTreeIter iter; GtkTreeIter iter;
// if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->DevicesList),&iter)) return;
gtk_list_store_clear(widgets->DevicesList); gtk_list_store_clear(widgets->DevicesList);
int size; int size;
config_str parsed = NULL; config_str parsed = NULL;
@ -335,12 +362,32 @@ void yon_devices_setup(main_window *widgets){
json_object_object_get_ex(device, "serial", &serial); json_object_object_get_ex(device, "serial", &serial);
gtk_list_store_append(widgets->DevicesList,&iter); gtk_list_store_append(widgets->DevicesList,&iter);
gtk_list_store_set(widgets->DevicesList,&iter,0,json_object_get_string(path),1,json_object_get_string(model),2,json_object_get_string(serial),3,json_object_get_string(size),4,json_object_get_string(vendor),6,1,-1); char *size_string = yon_char_new(json_object_get_string(size));
char *size_str = yon_size_get_name_from_letter(size_string[strlen(size_string)-1]);
size_string[strlen(size_string)-1] = '\0';
char *size_final_string = yon_char_unite(size_string," ",size_str,NULL);
gtk_list_store_set(widgets->DevicesList,&iter,0,json_object_get_string(path),1,json_object_get_string(model),2,json_object_get_string(serial),3,size_final_string,4,json_object_get_string(vendor),6,1,-1);
free(size_string);
free(size_str);
free(size_final_string);
} }
yon_char_parsed_free(parsed,size); yon_char_parsed_free(parsed,size);
} }
void yon_os_password_open(GtkWidget *, main_window *widgets){
yon_password_window *window = yon_password_open(GTK_ENTRY(widgets->OSFormatEncryptionEntry));
yon_password_function_set(window,(double*)yon_password_check_func);
yon_password_hash_list_set(window,NULL,NULL,0);
}
void yon_userdata_password_open(GtkWidget *, main_window *widgets){
yon_password_window *window = yon_password_open(GTK_ENTRY(widgets->OSFormatEncryptionEntry));
yon_password_hash_list_set(window,NULL,NULL,0);
yon_password_function_set(window,(double*)yon_password_check_func);
}
void yon_install_init(main_window *widgets, enum YON_PAGES page){ void yon_install_init(main_window *widgets, enum YON_PAGES page){
yon_devices_setup(widgets); yon_devices_setup(widgets);
@ -410,8 +457,8 @@ void yon_install_init(main_window *widgets, enum YON_PAGES page){
case YON_PAGE_RECOVERY_USRDATA_ONLY: case YON_PAGE_RECOVERY_USRDATA_ONLY:
device_tree = widgets->UserdataDevicesTree; device_tree = widgets->UserdataDevicesTree;
partition_tree = widgets->UserdataSysSectionTree; partition_tree = widgets->UserdataSysSectionTree;
format_switch = widgets->OSFormatSwitch; format_switch = widgets->UserdataFormatSwitch;
partition_size_spin = widgets->UserdataFormatSwitch; partition_size_spin = widgets->UserdataFormatSizeSpin;
partition_size_combo = widgets->UserdataFormatSizeCombo; partition_size_combo = widgets->UserdataFormatSizeCombo;
partition_mark_entry = widgets->UserdataFormatPartitionEntry; partition_mark_entry = widgets->UserdataFormatPartitionEntry;
fs_type_combo = widgets->UserdataFilesystemTypeCombo; fs_type_combo = widgets->UserdataFilesystemTypeCombo;
@ -486,9 +533,6 @@ void yon_install_init(main_window *widgets, enum YON_PAGES page){
yon_char_parsed_free(encryptions,size); yon_char_parsed_free(encryptions,size);
gtk_combo_box_set_active(GTK_COMBO_BOX(partition_encryption_combo),0); gtk_combo_box_set_active(GTK_COMBO_BOX(partition_encryption_combo),0);
} }
char *format = config(part_format_parameter);
if ((!yon_char_is_empty(format)&&!strcmp(format,"yes"))||!gtk_widget_get_sensitive(format_switch)){
gtk_switch_set_active(GTK_SWITCH(format_switch),1);
if (device_label){ if (device_label){
char *parameter = config(part_label_parameter); char *parameter = config(part_label_parameter);
if (!yon_char_is_empty(parameter)){ if (!yon_char_is_empty(parameter)){
@ -499,13 +543,20 @@ void yon_install_init(main_window *widgets, enum YON_PAGES page){
} }
if (partition_size_spin&&partition_size_combo){ if (partition_size_spin&&partition_size_combo){
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(partition_size_combo));
// gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(partition_size_combo),"K",_("Kb"));
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(partition_size_combo),"M",_("Mb"));
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(partition_size_combo),"G",_("Gb"));
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(partition_size_combo),"T",_("Tb"));
gtk_combo_box_set_active(GTK_COMBO_BOX(partition_size_combo),0);
char *parameter = config(part_size_parameter); char *parameter = config(part_size_parameter);
if (!yon_char_is_empty(parameter)){ if (!yon_char_is_empty(parameter)){
gtk_spin_button_set_value(GTK_SPIN_BUTTON(partition_size_spin),atol(parameter)); gtk_spin_button_set_value(GTK_SPIN_BUTTON(partition_size_spin),atol(parameter));
gtk_combo_box_set_active(GTK_COMBO_BOX(partition_size_combo),yon_get_size_get_from_letter(parameter[strlen(parameter)-1])-1); gtk_combo_box_set_active(GTK_COMBO_BOX(partition_size_combo),yon_get_size_get_from_letter(parameter[strlen(parameter)-1])-1);
} else { } else {
gtk_spin_button_set_value(GTK_SPIN_BUTTON(partition_size_spin),0); gtk_spin_button_set_value(GTK_SPIN_BUTTON(partition_size_spin),3);
gtk_combo_box_set_active(GTK_COMBO_BOX(partition_size_combo),0); gtk_combo_box_set_active(GTK_COMBO_BOX(partition_size_combo),2);
} }
} }
if (partition_mark_entry){ if (partition_mark_entry){
@ -538,6 +589,9 @@ void yon_install_init(main_window *widgets, enum YON_PAGES page){
gtk_entry_set_text(GTK_ENTRY(partition_encryption_entry),""); gtk_entry_set_text(GTK_ENTRY(partition_encryption_entry),"");
} }
} }
char *format = config(part_format_parameter);
if ((!yon_char_is_empty(format)&&!strcmp(format,"yes"))||!gtk_widget_get_sensitive(format_switch)){
gtk_switch_set_active(GTK_SWITCH(format_switch),1);
} else if (gtk_widget_get_sensitive(format_switch)){ } else if (gtk_widget_get_sensitive(format_switch)){
gtk_switch_set_active(GTK_SWITCH(format_switch),0); gtk_switch_set_active(GTK_SWITCH(format_switch),0);
} }

@ -240,10 +240,38 @@ void on_kernel_addon_install_enabled(GtkWidget *, kernel_addon_row *row){
} }
} }
void yon_gtk_label_set_font(GtkLabel *label);
void yon_gtk_label_set_font(GtkLabel *label){
g_return_if_fail(GTK_IS_LABEL(label));
PangoAttrList *attributes = pango_attr_list_new();
PangoFontDescription *font_descr = pango_font_description_new();
pango_font_description_set_family(font_descr,"Source Code Pro 10");
PangoAttribute *font_attr = pango_attr_font_desc_new(font_descr);
pango_attr_list_insert(attributes,font_attr);
gtk_label_set_attributes(GTK_LABEL(label),attributes);
}
typedef struct {
GtkWidget *MainBox;
GtkWidget *InfoTree;
GtkListStore *InfoList;
} info_element;
info_element *yon_package_info_element_new();
info_element *yon_package_info_element_new(){
info_element *element = malloc(sizeof(info_element));
memset(element,0,sizeof(info_element));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_package_info);
element->MainBox = yon_gtk_builder_get_widget(builder,"MainBox");
element->InfoTree = yon_gtk_builder_get_widget(builder,"InfoTree");
element->InfoList = GTK_LIST_STORE(gtk_builder_get_object(builder,"InfoList"));
return element;
}
void on_kernel_addon_info(GtkLabel *self){ void on_kernel_addon_info(GtkLabel *self){
yon_window *window = yon_window_new(); yon_window *window = yon_window_new();
yon_gtk_window_setup(GTK_WINDOW(window->Window),NULL,TITLE_LABEL,icon_path,"info-label"); yon_gtk_window_setup(GTK_WINDOW(window->Window),NULL,PACKAGE_INFO_LABEL,icon_path,"info-label");
char *package=NULL; char *package=NULL;
package = yon_char_new(gtk_label_get_text(self)); package = yon_char_new(gtk_label_get_text(self));
int size; int size;
@ -256,19 +284,29 @@ void on_kernel_addon_info(GtkLabel *self){
} }
GtkWidget *label = NULL; 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){ if (size!=-1){
char *final_text = yon_char_parsed_to_string(info,size,""); info_element *element = yon_package_info_element_new();
label = gtk_label_new(final_text); gtk_box_pack_start(GTK_BOX(window->MainBox),element->MainBox,1,1,0);
gtk_widget_show(label); for (int i=0;i<size;i++){
gtk_box_pack_start(GTK_BOX(window->MainBox),label,0,0,0); yon_char_remove_last_symbol(info[i],'\n');
free(final_text); GtkTreeIter iter;
int 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);
}
} else { } else {
label = gtk_label_new(PACKAGE_NOT_FOUND_LABEL); label = gtk_label_new(PACKAGE_NOT_FOUND_LABEL);
yon_gtk_label_set_font(GTK_LABEL(label));
gtk_widget_show(label); gtk_widget_show(label);
gtk_box_pack_start(GTK_BOX(window->MainBox),label,0,0,0); gtk_box_pack_start(GTK_BOX(window->MainBox),label,0,0,0);
}
gtk_label_set_xalign(GTK_LABEL(label),0); gtk_label_set_xalign(GTK_LABEL(label),0);
}
gtk_widget_show(window->Window); gtk_widget_show(window->Window);
} }

@ -13,8 +13,15 @@ int yon_keyboard_save(main_window *widgets){
char *final = NULL; char *final = NULL;
for_iter(widgets->LayoutsList, &iter){ for_iter(widgets->LayoutsList, &iter){
char *target; char *target;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->LayoutsList),&iter,0,&target,-1); char *code;
char *temp = yon_char_append_element(final,target,","); gtk_tree_model_get(GTK_TREE_MODEL(widgets->LayoutsList),&iter,0,&target,1,&code,-1);
char *temp = NULL;
if (!yon_char_is_empty(code)){
char *tmp = yon_char_unite(target,"_",code,NULL);
temp = yon_char_append_element(final,tmp,",");
} else {
temp = yon_char_append_element(final,target,",");
}
if (!yon_char_is_empty(final)) free(final); if (!yon_char_is_empty(final)) free(final);
final = temp; final = temp;
} }
@ -44,6 +51,11 @@ void yon_keyboard_init(main_window *widgets){
g_signal_handlers_block_by_func(G_OBJECT(widgets->KeyboardModelCombo),G_CALLBACK(on_model_changed),widgets); g_signal_handlers_block_by_func(G_OBJECT(widgets->KeyboardModelCombo),G_CALLBACK(on_model_changed),widgets);
g_signal_handlers_block_by_func(G_OBJECT(widgets->KeyboardDefaultLayoutsSwitch),G_CALLBACK(on_layout_default_toggled),widgets); g_signal_handlers_block_by_func(G_OBJECT(widgets->KeyboardDefaultLayoutsSwitch),G_CALLBACK(on_layout_default_toggled),widgets);
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->KeyboardModelCombo)); gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->KeyboardModelCombo));
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->KeyboardNumLockCombo));
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->KeyboardNumLockCombo),NULL,DEFAULT_LABEL);
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->KeyboardNumLockCombo),NULL,ON_LABEL);
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->KeyboardNumLockCombo),NULL,OFF_LABEL);
int size; int size;
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(widgets->KeyboardModelCombo),DEFAULT_LABEL); gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(widgets->KeyboardModelCombo),DEFAULT_LABEL);
config_str models = yon_config_load(get_keyboard_models_command,&size); config_str models = yon_config_load(get_keyboard_models_command,&size);
@ -149,6 +161,7 @@ void on_layouts_accept(GtkWidget *self, layouts_window *window){
main_window *widgets = g_object_get_data(G_OBJECT(window->Window),"widgets"); main_window *widgets = g_object_get_data(G_OBJECT(window->Window),"widgets");
gtk_list_store_clear(widgets->LayoutsList); gtk_list_store_clear(widgets->LayoutsList);
GtkTreeIter iter; GtkTreeIter iter;
GtkTreeIter child_iter;
for_iter (window->list,&iter){ for_iter (window->list,&iter){
int active; int active;
char *target; char *target;
@ -156,6 +169,18 @@ void on_layouts_accept(GtkWidget *self, layouts_window *window){
if (active){ if (active){
yon_layout_load(target,widgets); yon_layout_load(target,widgets);
} }
if (gtk_tree_model_iter_children(GTK_TREE_MODEL(window->list),&child_iter,&iter)){
for (int valid2=1;valid2;valid2=gtk_tree_model_iter_next(GTK_TREE_MODEL(window->list),&child_iter)){
char *code;
gtk_tree_model_get(GTK_TREE_MODEL(window->list),&child_iter,0,&target,1,&code,3,&active,-1);
if (active){
char *full_code = yon_char_unite(target,"_",code,NULL);
yon_layout_load(full_code,widgets);
free(full_code);
}
}
}
} }
on_subwindow_close(self); on_subwindow_close(self);
} }

@ -66,30 +66,27 @@ void on_locale_accept(GtkWidget *self, language_window *window){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),yon_char_get_localised_from_lib(NOTHING_CHOSEN_LABEL),5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),yon_char_get_localised_from_lib(NOTHING_CHOSEN_LABEL),5,BACKGROUND_IMAGE_FAIL_TYPE);
return; return;
} }
char *locale_str = config(locale_parameter); GtkTreeIter iter;
GtkTreeIter iter,itar; char *sys_locale = NULL;
for_iter(widgets->LanguageList,&iter){
char *target;
int status;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguageList),&iter,0,&status,3,&target,-1);
if (status){
sys_locale = target;
}
}
gtk_list_store_clear(widgets->LanguageList);
int size; int size;
config_str parsed = yon_char_parse(final,&size,","); config_str parsed = yon_char_parse(final,&size,",");
for (int i=0;i<size;i++){ for (int i=0;i<size;i++){
int found = 0;
for_iter(GTK_TREE_MODEL(widgets->LanguageList),&itar){
char *checktarget;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguageList),&itar,3,&checktarget,-1);
if (!strcmp(checktarget,parsed[i])){
found = 1;
break;
}
}
if (found) continue;
char *locale_str = g_hash_table_lookup(main_config.languages,parsed[i]); char *locale_str = g_hash_table_lookup(main_config.languages,parsed[i]);
if (yon_char_is_empty(locale_str)) continue; if (yon_char_is_empty(locale_str)) continue;
int parameter_size; int parameter_size;
config_str parameter_parsed = yon_char_parse(locale_str,&parameter_size,"|"); config_str parameter_parsed = yon_char_parse(locale_str,&parameter_size,"|");
gtk_list_store_append(widgets->LanguageList,&iter); gtk_list_store_append(widgets->LanguageList,&iter);
gtk_list_store_set(widgets->LanguageList,&iter,1,parameter_parsed[1],2,parameter_parsed[2],3,parameter_parsed[0],-1); gtk_list_store_set(widgets->LanguageList,&iter,1,parameter_parsed[1],2,parameter_parsed[2],3,parameter_parsed[0],-1);
} if (!yon_char_is_empty(sys_locale)&&!strcmp(parameter_parsed[0],sys_locale)){
if (yon_char_is_empty(locale_str)){
if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->LanguageList),&iter)){
gtk_list_store_set(widgets->LanguageList,&iter,0,1,-1); gtk_list_store_set(widgets->LanguageList,&iter,0,1,-1);
} }
} }
@ -137,13 +134,8 @@ gboolean yon_locale_window_load(language_window *window){
} }
void *yon_locales_load_func(language_window *window){ void *yon_locales_load_func(language_window *window){
char *config_value = config(lang_parameter);
int config_parsed_size; int config_parsed_size;
config_str config_parsed = NULL; config_str config_parsed = yon_char_parse(window->languages,&config_parsed_size,",");
if (config_value){
gtk_entry_set_text(GTK_ENTRY(window->ManualEntry),config_value);
config_parsed = yon_char_parse(config_value,&config_parsed_size,",");
}
int size; int size;
config_str languages = yon_config_load(languages_command,&size); config_str languages = yon_config_load(languages_command,&size);
@ -171,7 +163,7 @@ void *yon_locales_load_func(language_window *window){
g_thread_exit(NULL); g_thread_exit(NULL);
} }
language_window *yon_language_window_new(){ language_window *yon_language_window_new(char *chosen_languages){
language_window *window = malloc(sizeof(language_window)); language_window *window = malloc(sizeof(language_window));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_locales_path); GtkBuilder *builder = gtk_builder_new_from_resource(glade_locales_path);
window->Window = yon_gtk_builder_get_widget(builder,"Window"); window->Window = yon_gtk_builder_get_widget(builder,"Window");
@ -184,12 +176,15 @@ language_window *yon_language_window_new(){
window->LoadingSpinner = yon_gtk_builder_get_widget(builder,"LoadingSpinner"); window->LoadingSpinner = yon_gtk_builder_get_widget(builder,"LoadingSpinner");
window->ToggleCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"ToggleCell")); window->ToggleCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"ToggleCell"));
window->LanguagesList = GTK_LIST_STORE(gtk_builder_get_object(builder,"LanguagesList")); window->LanguagesList = GTK_LIST_STORE(gtk_builder_get_object(builder,"LanguagesList"));
window->languages = yon_char_new(chosen_languages);
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_locale_accept),window); g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_locale_accept),window);
g_signal_connect(G_OBJECT(window->ToggleCell),"toggled",G_CALLBACK(on_locale_toggle),window); g_signal_connect(G_OBJECT(window->ToggleCell),"toggled",G_CALLBACK(on_locale_toggle),window);
yon_gtk_tree_view_minimal_fixed_size_set_full(GTK_TREE_VIEW(window->LanguagesTree)); yon_gtk_tree_view_minimal_fixed_size_set_full(GTK_TREE_VIEW(window->LanguagesTree));
gtk_entry_set_text(GTK_ENTRY(window->ManualEntry),chosen_languages);
gtk_overlay_add_overlay(GTK_OVERLAY(window->LoadingOverlay),window->LoadingSpinner); gtk_overlay_add_overlay(GTK_OVERLAY(window->LoadingOverlay),window->LoadingSpinner);
g_thread_new("locales-thread",(GThreadFunc)yon_locales_load_func,window); g_thread_new("locales-thread",(GThreadFunc)yon_locales_load_func,window);
@ -197,12 +192,22 @@ language_window *yon_language_window_new(){
} }
void on_language_open(GtkWidget *, main_window *widgets){ void on_language_open(GtkWidget *, main_window *widgets){
language_window *window = yon_language_window_new(); GtkTreeIter iter;
char *languages = NULL;
for_iter(GTK_TREE_MODEL(widgets->LanguageList),&iter){
char *target;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->LanguageList),&iter,3,&target,-1);
char *temp = yon_char_append_element(languages,target,",");
if (!yon_char_is_empty(languages)) free(languages);
languages = temp;
}
language_window *window = yon_language_window_new(languages);
g_object_set_data(G_OBJECT(window->Window),"widgets",widgets); g_object_set_data(G_OBJECT(window->Window),"widgets",widgets);
yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow),ADD_LANGUAGE_TITLE_LABEL,icon_path,"LocalesWindow"); yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow),ADD_LANGUAGE_TITLE_LABEL,icon_path,"LocalesWindow");
gtk_widget_show(window->Window); gtk_widget_show(window->Window);
} }

@ -84,10 +84,15 @@ void on_summary_log_view(GtkWidget *,main_window *widgets){
} }
void yon_installation_progress_update(GFileMonitor *,GFile *,GFile *,GFileMonitorEvent ,main_window *widgets) { void yon_installation_progress_update(GFileMonitor *,GFile *,GFile *,GFileMonitorEvent ,main_window *widgets) {
int size; int size=0;
g_mutex_lock(&main_config.progress_mutex); g_mutex_lock(&main_config.progress_mutex);
config_str text = yon_file_open(progress_path, &size); config_str text = yon_file_open(progress_path, &size);
if (!text||!size){
g_mutex_unlock(&main_config.progress_mutex);
return;
}
g_mutex_unlock(&main_config.progress_mutex); g_mutex_unlock(&main_config.progress_mutex);
if (size) { if (size) {
@ -114,5 +119,19 @@ void yon_installation_progress_update(GFileMonitor *,GFile *,GFile *,GFileMonito
} }
yon_char_parsed_free(text, size); yon_char_parsed_free(text, size);
size=0;
text=NULL;
}
}
gboolean yon_progress_bar_start(main_window *widgets){
GFile *file_desc = g_file_new_for_path(progress_path);
widgets->install_info_monitor = g_file_monitor_file(file_desc,G_FILE_MONITOR_NONE,NULL,NULL);
g_signal_connect(G_OBJECT(widgets->install_info_monitor),"changed",G_CALLBACK(yon_installation_progress_update),widgets);
g_object_unref(file_desc);
FILE *file = fopen(progress_path,"w");
if (file){
fclose(file);
} }
return G_SOURCE_REMOVE;
} }

@ -44,6 +44,11 @@ void on_type_changed(GtkComboBox *self,network_info *info){
} }
} }
void on_network_removed(GtkWidget *,network_info *info){
gtk_widget_destroy(info->MainBox);
free(info);
}
network_info *yon_network_info_new(){ network_info *yon_network_info_new(){
network_info *info = new(network_info); network_info *info = new(network_info);
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_network_info); GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_network_info);
@ -77,6 +82,7 @@ network_info *yon_network_info_new(){
g_signal_connect(G_OBJECT(info->AutoGetIPSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),info->GatewayEntry); g_signal_connect(G_OBJECT(info->AutoGetIPSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),info->GatewayEntry);
g_signal_connect(G_OBJECT(info->AutoGetIPSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),info->MaskEntry); g_signal_connect(G_OBJECT(info->AutoGetIPSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),info->MaskEntry);
g_signal_connect(G_OBJECT(info->AutoGetIPSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),info->DNSEntry); g_signal_connect(G_OBJECT(info->AutoGetIPSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),info->DNSEntry);
g_signal_connect(G_OBJECT(info->RemoveButton),"clicked",G_CALLBACK(on_network_removed),info);
g_signal_connect(G_OBJECT(info->TypeCombo),"changed",G_CALLBACK(on_type_changed),info); g_signal_connect(G_OBJECT(info->TypeCombo),"changed",G_CALLBACK(on_type_changed),info);
yon_gtk_revealer_set_from_switch_inversed(GTK_REVEALER(info->IpRevealer),GTK_SWITCH(info->AutoGetIPSwitch)); yon_gtk_revealer_set_from_switch_inversed(GTK_REVEALER(info->IpRevealer),GTK_SWITCH(info->AutoGetIPSwitch));
@ -87,6 +93,7 @@ network_info *yon_network_info_new(){
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(info->TypeCombo),iter->data,iter->data); gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(info->TypeCombo),iter->data,iter->data);
} }
g_list_free(list); g_list_free(list);
gtk_combo_box_set_active(GTK_COMBO_BOX(info->TypeCombo),0);
gtk_widget_show(info->MainBox); gtk_widget_show(info->MainBox);
return info; return info;
@ -286,6 +293,11 @@ int yon_network_save(main_window *widgets){
} }
void yon_network_init(main_window *widgets){ void yon_network_init(main_window *widgets){
GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->NetworkConnectionsBox));
GList *iter;
for (iter=list;iter;iter=iter->next){
gtk_widget_destroy(list->data);
}
int size; int size;
config_str network_types = yon_resource_open_file(network_path,&size); config_str network_types = yon_resource_open_file(network_path,&size);
for (int i=1;i<size;i++){ for (int i=1;i<size;i++){
@ -317,6 +329,15 @@ void yon_network_init(main_window *widgets){
gtk_entry_set_text(GTK_ENTRY(widgets->NetworkDomainPasswordEntry),domain_password); gtk_entry_set_text(GTK_ENTRY(widgets->NetworkDomainPasswordEntry),domain_password);
} }
} }
{
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->NetworkNTPCombo));
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->NetworkNTPCombo),NULL,DEFAULT_LABEL);
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->NetworkNTPCombo),NULL,"DHCP");
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->NetworkNTPCombo),NULL,"NTP (ntp.org)");
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->NetworkNTPCombo),NULL,"NTP (vniiftri.ru)");
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->NetworkNTPCombo),NULL,MANUAL_LABEL);
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->NetworkNTPCombo),NULL,DO_NOT_CONFIGURE_LABEL);
}
if (!yon_char_is_empty(ntp)){ if (!yon_char_is_empty(ntp)){
gtk_switch_set_active(GTK_SWITCH(widgets->NetworkNTPServerSwitch),1); gtk_switch_set_active(GTK_SWITCH(widgets->NetworkNTPServerSwitch),1);
gtk_widget_set_sensitive(widgets->NetworkNTPEntry,0); gtk_widget_set_sensitive(widgets->NetworkNTPEntry,0);

@ -53,6 +53,7 @@ GtkTreeIter *yon_subcategory_check(GtkTreeStore *target, GtkTreeIter *parent_ite
} }
void yon_packages_tab_init(main_window *widgets){ void yon_packages_tab_init(main_window *widgets){
gtk_tree_store_clear(widgets->PackagesList);
int size; int size;
config_str packages = yon_resource_open_file(groups_list_path,&size); config_str packages = yon_resource_open_file(groups_list_path,&size);
for (int i=1;i<size;i++){ for (int i=1;i<size;i++){
@ -118,7 +119,7 @@ void yon_packages_tab_init(main_window *widgets){
void yon_on_packages_selected(GtkWidget *, main_window *widgets){ void yon_on_packages_selected(GtkWidget *, main_window *widgets){
GtkTreeIter iter; GtkTreeIter iter;
GtkTreeModel *model; GtkTreeModel *model;
gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->PackagesTree)),&model,&iter); if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->PackagesTree)),&model,&iter)) return;
GtkTreeIter cur_parent, cur_iter; GtkTreeIter cur_parent, cur_iter;
int status; int status;
gtk_tree_model_get(model,&iter,3,&status,-1); gtk_tree_model_get(model,&iter,3,&status,-1);

@ -8,10 +8,10 @@ enum YON_PAGES yon_page_get_next(main_window *widgets, enum YON_PAGES page){
case YON_PAGE_WELCOME: return YON_PAGE_LICENCE; break; case YON_PAGE_WELCOME: return YON_PAGE_LICENCE; break;
case YON_PAGE_LICENCE: return YON_PAGE_SECTIONS; break; case YON_PAGE_LICENCE: return YON_PAGE_SECTIONS; break;
case YON_PAGE_SECTIONS: return yon_sections_get_next_page(widgets); break; case YON_PAGE_SECTIONS: return yon_sections_get_next_page(widgets); break;
case YON_PAGE_OS_COMPONENTS: return YON_PAGE_INSTALLATION_BEGIN; break; case YON_PAGE_OS_COMPONENTS: return main_config.configure_mode?YON_PAGE_CONFIG_HUB:YON_PAGE_INSTALLATION_BEGIN; break;
case YON_PAGE_INSTALLATION_BEGIN: return YON_PAGE_CONFIG_HUB; break; case YON_PAGE_INSTALLATION_BEGIN: return YON_PAGE_CONFIG_HUB; break;
case YON_PAGE_SOFTWARE: return YON_PAGE_CONFIG_HUB; break; case YON_PAGE_SOFTWARE: return YON_PAGE_CONFIG_HUB; break;
case YON_PAGE_CONFIG_HUB: return YON_PAGE_INSTALLATION; break; case YON_PAGE_CONFIG_HUB: return main_config.configure_mode? YON_PAGE_CONFIGURE_END:YON_PAGE_INSTALLATION; break;
case YON_PAGE_KERNEL: return YON_PAGE_CONFIG_HUB; break; case YON_PAGE_KERNEL: return YON_PAGE_CONFIG_HUB; break;
case YON_PAGE_KERNEL_ADDON: return YON_PAGE_CONFIG_HUB; break; case YON_PAGE_KERNEL_ADDON: return YON_PAGE_CONFIG_HUB; break;
case YON_PAGE_PACMAN_SOFTWARE: return YON_PAGE_CONFIG_HUB; break; case YON_PAGE_PACMAN_SOFTWARE: return YON_PAGE_CONFIG_HUB; break;
@ -29,23 +29,24 @@ enum YON_PAGES yon_page_get_next(main_window *widgets, enum YON_PAGES page){
case YON_PAGE_INSTALL_SAME_PARTITION: return YON_PAGE_OS_COMPONENTS; break; case YON_PAGE_INSTALL_SAME_PARTITION: return YON_PAGE_OS_COMPONENTS; break;
case YON_PAGE_INSTALL_ADVANCED: return YON_PAGE_OS_COMPONENTS; break; case YON_PAGE_INSTALL_ADVANCED: return YON_PAGE_OS_COMPONENTS; break;
case YON_PAGE_INSTALL_RECOVERY: return yon_recovery_get_next(widgets); break; case YON_PAGE_INSTALL_RECOVERY: return yon_recovery_get_next(widgets); break;
case YON_PAGE_RECOVERY_GRUB_INSTALL: return main_config.configure_mode?YON_PAGE_INSTALLATION:YON_PAGE_RECOVERY_BEGIN; break; case YON_PAGE_RECOVERY_GRUB_INSTALL: return main_config.configure_mode?YON_PAGE_CONFIGURE_END:YON_PAGE_RECOVERY_BEGIN; break;
case YON_PAGE_RECOVERY_GRUB_UPDATE: return main_config.configure_mode?YON_PAGE_INSTALLATION:YON_PAGE_RECOVERY_BEGIN; break; case YON_PAGE_RECOVERY_GRUB_UPDATE: return main_config.configure_mode?YON_PAGE_CONFIGURE_END:YON_PAGE_RECOVERY_BEGIN; break;
case YON_PAGE_RECOVERY_OS_ONLY: return main_config.configure_mode?YON_PAGE_INSTALLATION:YON_PAGE_RECOVERY_BEGIN; break; case YON_PAGE_RECOVERY_OS_ONLY: return main_config.configure_mode?YON_PAGE_CONFIGURE_END:YON_PAGE_RECOVERY_BEGIN; break;
case YON_PAGE_RECOVERY_USRDATA_ONLY: return main_config.configure_mode?YON_PAGE_INSTALLATION:YON_PAGE_RECOVERY_BEGIN; break; case YON_PAGE_RECOVERY_USRDATA_ONLY: return main_config.configure_mode?YON_PAGE_CONFIGURE_END:YON_PAGE_RECOVERY_BEGIN; break;
case YON_PAGE_RECOVERY_BEGIN: main_config.save_configured = 1; return YON_PAGE_RECOVERY_PROCESS; break; case YON_PAGE_RECOVERY_BEGIN: main_config.save_configured = 1; return YON_PAGE_RECOVERY_PROCESS; break;
case YON_PAGE_RECOVERY_PROCESS: return YON_PAGE_RECOVERY_COMPLETION; break; case YON_PAGE_RECOVERY_PROCESS: return YON_PAGE_RECOVERY_COMPLETION; break;
case YON_PAGE_INSTALLATION: return YON_PAGE_COMPLETION; break; case YON_PAGE_INSTALLATION: return YON_PAGE_COMPLETION; break;
case YON_PAGE_CONFIGURE_SAVE: case YON_PAGE_CONFIGURE_SAVE:
break; break;
case YON_PAGE_CONFIGURE_END:
gtk_main_quit();
exit(0);
break;
case YON_PAGE_COMPLETED: case YON_PAGE_COMPLETED:
case YON_PAGE_INSTALL_ERROR: case YON_PAGE_INSTALL_ERROR:
case YON_PAGE_CONFIGURE_END:
case YON_PAGE_RECOVERY_COMPLETION: case YON_PAGE_RECOVERY_COMPLETION:
case YON_PAGE_COMPLETION: case YON_PAGE_COMPLETION:
on_reboot_accepted(widgets); on_reboot_accepted(widgets);
gtk_main_quit();
exit(0);
break; break;
// default:return YON_PAGE_WELCOME; // default:return YON_PAGE_WELCOME;
} }
@ -57,7 +58,38 @@ enum YON_PAGES yon_page_get_prev(enum YON_PAGES page){
case YON_PAGE_WELCOME: return YON_PAGE_WELCOME; break; case YON_PAGE_WELCOME: return YON_PAGE_WELCOME; break;
case YON_PAGE_LICENCE: return YON_PAGE_WELCOME; break; case YON_PAGE_LICENCE: return YON_PAGE_WELCOME; break;
case YON_PAGE_SECTIONS: return YON_PAGE_LICENCE; break; case YON_PAGE_SECTIONS: return YON_PAGE_LICENCE; break;
case YON_PAGE_OS_COMPONENTS: return YON_PAGE_SECTIONS; break; case YON_PAGE_OS_COMPONENTS: {
char *install_type = config(AUTOINSTALL_TYPE_INSTALL);
if (!strcmp(install_type,"fast")){
return YON_PAGE_INSTALL_COMMON; break;
} else if (!strcmp(install_type,"next")){
return YON_PAGE_INSTALL_SEPARATE; break;
} else if (!strcmp(install_type,"part")){
return YON_PAGE_INSTALL_SAME_PARTITION; break;
} else if (!strcmp(install_type,"custom")){
return YON_PAGE_INSTALL_ADVANCED; break;
} else if (!strcmp(install_type,"grub_install")){
return YON_PAGE_RECOVERY_GRUB_INSTALL; break;
} else if (!strcmp(install_type,"grub_update")){
return YON_PAGE_RECOVERY_GRUB_UPDATE; break;
} else if (!strcmp(install_type,"system_only")){
return YON_PAGE_RECOVERY_OS_ONLY; break;
} else if (!strcmp(install_type,"data_only")){
return YON_PAGE_RECOVERY_USRDATA_ONLY; break;
}
} break;
case YON_PAGE_RECOVERY_BEGIN:{
char *install_type = config(AUTOINSTALL_TYPE_INSTALL);
if (!strcmp(install_type,"grub_install")){
return YON_PAGE_RECOVERY_GRUB_INSTALL; break;
} else if (!strcmp(install_type,"grub_update")){
return YON_PAGE_RECOVERY_GRUB_UPDATE; break;
} else if (!strcmp(install_type,"system_only")){
return YON_PAGE_RECOVERY_OS_ONLY; break;
} else if (!strcmp(install_type,"data_only")){
return YON_PAGE_RECOVERY_USRDATA_ONLY; break;
}
} break;
case YON_PAGE_INSTALLATION_BEGIN: return YON_PAGE_OS_COMPONENTS; break; case YON_PAGE_INSTALLATION_BEGIN: return YON_PAGE_OS_COMPONENTS; break;
case YON_PAGE_SOFTWARE: return YON_PAGE_CONFIG_HUB; break; case YON_PAGE_SOFTWARE: return YON_PAGE_CONFIG_HUB; break;
case YON_PAGE_CONFIG_HUB: return YON_PAGE_CONFIG_HUB; break; case YON_PAGE_CONFIG_HUB: return YON_PAGE_CONFIG_HUB; break;
@ -106,11 +138,6 @@ void yon_navigation_buttons_set_sensetiveness(main_window *widgets){
gtk_widget_hide(widgets->BackButton); gtk_widget_hide(widgets->BackButton);
gtk_widget_hide(widgets->SourceButton); gtk_widget_hide(widgets->SourceButton);
gtk_widget_show(widgets->NextButton); gtk_widget_show(widgets->NextButton);
if (!yon_char_is_empty(config(AUTOINSTALL_TYPE_INSTALL))){
gtk_widget_show(widgets->StartScenarioButton);
} else {
gtk_widget_hide(widgets->StartScenarioButton);
}
break; break;
case YON_PAGE_LICENCE: case YON_PAGE_LICENCE:
gtk_widget_show(widgets->BackButton); gtk_widget_show(widgets->BackButton);
@ -143,15 +170,22 @@ void yon_navigation_buttons_set_sensetiveness(main_window *widgets){
case YON_PAGE_CONFIGURE_SAVE: case YON_PAGE_CONFIGURE_SAVE:
case YON_PAGE_COMPLETION: case YON_PAGE_COMPLETION:
gtk_button_set_label(GTK_BUTTON(widgets->NextButton),RESTART_LABEL); gtk_button_set_label(GTK_BUTTON(widgets->NextButton),RESTART_LABEL);
gtk_widget_set_sensitive(widgets->BackButton,0); gtk_widget_hide(widgets->BackButton);
gtk_widget_set_sensitive(widgets->CancelInstallButton,0); gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
gtk_button_set_label(GTK_BUTTON(widgets->CancelInstallButton),EXIT_LABEL);
gtk_widget_set_sensitive(widgets->NextButton,1); gtk_widget_set_sensitive(widgets->NextButton,1);
break; break;
case YON_PAGE_SECTIONS: case YON_PAGE_SECTIONS:
gtk_widget_show(widgets->SourceButton); gtk_widget_show(widgets->SourceButton);
gtk_widget_show(widgets->BackButton);
gtk_widget_set_sensitive(widgets->BackButton,1); gtk_widget_set_sensitive(widgets->BackButton,1);
gtk_widget_set_sensitive(widgets->NextButton,1); gtk_widget_set_sensitive(widgets->NextButton,1);
gtk_widget_set_sensitive(widgets->CancelInstallButton,1); gtk_widget_set_sensitive(widgets->CancelInstallButton,1);
if (!yon_char_is_empty(config(AUTOINSTALL_TYPE_INSTALL))&&!main_config.configure_mode){
gtk_widget_show(widgets->StartScenarioButton);
} else {
gtk_widget_hide(widgets->StartScenarioButton);
}
break; break;
default: default:
gtk_widget_set_sensitive(widgets->BackButton,1); gtk_widget_set_sensitive(widgets->BackButton,1);
@ -385,6 +419,9 @@ enum YON_PAGES yon_recovery_get_next(main_window *widgets){
void yon_page_init(main_window *widgets, enum YON_PAGES page){ void yon_page_init(main_window *widgets, enum YON_PAGES page){
switch(page){ switch(page){
case YON_PAGE_WELCOME:
yon_set_locales_list(widgets);
break;
case YON_PAGE_CONFIG_HUB: case YON_PAGE_CONFIG_HUB:
yon_configuration_hub_init(widgets); yon_configuration_hub_init(widgets);
break; break;
@ -477,26 +514,46 @@ void on_page_prev_clicked(GtkWidget *, main_window *widgets){
yon_page_update(widgets); yon_page_update(widgets);
} }
void on_page_cancel_clicked(GtkWidget *, main_window *widgets){ #include <signal.h>
void on_page_cancel_clicked(GtkWidget *, main_window *widgets){
enum YON_PAGES cur_page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook));
switch (cur_page){
case YON_PAGE_CONFIGURE_END:
case YON_PAGE_COMPLETED:
case YON_PAGE_RECOVERY_COMPLETION:
case YON_PAGE_INSTALL_ERROR:
case YON_PAGE_CONFIGURE_SAVE:
case YON_PAGE_COMPLETION:
gtk_main_quit();
break;
default: {
if (main_config.install_thread){ if (main_config.install_thread){
dialog_confirmation_data *data = yon_confirmation_dialog_data_new(); dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
data->action_text=INTERRUPT_TEXT_LABEL; data->action_text=INTERRUPT_TEXT_LABEL;
data->title=WARNING_TITLE_LABEL; data->title=WARNING_TITLE_LABEL;
if (yon_confirmation_dialog_call(widgets->MainWindow,data)==GTK_RESPONSE_ACCEPT ){ if (yon_confirmation_dialog_call(widgets->MainWindow,data)==GTK_RESPONSE_ACCEPT ){
pthread_cancel((pthread_t)main_config.install_thread); pthread_cancel(main_config.install_thread);
} kill(main_config.install_thread,SIGKILL);
} g_signal_handlers_disconnect_by_func(G_OBJECT(widgets->install_info_monitor),yon_installation_progress_update,widgets);
// gtk_widget_hide(widgets->BackButton); g_file_monitor_cancel(widgets->install_info_monitor);
// gtk_widget_hide(widgets->SourceButton); widgets->install_info_monitor = NULL;
// gtk_widget_show(widgets->NextButton); gtk_button_set_label(GTK_BUTTON(widgets->NextButton),NEXT_LABEL);
// gtk_widget_show(widgets->StartScenarioButton); GtkWidget *image = gtk_button_get_image(GTK_BUTTON(widgets->NextButton));
// gtk_widget_set_sensitive(widgets->CancelInstallButton,0); gtk_image_set_from_icon_name(GTK_IMAGE(image),arrow_right_icon_path,GTK_ICON_SIZE_BUTTON);
// gtk_widget_set_sensitive(widgets->BackButton,1); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->LicenseAgreeRadio))){
// gtk_widget_set_sensitive(widgets->NextButton,1); gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_SECTIONS);
// gtk_widget_set_sensitive(widgets->ConfigurationModeMenuItem,1); } else {
// gtk_widget_show(widgets->NextButton); gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_WELCOME);
// gtk_widget_show(widgets->BackButton); }
yon_page_update(widgets);
main_config.save_done=0;
main_config.install_complete=0;
main_config.save_configured=0;
main_config.install_complete=0;
main_config.install_thread=0;
}
} else {
gtk_button_set_label(GTK_BUTTON(widgets->NextButton),NEXT_LABEL); gtk_button_set_label(GTK_BUTTON(widgets->NextButton),NEXT_LABEL);
GtkWidget *image = gtk_button_get_image(GTK_BUTTON(widgets->NextButton)); GtkWidget *image = gtk_button_get_image(GTK_BUTTON(widgets->NextButton));
gtk_image_set_from_icon_name(GTK_IMAGE(image),arrow_right_icon_path,GTK_ICON_SIZE_BUTTON); gtk_image_set_from_icon_name(GTK_IMAGE(image),arrow_right_icon_path,GTK_ICON_SIZE_BUTTON);
@ -508,8 +565,13 @@ void on_page_cancel_clicked(GtkWidget *, main_window *widgets){
yon_page_update(widgets); yon_page_update(widgets);
main_config.save_done=0; main_config.save_done=0;
main_config.install_complete=0; main_config.install_complete=0;
main_config.save_configured=0;
main_config.install_complete=0;
main_config.install_thread=0; main_config.install_thread=0;
} }
}
}
}
void on_additional_page_clicked(GtkWidget *, main_window *widgets){ void on_additional_page_clicked(GtkWidget *, main_window *widgets){
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_SOFTWARE); gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_SOFTWARE);

@ -1,4 +1,9 @@
#include "ubinstall-gtk.h" #include "ubinstall-gtk.h"
// #define TIMEZONEMAP_INCLUDE
#ifdef TIMEZONEMAP_INCLUDE
#include "timezonemap/cc-timezone-map.h"
#include "timezonemap/tz.h"
#endif
int yon_region_save(main_window *widgets){ int yon_region_save(main_window *widgets){
if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->RegionCombo))==-1){ if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->RegionCombo))==-1){
@ -20,36 +25,211 @@ int yon_region_save(main_window *widgets){
void on_region_changed(GtkComboBox *self, main_window *widgets){ void on_region_changed(GtkComboBox *self, main_window *widgets){
char *active = (char*)gtk_combo_box_get_active_id(self); char *active = (char*)gtk_combo_box_get_active_id(self);
active = yon_char_append("/usr/share/zoneinfo/",active); size_t size;
int size;
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->ZoneCombo)); gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->ZoneCombo));
if (yon_file_is_directory(active)){ config_str parsed = yon_timezone_get_zones_from_region(active,&size);
config_str parsed = yon_file_ls(active,&size); for (size_t i=0;i<size;i++){
for (int i=0;i<size;i++){
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->ZoneCombo),parsed[i],_(parsed[i])); gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->ZoneCombo),parsed[i],_(parsed[i]));
} }
if (size) yon_char_parsed_free(parsed,size); if (size) yon_char_parsed_free(parsed,size);
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ZoneCombo),0); gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ZoneCombo),0);
} }
free(active);
#ifdef TIMEZONEMAP_INCLUDE
gboolean on_time_zone_status_hover(GtkWidget *, GdkEvent *, main_window *widgets){
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->TimeZoneMapOverlayBox),"timezoneoverlay_hover");
return 0;
}
gboolean on_time_zone_status_hover_end(GtkWidget *, GdkEvent *, main_window *widgets){
gtk_style_context_remove_class(gtk_widget_get_style_context(widgets->TimeZoneMapOverlayBox),"timezoneoverlay_hover");
return 0;
}
gboolean on_map_box_ckicked_skip(){
return 0;
}
void on_map_selection_changed(GtkWidget *,CcTimezoneLocation *location,main_window *);
void yon_map_status_hide(main_window *widgets){
gtk_widget_hide(widgets->TimeZoneMapOverlayBox);
}
GMutex map_source_mutex;
guint map_status_source = -1;
gboolean yon_map_status_hide_timeout(main_window *widgets){
g_mutex_lock(&map_source_mutex);
map_status_source=-1;
g_mutex_unlock(&map_source_mutex);
g_idle_add_once((GSourceOnceFunc)yon_map_status_hide,widgets);
return G_SOURCE_REMOVE;
}
void yon_map_status_show(main_window *widgets, char *icon_name, char *title, char *title_info){
g_mutex_lock(&map_source_mutex);
if (map_status_source!=(guint)-1){
g_source_remove(map_status_source);
map_status_source=(guint)-1;
}
g_mutex_unlock(&map_source_mutex);
gtk_widget_show(widgets->TimeZoneMapOverlayBox);
gtk_label_set_text(GTK_LABEL(widgets->TimeZoneMapOverlayTitleLabel),title);
gtk_label_set_text(GTK_LABEL(widgets->TimeZoneMapOverlayInfoLabel),title_info);
if (!yon_char_is_empty(icon_name)){
gtk_widget_show(widgets->TimeZoneMapOverlayImage);
GtkIconInfo *info = gtk_icon_theme_lookup_icon_for_scale(gtk_icon_theme_get_default(), icon_path, 48,1,GTK_ICON_LOOKUP_FORCE_SIZE);
gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->TimeZoneMapOverlayImage),gtk_icon_info_load_icon(info,NULL));
} else {
gtk_widget_hide(widgets->TimeZoneMapOverlayImage);
}
g_mutex_lock(&map_source_mutex);
map_status_source = g_timeout_add_seconds(3,(GSourceFunc)yon_map_status_hide_timeout,widgets);
g_mutex_unlock(&map_source_mutex);
}
void on_zone_changed(GtkWidget *, main_window *widgets){
// g_signal_handlers_block_by_func(G_OBJECT(widgets->RegionMapTarget),G_CALLBACK(on_map_selection_changed),widgets);
const char *region = gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->RegionCombo));
const char *zone = gtk_combo_box_get_active_id(GTK_COMBO_BOX(widgets->ZoneCombo));
if (!yon_char_is_empty(region)&&!yon_char_is_empty(zone)){
char *timezone = yon_char_unite(region,"/",zone,NULL);
yon_map_update(widgets,timezone);
free(timezone);
}
// g_signal_handlers_unblock_by_func(G_OBJECT(widgets->RegionMapTarget),G_CALLBACK(on_map_selection_changed),widgets);
}
void on_map_selection_changed(GtkWidget *,CcTimezoneLocation *location,main_window *widgets){
if (!location) return;
g_signal_handlers_block_by_func(G_OBJECT(widgets->ZoneCombo),G_CALLBACK(on_zone_changed),widgets);
g_signal_handlers_block_by_func(G_OBJECT(widgets->RegionEntry),G_CALLBACK(on_region_entry_changed),widgets);
char *zone = yon_char_new(cc_timezone_location_get_zone(location));
char *timezone = yon_char_divide_search(zone,"/",-1);
gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->RegionCombo),timezone);
while(gtk_events_pending()) gtk_main_iteration();
gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->ZoneCombo),zone);
if (!yon_char_is_empty(timezone)) free(timezone);
timezone = (char*)cc_timezone_location_get_zone(location);
GtkTreeIter iter;
for_iter(widgets->RegionTimezoneCompletionList,&iter){
char *render, *tz;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->RegionTimezoneCompletionList),&iter,0,&render,1,&tz,-1);
if (!strcmp(timezone,tz)){
gtk_entry_set_text(GTK_ENTRY(widgets->RegionEntry),render);
char *utc = yon_timezone_get_utc(tz);
yon_map_status_show(widgets,NULL,MAP_TITLE_LABEL(utc),render);
}
}
g_signal_handlers_unblock_by_func(G_OBJECT(widgets->ZoneCombo),G_CALLBACK(on_zone_changed),widgets);
g_signal_handlers_unblock_by_func(G_OBJECT(widgets->RegionEntry),G_CALLBACK(on_region_entry_changed),widgets);
}
#endif
void yon_map_update(main_window *widgets, const char *timezone){
#ifdef TIMEZONEMAP_INCLUDE
g_signal_handlers_block_by_func(G_OBJECT(widgets->RegionMapTarget),G_CALLBACK(on_map_selection_changed),widgets);
g_signal_handlers_block_by_func(G_OBJECT(widgets->ZoneCombo),G_CALLBACK(on_zone_changed),widgets);
#endif
g_signal_handlers_block_by_func(G_OBJECT(widgets->RegionEntry),G_CALLBACK(on_region_entry_changed),widgets);
textdomain(timezone_locale_name);
char *region = yon_timezone_get_zone(timezone);
char *country = yon_timezone_get_country(timezone);
char *city = yon_timezone_get_city(timezone);
char *zone_name = yon_char_unite(_(city),", ", _(country),NULL);
textdomain(LocaleName);
gtk_entry_set_text(GTK_ENTRY(widgets->RegionEntry),zone_name);
gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->RegionCombo),region);
gtk_combo_box_set_active_id(GTK_COMBO_BOX(widgets->ZoneCombo),city);
#ifdef TIMEZONEMAP_INCLUDE
cc_timezone_map_set_timezone(CC_TIMEZONE_MAP(widgets->RegionMapTarget),timezone);
#endif
g_signal_handlers_unblock_by_func(G_OBJECT(widgets->RegionEntry),G_CALLBACK(on_region_entry_changed),widgets);
#ifdef TIMEZONEMAP_INCLUDE
g_signal_handlers_unblock_by_func(G_OBJECT(widgets->ZoneCombo),G_CALLBACK(on_zone_changed),widgets);
g_signal_handlers_unblock_by_func(G_OBJECT(widgets->RegionMapTarget),G_CALLBACK(on_map_selection_changed),widgets);
#endif
textdomain(LocaleName);
}
void on_region_entry_changed(GtkWidget *, main_window *widgets){
GtkTreeIter iter;
int found = 0;
for_iter(widgets->RegionTimezoneCompletionList, &iter){
char *target, *timezone;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->RegionTimezoneCompletionList),&iter,0,&target,1,&timezone,-1);
char *target_entry = (char*)gtk_entry_get_text(GTK_ENTRY(widgets->RegionEntry));
if (!strcmp(target,target_entry)){
g_object_set_data(G_OBJECT(widgets->RegionEntry),zone_parameter,yon_char_new(timezone));
yon_map_update(widgets,timezone);
found = 1;
}
}
if (!found){
g_object_set_data(G_OBJECT(widgets->RegionEntry),zone_parameter,NULL);
}
} }
void yon_region_init(main_window *widgets){ void yon_region_init(main_window *widgets){
int size; yon_timezone_init();
config_str parsed = NULL; gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->RegionCombo));
parsed = yon_dir_get_contents(zone_path,&size); gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->KeyboardNumLockCombo));
for (int i=0;i<size;i++){ #ifdef TIMEZONEMAP_INCLUDE // insert timezonemap's interactive map
if (!strstr(parsed[i],".")&&strcmp(parsed[i],"posix")&&strcmp(parsed[i],"right")){ GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->RegionMapBox));
char *path = yon_char_append(zone_path,parsed[i]); if (list){
if (yon_file_is_directory(path)){ GList *iter;
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->RegionCombo),parsed[i],_(parsed[i])); for (iter = list; iter; iter=iter->next){
gtk_widget_destroy(iter->data);
} }
free(path); g_list_free(list);
} }
widgets->RegionMapTarget = GTK_WIDGET(cc_timezone_map_new());
gtk_box_pack_start(GTK_BOX(widgets->RegionMapBox),GTK_WIDGET(widgets->RegionMapTarget),1,1,0);
g_signal_connect(G_OBJECT(widgets->RegionMapTarget),"location-changed",G_CALLBACK(on_map_selection_changed),widgets);
gtk_widget_show(GTK_WIDGET(widgets->RegionMapTarget));
char *config_param = config(zone_parameter);
if (!yon_char_is_empty(config_param)){
cc_timezone_map_set_timezone(CC_TIMEZONE_MAP(widgets->RegionMapTarget),config_param);
} }
#else // if timezonemap does not installed, static image inserts
#endif
size_t size;
GtkTreeIter iter;
config_str parsed = yon_timezone_get_all(&size);
bind_textdomain_codeset(timezone_locale_name,"UTF-8");
textdomain(timezone_locale_name);
GHashTable *timezones_list = g_hash_table_new(g_str_hash,g_str_equal);
for (size_t i=0;i<size;i++){
char *zone_country = yon_timezone_get_country(parsed[i]);
char *zone_city = yon_timezone_get_city(parsed[i]);
char *zone = yon_timezone_get_zone(parsed[i]);
char *zone_name = yon_char_unite(_(zone_city),", ", _(zone_country),NULL);
gtk_list_store_append(widgets->RegionTimezoneCompletionList,&iter);
gtk_list_store_set(widgets->RegionTimezoneCompletionList,&iter,0,zone_name,1,parsed[i],-1);
g_hash_table_add(timezones_list,zone);
}
yon_char_parsed_free(parsed,size);
size_t zones_size;
parsed = (config_str)g_hash_table_get_keys_as_array(timezones_list,(guint*)&zones_size);
qsort(parsed,zones_size,sizeof(char*),(__compar_fn_t)yon_char_parsed_compare);
for (size_t i=0;i<zones_size;i++){
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->RegionCombo),parsed[i],_(parsed[i]));
}
yon_char_parsed_free(parsed,zones_size);
textdomain(LocaleName);
while(gtk_events_pending()) gtk_main_iteration(); while(gtk_events_pending()) gtk_main_iteration();
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->RegionCombo),0); gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->RegionCombo),0);
yon_char_parsed_free(parsed,size);
char *zone = yon_char_new(config(zone_parameter)); char *zone = yon_char_new(config(zone_parameter));
if (!yon_char_is_empty(zone)){ if (!yon_char_is_empty(zone)){

@ -38,8 +38,9 @@ void on_config_local_load(GtkWidget *,main_window *widgets){
if (!yon_char_is_empty(main_config.config_load_path)) free(main_config.config_load_path); if (!yon_char_is_empty(main_config.config_load_path)) free(main_config.config_load_path);
main_config.config_load_path = yon_char_new("system"); main_config.config_load_path = yon_char_new("system");
yon_load_proceed(YON_CONFIG_LOCAL); yon_load_proceed(YON_CONFIG_LOCAL);
// yon_page_init(widgets,gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook)));
main_config.load_mode=YON_CONFIG_LOCAL; main_config.load_mode=YON_CONFIG_LOCAL;
yon_main_window_update_locale(widgets);
yon_page_init(widgets,gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook)));
} }
void on_config_global_load(GtkWidget *,main_window *widgets){ void on_config_global_load(GtkWidget *,main_window *widgets){
@ -50,14 +51,16 @@ void on_config_global_load(GtkWidget *,main_window *widgets){
if (!yon_char_is_empty(main_config.config_load_path)) free(main_config.config_load_path); if (!yon_char_is_empty(main_config.config_load_path)) free(main_config.config_load_path);
main_config.config_load_path = yon_char_new("global"); main_config.config_load_path = yon_char_new("global");
yon_load_proceed(YON_CONFIG_GLOBAL); yon_load_proceed(YON_CONFIG_GLOBAL);
// yon_page_init(widgets,gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook)));
main_config.load_mode=YON_CONFIG_GLOBAL; main_config.load_mode=YON_CONFIG_GLOBAL;
yon_main_window_update_locale(widgets);
yon_page_init(widgets,gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook)));
} }
void on_config_custom_load(GtkWidget *,main_window *){ void on_config_custom_load(GtkWidget *,main_window *){
yon_load_proceed(YON_CONFIG_CUSTOM); yon_load_proceed(YON_CONFIG_CUSTOM);
// yon_page_init(widgets,gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook))); // yon_page_init(widgets,gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook)));
main_config.load_mode=YON_CONFIG_CUSTOM; main_config.load_mode=YON_CONFIG_CUSTOM;
// yon_main_window_update_locale(widgets);
} }
void on_config_custom_load_last(GtkWidget *,main_window *){ void on_config_custom_load_last(GtkWidget *,main_window *){
@ -68,6 +71,7 @@ void on_config_custom_load_last(GtkWidget *,main_window *){
yon_config_load_config(YON_CONFIG_CUSTOM,command,NULL); yon_config_load_config(YON_CONFIG_CUSTOM,command,NULL);
// yon_page_init(widgets,gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook))); // yon_page_init(widgets,gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook)));
main_config.load_mode=YON_CONFIG_CUSTOM; main_config.load_mode=YON_CONFIG_CUSTOM;
// yon_main_window_update_locale(widgets);
} }
void on_config_global_local_save(GtkWidget *,main_window *widgets){ void on_config_global_local_save(GtkWidget *,main_window *widgets){
@ -176,14 +180,7 @@ void *on_config_save(void *data){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),ERROR_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),ERROR_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return 0; return 0;
} }
FILE *file = fopen(progress_path,"w"); g_idle_add((GSourceFunc)yon_progress_bar_start,widgets);
if (file){
fclose(file);
}
GFile *file_desc = g_file_new_for_path(progress_path);
widgets->install_info_monitor = g_file_monitor_file(file_desc,G_FILE_MONITOR_NONE,NULL,NULL);
g_signal_connect(G_OBJECT(widgets->install_info_monitor),"changed",G_CALLBACK(yon_installation_progress_update),widgets);
g_object_unref(file_desc);
if (!main_config.dry_run){ if (!main_config.dry_run){
char *command = yon_debug_output("%s\n",save_config_command(yon_char_parsed_to_string(parameters,size," "))); char *command = yon_debug_output("%s\n",save_config_command(yon_char_parsed_to_string(parameters,size," ")));
yon_char_parsed_free(parameters,size); yon_char_parsed_free(parameters,size);
@ -244,7 +241,7 @@ void *on_setup_system_configuration(void * data){
if (user_size){ if (user_size){
int final_size; int final_size;
config_str final = yon_char_parsed_merge(all_parameters,size,users,user_size,&final_size); config_str final = yon_char_parsed_merge(all_parameters,size,users,user_size,&final_size);
yon_char_parsed_free(users,user_size); // yon_char_parsed_free(users,user_size);
if (size) yon_char_parsed_free(all_parameters,size); if (size) yon_char_parsed_free(all_parameters,size);
all_parameters = final; all_parameters = final;
size = final_size; size = final_size;
@ -253,7 +250,7 @@ void *on_setup_system_configuration(void * data){
if (users){ if (users){
int final_size; int final_size;
config_str final = yon_char_parsed_merge(all_parameters,size,users,user_size,&final_size); config_str final = yon_char_parsed_merge(all_parameters,size,users,user_size,&final_size);
yon_char_parsed_free(users,user_size); // yon_char_parsed_free(users,user_size);
if (size) yon_char_parsed_free(all_parameters,size); if (size) yon_char_parsed_free(all_parameters,size);
all_parameters = final; all_parameters = final;
size = final_size; size = final_size;
@ -263,7 +260,7 @@ void *on_setup_system_configuration(void * data){
if (network_size){ if (network_size){
int final_size; int final_size;
config_str final = yon_char_parsed_merge(all_parameters,size,networks,network_size,&final_size); config_str final = yon_char_parsed_merge(all_parameters,size,networks,network_size,&final_size);
yon_char_parsed_free(networks,network_size); // yon_char_parsed_free(networks,network_size);
if (size) yon_char_parsed_free(all_parameters,size); if (size) yon_char_parsed_free(all_parameters,size);
all_parameters = final; all_parameters = final;
size = final_size; size = final_size;
@ -295,6 +292,9 @@ void *on_setup_system_configuration(void * data){
if (!main_config.dry_run){ if (!main_config.dry_run){
char *parameter_string = yon_char_parsed_to_string(all_parameters,size," "); char *parameter_string = yon_char_parsed_to_string(all_parameters,size," ");
char *command = set_user_config_command(parameter_string); char *command = set_user_config_command(parameter_string);
// if (main_config.debug_mode){
// yon_launch(ubinstall_dry_run_command);
// }
if (system(yon_debug_output("%s\n",command))){}; if (system(yon_debug_output("%s\n",command))){};
yon_char_parsed_free(all_parameters,size); yon_char_parsed_free(all_parameters,size);
free(command); free(command);
@ -432,19 +432,20 @@ int yon_config_save(main_window *widgets){
return 1; return 1;
} }
void yon_config_restore(main_window *widgets){ void yon_config_restore(main_window *){
switch(main_config.load_mode){ yon_load_proceed(main_config.load_mode);
case YON_CONFIG_GLOBAL: // switch(main_config.load_mode){
on_config_global_load(NULL,widgets); // case YON_CONFIG_GLOBAL:
break; // on_config_global_load(NULL,widgets);
case YON_CONFIG_LOCAL: // break;
on_config_local_load(NULL,widgets); // case YON_CONFIG_LOCAL:
break; // on_config_local_load(NULL,widgets);
case YON_CONFIG_CUSTOM: // break;
on_config_custom_load_last(NULL,widgets); // case YON_CONFIG_CUSTOM:
// on_config_custom_load_last(NULL,widgets);
}
on_config_global_load(NULL,widgets); // }
// on_config_global_load(NULL,widgets);
yon_launch("ubconfig --source system remove [autoinstall]"); yon_launch("ubconfig --source system remove [autoinstall]");
yon_config_save_simple(YON_CONFIG_LOCAL,"system"); // yon_config_save_simple(YON_CONFIG_LOCAL,"system");
} }

@ -1,17 +1,43 @@
#include "ubinstall-gtk.h" #include "ubinstall-gtk.h"
void on_source_changed(GtkComboBox *self){ void on_source_changed(GtkComboBox *self){
GtkWidget *devices_combo = g_object_get_data(G_OBJECT(self),"target"); source_element *element = g_object_get_data(G_OBJECT(self),"source_element");
GtkWidget *path_button = g_object_get_data(G_OBJECT(self),"button");
GtkWidget *path_combo = g_object_get_data(G_OBJECT(self),"combo");
if (gtk_combo_box_get_active(self)){ if (gtk_combo_box_get_active(self)){
gtk_widget_show(path_button); gtk_widget_show(element->PathButton);
gtk_widget_show(path_combo); gtk_widget_show(element->PathEntry);
gtk_widget_hide(devices_combo); gtk_widget_hide(element->DeviceCombo);
} else{ } else{
gtk_widget_hide(path_button); gtk_widget_hide(element->PathButton);
gtk_widget_hide(path_combo); gtk_widget_hide(element->PathEntry);
gtk_widget_show(devices_combo); gtk_widget_show(element->DeviceCombo);
}
}
void yon_source_update(source_window *window){
GList *list = gtk_container_get_children(GTK_CONTAINER(window->AddBox));
GList *iter;
for (iter = list; iter; iter = iter->next){
source_element *element = (source_element*)g_object_get_data(G_OBJECT(iter->data),"source_element");
if (!iter->next&&!element->AddButton){
GtkWidget *button = gtk_button_new_from_icon_name(add_icon_path,GTK_ICON_SIZE_BUTTON);
g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(on_source_add),window);
gtk_box_pack_end(GTK_BOX(element->MainBox),button,0,0,0);
element->AddButton = button;
gtk_style_context_add_class(gtk_widget_get_style_context(button),"thin");
gtk_style_context_add_class(gtk_widget_get_style_context(button),"instant");
gtk_widget_show(button);
} else if (iter->next){
if (element->AddButton) {
gtk_widget_destroy(element->AddButton);
element->AddButton = NULL;
}
}
if (!iter->next&&!iter->prev){
gtk_widget_hide(element->RemoveButton);
} else {
gtk_widget_show(element->RemoveButton);
}
} }
} }
@ -25,22 +51,21 @@ source_element *yon_source_element_new(){
element->DeviceCombo = yon_gtk_builder_get_widget(builder,"DeviceCombo"); element->DeviceCombo = yon_gtk_builder_get_widget(builder,"DeviceCombo");
element->PathButton = yon_gtk_builder_get_widget(builder,"PathButton"); element->PathButton = yon_gtk_builder_get_widget(builder,"PathButton");
element->RemoveButton = yon_gtk_builder_get_widget(builder,"RemoveButton"); element->RemoveButton = yon_gtk_builder_get_widget(builder,"RemoveButton");
element->AddButton = NULL;
yon_gtk_combo_box_block_scroll(GTK_COMBO_BOX(element->DeviceCombo)); yon_gtk_combo_box_block_scroll(GTK_COMBO_BOX(element->DeviceCombo));
yon_gtk_combo_box_block_scroll(GTK_COMBO_BOX(element->TypeCombo)); yon_gtk_combo_box_block_scroll(GTK_COMBO_BOX(element->TypeCombo));
g_signal_connect(G_OBJECT(element->RemoveButton),"clicked",G_CALLBACK(on_source_remove),element); g_signal_connect(G_OBJECT(element->RemoveButton),"clicked",G_CALLBACK(on_source_remove),element);
g_signal_connect(G_OBJECT(element->PathButton),"clicked",G_CALLBACK(on_source_choose),element); g_signal_connect(G_OBJECT(element->PathButton),"clicked",G_CALLBACK(on_source_choose),element);
g_signal_connect(G_OBJECT(element->TypeCombo),"changed",G_CALLBACK(on_source_changed),element); g_signal_connect(G_OBJECT(element->TypeCombo),"changed",G_CALLBACK(on_source_changed),element);
g_object_set_data(G_OBJECT(element->PathButton),"combo",element->TypeCombo);
g_object_set_data(G_OBJECT(element->PathButton),"source_element",element);
g_object_set_data(G_OBJECT(element->MainBox),"source_element",element); g_object_set_data(G_OBJECT(element->MainBox),"source_element",element);
g_object_set_data(G_OBJECT(element->PathButton),"target_combo",element->TypeCombo); g_object_set_data(G_OBJECT(element->TypeCombo),"source_element",element);
g_object_set_data(G_OBJECT(element->TypeCombo),"target",element->DeviceCombo);
g_object_set_data(G_OBJECT(element->TypeCombo),"button",element->PathButton);
g_object_set_data(G_OBJECT(element->TypeCombo),"combo",element->PathEntry);
gtk_widget_set_sensitive(element->DeviceCombo,0);
gtk_widget_set_sensitive(element->TypeCombo,0);
gtk_widget_set_sensitive(element->PathEntry,0);
gtk_widget_set_sensitive(element->PathButton,0);
gtk_widget_hide(element->PathButton); gtk_widget_hide(element->PathButton);
int size; int size;
config_str parts = yon_config_load(get_parts_and_devices_command, &size); config_str parts = yon_config_load(get_parts_and_devices_command, &size);
for (int i=0;i<size;i++){ for (int i=0;i<size;i++){
@ -59,6 +84,11 @@ source_element *yon_source_element_new(){
void yon_source_element_add(char *key,void*,source_window *window){ void yon_source_element_add(char *key,void*,source_window *window){
source_element *element = yon_source_element_new(); source_element *element = yon_source_element_new();
gtk_box_pack_start(GTK_BOX(window->AddBox),element->MainBox,0,0,0);
g_object_set_data(G_OBJECT(element->MainBox),"window",window);
if (yon_char_is_empty(key)) return;
if (yon_char_check_begins_with(key,"/dev/")){ if (yon_char_check_begins_with(key,"/dev/")){
gtk_combo_box_set_active_id(GTK_COMBO_BOX(element->DeviceCombo),key); gtk_combo_box_set_active_id(GTK_COMBO_BOX(element->DeviceCombo),key);
gtk_combo_box_set_active(GTK_COMBO_BOX(element->TypeCombo),0); gtk_combo_box_set_active(GTK_COMBO_BOX(element->TypeCombo),0);
@ -69,61 +99,27 @@ void yon_source_element_add(char *key,void*,source_window *window){
gtk_entry_set_text(GTK_ENTRY(element->PathEntry),key); gtk_entry_set_text(GTK_ENTRY(element->PathEntry),key);
gtk_combo_box_set_active(GTK_COMBO_BOX(element->TypeCombo),1); gtk_combo_box_set_active(GTK_COMBO_BOX(element->TypeCombo),1);
} }
gtk_box_pack_start(GTK_BOX(window->AddBox),element->MainBox,0,0,0);
g_object_set_data(G_OBJECT(element->MainBox),"window",window);
g_object_set_data(G_OBJECT(element->PathButton),"target",window->PathEntry);
}
void yon_source_update(source_window *window){
GList *list = gtk_container_get_children(GTK_CONTAINER(window->AddBox));
GList *iter;
for (iter=list;iter;iter=iter->next){
gtk_widget_destroy(GTK_WIDGET(iter->data));
}
dictionary *dict;
if (!window->sources) return;
for_dictionaries(dict,window->sources){
yon_source_element_add(dict->key,NULL,window);
}
} }
void on_source_add(GtkWidget *,source_window *window){ void on_source_add(GtkWidget *,source_window *window){
const char *path = gtk_widget_get_visible(window->PathEntry)?gtk_entry_get_text(GTK_ENTRY(window->PathEntry)):gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->DeviceCombo)); yon_source_element_add(NULL,NULL,window);
if (yon_char_is_empty(path)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(gtk_widget_get_visible(window->PathEntry)?window->PathEntry:window->DeviceCombo);
return;
}
if (!yon_dictionary_get(&window->sources,(char*)path)){
yon_dictionary_add_or_create_if_exists_with_data(window->sources,yon_char_new(path),NULL);
gtk_entry_set_text(GTK_ENTRY(window->PathEntry),"");
gtk_combo_box_set_active(GTK_COMBO_BOX(window->DeviceCombo),0);
yon_source_update(window); yon_source_update(window);
} else {
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),VALUE_REPEAT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
}
} }
void on_source_remove(GtkWidget *,source_element *element){ void on_source_remove(GtkWidget *,source_element *element){
source_window *window = g_object_get_data(G_OBJECT(element->MainBox),"window"); source_window *window = g_object_get_data(G_OBJECT(element->MainBox),"window");
const char *path = gtk_widget_get_visible(element->PathEntry)?gtk_entry_get_text(GTK_ENTRY(element->PathEntry)):gtk_combo_box_get_active_id(GTK_COMBO_BOX(element->DeviceCombo)); gtk_widget_destroy(element->MainBox);
dictionary *dict = yon_dictionary_get(&window->sources,(char*)path);
if (dict){
window->sources = yon_dictionary_rip(dict);
yon_source_update(window); yon_source_update(window);
} }
}
void on_source_choose(GtkWidget *self){ void on_source_choose(GtkWidget *self){
GtkWidget *target_entry = g_object_get_data(G_OBJECT(self),"target"); source_element *element = g_object_get_data(G_OBJECT(self),"source_element");
GtkWidget *target_mode = g_object_get_data(G_OBJECT(self),"combo"); switch (gtk_combo_box_get_active(GTK_COMBO_BOX(element->TypeCombo))){
switch (gtk_combo_box_get_active(GTK_COMBO_BOX(target_mode))){
case 1:{ case 1:{
filechooser_window *dialog = yon_file_chooser_window_new(GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); filechooser_window *dialog = yon_file_chooser_window_new(GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
yon_gtk_window_setup(GTK_WINDOW(dialog->Window),GTK_WINDOW(dialog->Window),OPEN_LABEL,icon_path,"filechooser_window"); yon_gtk_window_setup(GTK_WINDOW(dialog->Window),GTK_WINDOW(dialog->Window),OPEN_LABEL,icon_path,"filechooser_window");
if (yon_file_chooser_start(dialog)==GTK_RESPONSE_ACCEPT){ if (yon_file_chooser_start(dialog)==GTK_RESPONSE_ACCEPT){
gtk_entry_set_text(GTK_ENTRY(target_entry),dialog->last_success_selection); gtk_entry_set_text(GTK_ENTRY(element->PathEntry),dialog->last_success_selection);
free(dialog); free(dialog);
} }
@ -137,7 +133,7 @@ void on_source_choose(GtkWidget *self){
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog->MainFileChooser),filter); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog->MainFileChooser),filter);
if (yon_file_chooser_start(dialog)==GTK_RESPONSE_ACCEPT){ if (yon_file_chooser_start(dialog)==GTK_RESPONSE_ACCEPT){
gtk_entry_set_text(GTK_ENTRY(target_entry),dialog->last_success_selection); gtk_entry_set_text(GTK_ENTRY(element->PathEntry),dialog->last_success_selection);
free(dialog); free(dialog);
} }
@ -151,10 +147,6 @@ void on_source_accept(GtkWidget *,source_window *window){
on_subwindow_close(window->Window); on_subwindow_close(window->Window);
return; return;
} }
const char *creation_path = gtk_widget_get_visible(window->PathEntry)? gtk_entry_get_text(GTK_ENTRY(window->PathEntry)):NULL;
if (!yon_char_is_empty(creation_path)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),SOURCE_CREATE_ONGOING_ERROR_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
}
char *sources_list = NULL; char *sources_list = NULL;
GList *list = gtk_container_get_children(GTK_CONTAINER(window->AddBox)); GList *list = gtk_container_get_children(GTK_CONTAINER(window->AddBox));
GList *iter; GList *iter;
@ -207,26 +199,6 @@ void on_source_accept(GtkWidget *,source_window *window){
} else { } else {
yon_config_remove_by_key(source_parameter); yon_config_remove_by_key(source_parameter);
} }
int size;
config_str paths = NULL;
dictionary *dict;
if (window->sources){
for_dictionaries(dict,window->sources){
if (yon_char_parsed_check_exist(paths,size,dict->key)>-1){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),VALUE_REPEAT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
yon_char_parsed_add_or_create_if_exists(paths,&size,dict->key);
}
if (!size){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->PathEntry);
return;
}
}
char *parameter_string = yon_char_parsed_to_string(paths,(int)size,",");
if (!yon_char_is_empty(parameter_string)) free(parameter_string);
if (!main_config.configure_mode){ if (!main_config.configure_mode){
int size; int size;
config_str parameters = yon_config_get_save_parameters_by_key(&size,locale_parameter,lang_parameter,zone_parameter,NULL); config_str parameters = yon_config_get_save_parameters_by_key(&size,locale_parameter,lang_parameter,zone_parameter,NULL);
@ -238,7 +210,6 @@ void on_source_accept(GtkWidget *,source_window *window){
yon_char_parsed_free(parameters,size); yon_char_parsed_free(parameters,size);
} }
} }
yon_dictionary_free_all(window->sources,NULL);
on_subwindow_close(window->Window); on_subwindow_close(window->Window);
free(window); free(window);
} }
@ -252,54 +223,27 @@ source_window *yon_source_window_new(){
window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton"); window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
window->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton"); window->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton");
window->AutoSwitch = yon_gtk_builder_get_widget(builder,"AutoSwitch"); window->AutoSwitch = yon_gtk_builder_get_widget(builder,"AutoSwitch");
window->TypeCombo = yon_gtk_builder_get_widget(builder,"TypeCombo");
window->PathEntry = yon_gtk_builder_get_widget(builder,"PathEntry");
window->DeviceCombo = yon_gtk_builder_get_widget(builder,"DeviceCombo");
window->PathButton = yon_gtk_builder_get_widget(builder,"PathButton");
window->AddButton = yon_gtk_builder_get_widget(builder,"AddButton");
window->AddBox = yon_gtk_builder_get_widget(builder,"AddBox"); window->AddBox = yon_gtk_builder_get_widget(builder,"AddBox");
window->sources = NULL;
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_source_accept),window); g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_source_accept),window);
g_signal_connect(G_OBJECT(window->AddButton),"clicked",G_CALLBACK(on_source_add),window);
g_signal_connect(G_OBJECT(window->PathButton),"clicked",G_CALLBACK(on_source_choose),window);
g_signal_connect(G_OBJECT(window->TypeCombo),"changed",G_CALLBACK(on_source_changed),window);
g_signal_connect(G_OBJECT(window->AutoSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),gtk_widget_get_parent(gtk_widget_get_parent(window->AddBox))); g_signal_connect(G_OBJECT(window->AutoSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),gtk_widget_get_parent(gtk_widget_get_parent(window->AddBox)));
g_signal_connect(G_OBJECT(window->AutoSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->TypeCombo);
g_signal_connect(G_OBJECT(window->AutoSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->DeviceCombo);
g_signal_connect(G_OBJECT(window->AutoSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->PathButton);
g_signal_connect(G_OBJECT(window->AutoSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->PathEntry);
g_signal_connect(G_OBJECT(window->AutoSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch_inversed),window->AddButton);
g_object_set_data(G_OBJECT(window->PathButton),"combo",window->TypeCombo);
g_object_set_data(G_OBJECT(window->PathButton),"target",window->PathEntry);
g_object_set_data(G_OBJECT(window->TypeCombo),"target",window->DeviceCombo);
g_object_set_data(G_OBJECT(window->TypeCombo),"button",window->PathButton);
g_object_set_data(G_OBJECT(window->TypeCombo),"combo",window->PathEntry);
{ {
char *config_parameter = config(source_parameter); char *config_parameter = config(source_parameter);
if (window->sources){ if (!yon_char_is_empty(config_parameter)){
yon_dictionary_free_all(window->sources,NULL); gtk_switch_set_active(GTK_SWITCH(window->AutoSwitch),0);
}
int size; int size;
config_str parsed = yon_char_parse(config_parameter,&size,","); config_str parsed = yon_char_parse(config_parameter,&size,",");
for (int i=0;i<size;i++){ for (int i=0;i<size;i++){
yon_dictionary_add_or_create_if_exists_with_data(window->sources,parsed[i],NULL); yon_source_element_add(parsed[i],NULL,window);
} }
yon_char_parsed_free(parsed,size); yon_char_parsed_free(parsed,size);
} else {
yon_source_element_add(NULL,NULL,window);
} }
int size;
config_str parts = yon_config_load(get_parts_and_devices_command, &size);
for (int i=0;i<size;i++){
int parsed_size;
config_str parsed = yon_char_parse(parts[i],&parsed_size,";");
if (!strcmp(parsed[0],"part")){
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(window->DeviceCombo),parsed[1],parsed[1]);
}
yon_char_parsed_free(parsed,parsed_size);
} }
gtk_combo_box_set_active(GTK_COMBO_BOX(window->DeviceCombo),0);
yon_char_parsed_free(parts,size);
return window; return window;
} }

@ -34,16 +34,16 @@ void on_startup_apps_remove(GtkWidget *self,main_window *widgets){
if (!deletable) return; if (!deletable) return;
dialog_confirmation_data *data = yon_confirmation_dialog_data_new(); dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
data->action_text = SERVICE_REMOVE_CONFIRMATION_LABEL(unit); data->action_text = SERVICE_REMOVE_CONFIRMATION_LABEL(unit);
data->title = SERVICE_REMOVE_TITLE_LABEL; data->title = APPLICATIONS_REMOVE_TITLE_LABEL;
if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){ if (yon_confirmation_dialog_call(self,data) == GTK_RESPONSE_ACCEPT){
gtk_list_store_remove(widgets->StartupList,&iter); gtk_list_store_remove(GTK_LIST_STORE(model),&iter);
} }
} }
} }
void yon_startup_apps_setup(main_window *widgets){ void yon_startup_apps_setup(main_window *widgets){
GtkTreeIter iter; GtkTreeIter iter;
if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->StartupAppsList),&iter)){ gtk_list_store_clear(widgets->StartupAppsList);
int size; int size;
config_str apps = yon_resource_open_file(apps_list_path,&size); config_str apps = yon_resource_open_file(apps_list_path,&size);
for (int i=1;i<size;i++){ for (int i=1;i<size;i++){
@ -54,7 +54,7 @@ void yon_startup_apps_setup(main_window *widgets){
gtk_list_store_set(widgets->StartupAppsList,&iter,0,1,1,parsed[0],2,yon_char_return_if_exist(parsed[1],""),3,yon_char_return_if_exist(_(parsed[2]),""),-1); gtk_list_store_set(widgets->StartupAppsList,&iter,0,1,1,parsed[0],2,yon_char_return_if_exist(parsed[1],""),3,yon_char_return_if_exist(_(parsed[2]),""),-1);
} }
} }
}
char *startup = config(SERVICES_ENABLE_parameter); char *startup = config(SERVICES_ENABLE_parameter);
if (!yon_char_is_empty(startup)){ if (!yon_char_is_empty(startup)){
if (!strcmp(startup,"auto")){ if (!strcmp(startup,"auto")){
@ -155,7 +155,7 @@ startup_service_window *yon_startup_app_window_new(){
window->GroupLabel = yon_gtk_builder_get_widget(builder,"GroupLabel"); window->GroupLabel = yon_gtk_builder_get_widget(builder,"GroupLabel");
window->DescriptionLabel = yon_gtk_builder_get_widget(builder,"DescriptionLabel"); window->DescriptionLabel = yon_gtk_builder_get_widget(builder,"DescriptionLabel");
gtk_label_set_text(GTK_LABEL(window->AppLabel),APP_LABEL); gtk_label_set_text(GTK_LABEL(window->AppLabel),APP_LABEL);
gtk_label_set_text(GTK_LABEL(window->AppLabel),GROUP_LABEL); gtk_label_set_text(GTK_LABEL(window->GroupLabel),GROUP_LABEL);
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
g_object_set_data(G_OBJECT(window->AcceptButton),"startup_service_window",window); g_object_set_data(G_OBJECT(window->AcceptButton),"startup_service_window",window);
@ -165,20 +165,20 @@ startup_service_window *yon_startup_app_window_new(){
void on_startup_app_add(GtkWidget *, main_window *widgets){ void on_startup_app_add(GtkWidget *, main_window *widgets){
startup_service_window *window = yon_startup_app_window_new(); startup_service_window *window = yon_startup_app_window_new();
yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow),SERVICE_ADD_TITLE_LABEL,icon_path,"app_add_window"); yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow),APPLICATIONS_ADD_TITLE_LABEL,icon_path,"app_add_window");
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_startup_app_add_accept),widgets); g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_startup_app_add_accept),widgets);
gtk_widget_show(window->Window); gtk_widget_show(window->Window);
} }
void on_startup_app_edit(GtkWidget *, main_window *widgets){ void on_startup_app_edit(GtkWidget *, main_window *widgets){
GtkTreeIter iter; GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->StartupServicesTree)),NULL,&iter)){ if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->StartupAppsTree)),NULL,&iter)){
char *app, *unit, *description; char *app, *unit, *description;
int status; int status;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->StartupAppsList),&iter,1,&unit,2,&app,3,&description,4,&status,-1); gtk_tree_model_get(GTK_TREE_MODEL(widgets->StartupAppsList),&iter,1,&unit,2,&app,3,&description,4,&status,-1);
if (status){ if (status){
startup_service_window *window = yon_startup_app_window_new(); startup_service_window *window = yon_startup_app_window_new();
yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow),SERVICE_EDIT_TITLE_LABEL,icon_path,"app_add_window"); yon_gtk_window_setup(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->MainWindow),APPLICATIONS_EDIT_TITLE_LABEL,icon_path,"app_add_window");
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_startup_app_edit_accept),widgets); g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_startup_app_edit_accept),widgets);
gtk_entry_set_text(GTK_ENTRY(window->UnitEntry),unit); gtk_entry_set_text(GTK_ENTRY(window->UnitEntry),unit);
gtk_entry_set_text(GTK_ENTRY(window->ServiceEntry),app); gtk_entry_set_text(GTK_ENTRY(window->ServiceEntry),app);

@ -1,12 +1,19 @@
#include "ubinstall-gtk.h" #include "ubinstall-gtk.h"
void on_srartup_services_toggled(GtkWidget *, char *path, main_window *widgets){ void on_srartup_services_toggled(GtkCellRenderer *self, char *path, main_window *widgets){
GtkWidget *tree = NULL;
if (self == widgets->StartupChosenCell){
tree = widgets->StartupServicesTree;
} else if (self == widgets->StartupAppsChosenCell){
tree = widgets->StartupAppsTree;
}
GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(tree));
GtkTreeIter iter; GtkTreeIter iter;
int status; int status;
gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(widgets->StartupList),&iter,path); gtk_tree_model_get_iter_from_string(model,&iter,path);
gtk_tree_model_get(GTK_TREE_MODEL(widgets->StartupList),&iter,0,&status,-1); gtk_tree_model_get(model,&iter,0,&status,-1);
gtk_list_store_set(widgets->StartupList,&iter,0,!status,-1); gtk_list_store_set(GTK_LIST_STORE(model),&iter,0,!status,-1);
} }
void on_startup_services_selection_changed(GtkWidget *,main_window *widgets){ void on_startup_services_selection_changed(GtkWidget *,main_window *widgets){
@ -44,7 +51,7 @@ void on_startup_services_remove(GtkWidget *self,main_window *widgets){
void yon_startup_services_setup(main_window *widgets){ void yon_startup_services_setup(main_window *widgets){
GtkTreeIter iter; GtkTreeIter iter;
if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->StartupList),&iter)){ gtk_list_store_clear(widgets->StartupList);
int size; int size;
config_str services = yon_resource_open_file(services_list_path,&size); config_str services = yon_resource_open_file(services_list_path,&size);
for (int i=1;i<size;i++){ for (int i=1;i<size;i++){
@ -55,7 +62,7 @@ void yon_startup_services_setup(main_window *widgets){
gtk_list_store_set(widgets->StartupList,&iter,0,1,1,parsed[0],2,yon_char_return_if_exist(parsed[1],""),3,yon_char_return_if_exist(_(parsed[2]),""),-1); gtk_list_store_set(widgets->StartupList,&iter,0,1,1,parsed[0],2,yon_char_return_if_exist(parsed[1],""),3,yon_char_return_if_exist(_(parsed[2]),""),-1);
} }
} }
}
char *startup = config(SERVICES_ENABLE_parameter); char *startup = config(SERVICES_ENABLE_parameter);
if (!yon_char_is_empty(startup)){ if (!yon_char_is_empty(startup)){
if (!strcmp(startup,"auto")){ if (!strcmp(startup,"auto")){

@ -0,0 +1,332 @@
#include "ubinstall-gtk.h"
void on_locale_changed(GtkWidget *,main_window *widgets){
GtkTreeIter iter;
GtkTreeModel *model;
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->LanguagesTree)),&model,&iter)) return;
// {
// GtkTreePath *path = gtk_tree_model_get_path(GTK_TREE_MODEL(widgets->InstallerLanguageList),&iter);
// gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(widgets->LanguagesTree),path,0,0,0,0);
// gtk_tree_path_free(path);
// }
gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter));
char *config_code = config(installer_locale_parameter);
if (yon_char_is_empty(config_code)){
config_code = setlocale(LC_ALL,NULL);
}
GtkTreeIter itar;
for_iter(widgets->InstallerCountryFilter,&iter){
gtk_tree_model_filter_convert_iter_to_child_iter(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter),&itar,&iter);
char *target;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->InstallerCountryList),&itar,2,&target,-1);
if (!strcmp(config_code,target)){
gtk_tree_model_filter_convert_child_iter_to_iter(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter),&iter,&itar);
gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->CountryLanguagesTree)),&iter);
GtkTreePath *path = gtk_tree_model_get_path(GTK_TREE_MODEL(widgets->InstallerCountryFilter),&iter);
gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(widgets->CountryLanguagesTree),path,0,0,0,0);
gtk_tree_path_free(path);
break;
}
}
}
void on_installer_language_changed(GtkWidget *self,GtkTreePath*,GtkTreeViewColumn*, main_window *widgets){
char *window_language;
GtkTreeIter iter;
GtkTreeModel *model;
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->CountryLanguagesTree)),&model,&iter)) return;
gtk_tree_model_get(model,&iter,2,&window_language,-1);
if (!yon_char_is_empty(window_language)){
char *prev_lang = config(installer_locale_parameter);
if (!yon_char_is_empty(prev_lang)&&!strcmp(prev_lang,window_language)) return;
yon_config_register(installer_locale_parameter,installer_locale_parameter_command,(char*)window_language);
}
char *active_lang_id = gtk_tree_model_get_string_from_iter(model,&iter);
int size;
config_str parameters = yon_config_get_save_parameters_by_key(&size,installer_locale_parameter,NULL);
char *command_parameters = yon_char_parsed_to_string(parameters,size," ");
char *command = yon_char_unite(ubconfig_dull_command,"--target system ",command_parameters,NULL);
if (!system(command)){};
yon_main_window_update_locale(widgets);
g_signal_handlers_block_by_func(G_OBJECT(self),G_CALLBACK(on_locale_changed),widgets);
model = GTK_TREE_MODEL(widgets->InstallerLanguageList);
gtk_tree_model_get_iter_from_string(model,&iter,active_lang_id);
g_signal_handlers_unblock_by_func(G_OBJECT(self),G_CALLBACK(on_locale_changed),widgets);
}
void yon_startup_language_init(){
char *source = yon_config_get_type_path(main_config.load_mode);
if (!source){
source = main_config.custom_load_path;
}
char *command =yon_config_parameter_prepare_command(get_localisation_command,source,NULL,NULL);
int size;
config_str parsed = yon_config_load(command,&size);
{
if (size>0&&!yon_char_is_empty(parsed[0])&&strcmp(parsed[0],"(null)\n")){
yon_char_remove_last_symbol(parsed[0],'\n');
free(yon_char_divide_search(parsed[0],"=",-1));
yon_config_register(installer_locale_parameter,installer_locale_parameter_command,parsed[0]);
}
if (size>1&&!yon_char_is_empty(parsed[1])&&strcmp(parsed[1],"(null)\n")){
yon_char_remove_last_symbol(parsed[1],'\n');
free(yon_char_divide_search(parsed[1],"=",-1));
yon_char_remove_brackets(parsed[1]);
yon_config_register(installer_locale_parameter,installer_locale_parameter_command,parsed[1]);
}
if (size>2&&!yon_char_is_empty(parsed[2])&&strcmp(parsed[2],"(null)\n")){
yon_char_remove_last_symbol(parsed[2],'\n');
free(yon_char_divide_search(parsed[2],"=",-1));
yon_char_remove_brackets(parsed[2]);
yon_config_register(installer_locale_parameter,installer_locale_parameter_command,parsed[2]);
} else {
yon_config_register(installer_locale_parameter,installer_locale_parameter_command,setlocale(LC_ALL,""));
}
}
}
void yon_main_window_update_locale(main_window *widgets){
char *locale = config(installer_locale_parameter);
if (yon_char_is_empty(locale)){
char *sys_locale = config(lang_parameter);
if (!yon_char_is_empty(sys_locale)){
locale = sys_locale;
} else {
char *lang = config("LANG");
if (!yon_char_is_empty(lang)){
locale = lang;
}
}
}
locale = setlocale(LC_ALL,locale);
yon_config_register(installer_locale_parameter,installer_locale_parameter_command,(char*)locale);
// gtk_widget_destroy(widgets->MainWindow);
textdomain(LocaleName);
g_setenv("LANGUAGE",locale,1);
yon_update_translation(widgets);
// yon_main_window_create(widgets);
char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL);
yon_window_config_setup(GTK_WINDOW(widgets->MainWindow));
yon_window_config_load(path);
}
typedef struct{
char *locale_name;
char *code;
char *localised_name;
char *code_full;
} locale_struct;
gboolean on_languages_search_func(GtkTreeModel *model, gint ,const char *key, GtkTreeIter *iter, main_window *){
char *target;
char *loc_target;
gtk_tree_model_get(model, iter, 1,&target, 4, &loc_target,-1);
char *string_utf = g_utf8_casefold(key,-1);
char *target_utf = g_utf8_casefold(target,-1);
char *loc_target_utf = g_utf8_casefold(loc_target,-1);
char *string_normalized = g_utf8_strdown(g_utf8_normalize(string_utf,-1,G_NORMALIZE_DEFAULT),-1);
char *target_normalized = g_utf8_strdown(g_utf8_normalize(target_utf,-1,G_NORMALIZE_DEFAULT),-1);
char *loc_target_normalized = g_utf8_strdown(g_utf8_normalize(loc_target_utf,-1,G_NORMALIZE_DEFAULT),-1);
return !(g_str_has_prefix(target_normalized,string_normalized) || g_str_has_prefix(loc_target_normalized,string_normalized));
}
void yon_set_locales_list(main_window *widgets){
gtk_list_store_clear(widgets->InstallerLanguageList);
gtk_list_store_clear(widgets->InstallerCountryList);
char *config_code = yon_char_new(config(installer_locale_parameter));
int size;
config_str locales = yon_locale_get_all_codes(&size);
qsort(locales,size,sizeof(char*),(__compar_fn_t)yon_char_parsed_compare);
GtkTreeIter iter,itar;
GHashTable *added = g_hash_table_new(g_str_hash,g_str_equal);
textdomain(LOCALES_DOMAIN_NAME);
for (int i=0;i<size;i++){
char *lang_ab = yon_locale_get_parameter(locales[i],YON_LOCALE_LANG_AB);
char *code = yon_locale_get_parameter(locales[i],YON_LOCALE_CODE);
char *language = yon_locale_get_parameter(locales[i],YON_LOCALE_LANGUAGE);
char *lang_name = yon_locale_get_parameter(locales[i],YON_LOCALE_LANG_NAME);
char *territory = yon_locale_get_parameter(locales[i],YON_LOCALE_TERRITORY);
char *title = yon_locale_get_parameter(locales[i],YON_LOCALE_TITLE);
if (yon_char_is_empty(lang_ab)||
yon_char_is_empty(language)||
yon_char_is_empty(lang_name)||
yon_char_is_empty(territory)||
yon_char_is_empty(title)) continue;
char *country = yon_char_unite(language,", ",territory,NULL);
if (!g_hash_table_contains(added,lang_ab)){
g_hash_table_add(added,yon_char_new(lang_ab));
gtk_list_store_append(widgets->InstallerLanguageList,&iter);
gtk_list_store_set(widgets->InstallerLanguageList,&iter,
0,lang_ab,
1,_(language),
2,lang_name,
3,locales[i],
4,language,
-1);
}
gtk_list_store_append(widgets->InstallerCountryList,&itar);
gtk_list_store_set(widgets->InstallerCountryList,&itar,
0,lang_ab,
1,_(country),
2,code,
3,_(title),
-1);
}
for_iter (GTK_TREE_MODEL(widgets->InstallerLanguageList), &iter){
char *compare_target;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->InstallerLanguageList),&iter, 3, &compare_target, -1);
if (!yon_char_is_empty(config_code)){
char *temp = strstr(config_code,".");
if (temp) temp[0]='\0';
char *compare_lang_ab =yon_locale_get_parameter(compare_target,YON_LOCALE_LANG_AB);
temp = strstr(config_code,"_");
if (temp) temp[0]='\0';
if (!strcmp(config_code,compare_lang_ab)){
gtk_widget_realize(widgets->LanguagesTree);
GtkTreePath *path = gtk_tree_model_get_path(GTK_TREE_MODEL(widgets->InstallerLanguageList),&iter);
gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(widgets->LanguagesTree),path,0,0,0,0);
gtk_tree_path_free(path);
gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->LanguagesTree)),&iter);
on_locale_changed(NULL,widgets);
}
}
}
textdomain(LocaleName);
}
gboolean on_country_filter(GtkTreeModel *self, GtkTreeIter *iter, main_window *widgets){
GtkTreeIter itar;
GtkTreeModel *model;
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->LanguagesTree)),&model,&itar)) return 0;
char *cur_code,*country;
gtk_tree_model_get(self,iter,0,&cur_code,1,&country,-1);
if (yon_char_is_empty(cur_code)) return 0;
char *code;
gtk_tree_model_get(model,&itar,0,&code,-1);
if (!strcmp(code,cur_code)){
char *config_lang = config(installer_locale_parameter);
if (!yon_char_is_empty(config_lang)&&!strcmp(cur_code,config_lang)){
if (gtk_tree_model_filter_convert_child_iter_to_iter(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter),iter,&itar)){
gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->CountryLanguagesTree)),&itar);
}
}
return 1;
}
return 0;
}
void yon_translation_init(GtkBuilder *builder){
GSList *list = gtk_builder_get_objects(builder);
GSList *iter;
for (iter = list; iter; iter = iter->next){
GObject *cur_widget = NULL;
const char *widget_text = NULL;
if (GTK_IS_BUTTON(iter->data)){
cur_widget = G_OBJECT(iter->data);
widget_text = yon_char_new(gtk_button_get_label(GTK_BUTTON(cur_widget)));
} else if (GTK_IS_LABEL(iter->data)){
cur_widget = G_OBJECT(iter->data);
widget_text = yon_char_new(gtk_label_get_label(GTK_LABEL(cur_widget)));
} else if (GTK_IS_TREE_VIEW_COLUMN(iter->data)){
cur_widget = G_OBJECT(iter->data);
widget_text = yon_char_new(gtk_tree_view_column_get_title(GTK_TREE_VIEW_COLUMN(cur_widget)));
} else if (GTK_IS_MENU_ITEM(iter->data)){
cur_widget = G_OBJECT(iter->data);
GList *list = gtk_container_get_children(GTK_CONTAINER(cur_widget));
if (list) {
GtkWidget *widget = list->data;
g_list_free(list);
if (GTK_IS_BOX(widget)){
continue;
}
}
widget_text = yon_char_new(gtk_menu_item_get_label(GTK_MENU_ITEM(cur_widget)));
} else continue;
g_object_set_data(G_OBJECT(cur_widget),"original_label",(void*)widget_text);
}
}
void yon_update_translation(main_window *widgets){
GtkBuilder *builder = widgets->builder;
GSList *list = gtk_builder_get_objects(builder);
list = g_slist_append(list,widgets->DocumentationMenuItem);
list = g_slist_append(list,widgets->AboutMenuItem);
GSList *iter;
for (iter = list; iter; iter = iter->next){
if (iter->data == widgets->LicenceLabel){
yon_licence_load(widgets);
} else if (GTK_IS_BUTTON(iter->data)){
GtkWidget *cur_button = GTK_WIDGET(iter->data);
char *source_label = g_object_get_data(G_OBJECT(cur_button),"original_label");
if (!yon_char_is_empty(source_label)){
gtk_button_set_label(GTK_BUTTON(cur_button),_(source_label));
}
} else if (GTK_IS_LABEL(iter->data)){
GtkWidget *cur_label = GTK_WIDGET(iter->data);
char *source_label = g_object_get_data(G_OBJECT(cur_label),"original_label");
if (!yon_char_is_empty(source_label)){
if (gtk_label_get_use_markup(GTK_LABEL(cur_label))){
gtk_label_set_markup(GTK_LABEL(cur_label),_(source_label));
} else {
gtk_label_set_text(GTK_LABEL(cur_label),_(source_label));
}
}
} else if (GTK_IS_MENU_ITEM(iter->data)){
GtkWidget *cur_menu_item = GTK_WIDGET(iter->data);
char *source_label = g_object_get_data(G_OBJECT(cur_menu_item),"original_label");
if (!yon_char_is_empty(source_label)){
gtk_menu_item_set_label(GTK_MENU_ITEM(cur_menu_item),_(source_label));
}
} else if (GTK_IS_TREE_VIEW_COLUMN(iter->data)){
GObject *cur_column = G_OBJECT(iter->data);
char *source_label = g_object_get_data(G_OBJECT(cur_column),"original_label");
if (!yon_char_is_empty(source_label)){
gtk_tree_view_column_set_title(GTK_TREE_VIEW_COLUMN(cur_column),_(source_label));
}
} else if (iter->data == widgets->LanguagesTree){
yon_set_locales_list(widgets);
}
}
{
GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->DocumentationMenuItem));
GList *container = gtk_container_get_children(list->data);
GObject *cur_button = G_OBJECT(container->next->data);
char *source_label = g_object_get_data(G_OBJECT(widgets->DocumentationMenuItem),"original_label");
if (!yon_char_is_empty(source_label)){
gtk_label_set_text(GTK_LABEL(cur_button),_(source_label));
}
g_list_free(list);
g_list_free(container);
}
{
GList *list = gtk_container_get_children(GTK_CONTAINER(widgets->AboutMenuItem));
GList *container = gtk_container_get_children(list->data);
GObject *cur_button = G_OBJECT(container->next->data);
char *source_label = g_object_get_data(G_OBJECT(widgets->AboutMenuItem),"original_label");
if (!yon_char_is_empty(source_label)){
gtk_label_set_text(GTK_LABEL(cur_button),_(source_label));
}
g_list_free(list);
g_list_free(container);
}
}

@ -70,14 +70,14 @@ void on_user_remove_clicked(GtkWidget *,yon_user_struct *user){
void yon_password_root_new(GtkWidget *, main_window *widgets){ void yon_password_root_new(GtkWidget *, main_window *widgets){
yon_password_window *window = yon_password_open(GTK_ENTRY(widgets->UserRootPasswordEntry)); yon_password_window *window = yon_password_open(GTK_ENTRY(widgets->UserRootPasswordEntry));
gtk_widget_hide(gtk_widget_get_parent(window->EncryptionCombo)); yon_password_function_set(window,(double*)yon_password_check_func);
gtk_widget_show(window->Window); yon_password_hash_list_set(window,NULL,NULL,0);
} }
void yon_password_new(GtkWidget *, yon_user_struct *user){ void yon_password_new(GtkWidget *, yon_user_struct *user){
yon_password_window *window = yon_password_open(GTK_ENTRY(user->PasswordEntry)); yon_password_window *window = yon_password_open(GTK_ENTRY(user->PasswordEntry));
gtk_widget_hide(gtk_widget_get_parent(window->EncryptionCombo)); yon_password_function_set(window,(double*)yon_password_check_func);
gtk_widget_show(window->Window); yon_password_hash_list_set(window,NULL,NULL,0);
} }
yon_user_struct *yon_user_struct_new(){ yon_user_struct *yon_user_struct_new(){
@ -91,8 +91,8 @@ yon_user_struct *yon_user_struct_new(){
user->PasswordCombo = yon_gtk_builder_get_widget(builder,"PasswordCombo"); user->PasswordCombo = yon_gtk_builder_get_widget(builder,"PasswordCombo");
user->PasswordEntry = yon_gtk_builder_get_widget(builder,"PasswordEntry"); user->PasswordEntry = yon_gtk_builder_get_widget(builder,"PasswordEntry");
user->PasswordButton = yon_gtk_builder_get_widget(builder,"PasswordButton"); user->PasswordButton = yon_gtk_builder_get_widget(builder,"PasswordButton");
yon_gtk_entry_block_symbols(GTK_ENTRY(user->LoginEntry),"'\"=:\n"); yon_gtk_entry_block_symbols(GTK_ENTRY(user->LoginEntry),"[]'\"=:\n");
yon_gtk_entry_block_symbols(GTK_ENTRY(user->UsernameEntry),"'\":\n"); yon_gtk_entry_block_symbols(GTK_ENTRY(user->UsernameEntry),"[]'\":\n");
g_object_set_data(G_OBJECT(user->MainBox),"yon_user_struct",user); g_object_set_data(G_OBJECT(user->MainBox),"yon_user_struct",user);
@ -106,6 +106,9 @@ yon_user_struct *yon_user_struct_new(){
} }
void yon_user_init(main_window *widgets){ void yon_user_init(main_window *widgets){
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->UserRootPasswordCombo));
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->UserRootPasswordCombo),NULL,DEFAULT_LABEL);
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->UserRootPasswordCombo),NULL,SET_PASSWORD_LABEL);
yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(widgets->UserRootPasswordEntry)); yon_gtk_entry_set_password_visibility_icon(GTK_ENTRY(widgets->UserRootPasswordEntry));
char *root_password = config(root_password_parameter); char *root_password = config(root_password_parameter);
char *autologin = config(autologin_parameter); char *autologin = config(autologin_parameter);
@ -146,6 +149,7 @@ void yon_user_init(main_window *widgets){
char *parameter_name = yon_char_divide_search(parameter,"=",-1); char *parameter_name = yon_char_divide_search(parameter,"=",-1);
char *key = yon_config_parameter_get_key(parameter_name); char *key = yon_config_parameter_get_key(parameter_name);
char *login = yon_config_parameter_get_key(strstr(key,"USERADD[")); char *login = yon_config_parameter_get_key(strstr(key,"USERADD["));
yon_char_remove_brackets(login);
config_str parsed = yon_char_parse(parameter,&parsed_size,":"); config_str parsed = yon_char_parse(parameter,&parsed_size,":");
gtk_entry_set_text(GTK_ENTRY(user->LoginEntry),login); gtk_entry_set_text(GTK_ENTRY(user->LoginEntry),login);

@ -1,4 +1,5 @@
#include "ubinstall-gtk.h" #include "ubinstall-gtk.h"
#include "pwquality.h"
config main_config; config main_config;
@ -6,6 +7,30 @@ void yon_license_init(main_window *widgets){
gtk_widget_set_sensitive(widgets->NextButton,0); gtk_widget_set_sensitive(widgets->NextButton,0);
} }
double yon_password_check_func(yon_password_window *window, const char *password_string){
pwquality_settings_t *settings = pwquality_default_settings();
int strength = pwquality_check(settings,password_string,NULL,NULL,NULL);
if (strength<5){
strength=5;
}
double password_strength = strength/100.0;
gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(window->PasswordStrengthProgress),password_strength);
if (password_strength<0.3){
gtk_style_context_add_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"redBox");
gtk_style_context_remove_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"greenBox");
gtk_style_context_remove_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"yellowBox");
} else if (password_strength<0.6) {
gtk_style_context_add_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"yellowBox");
gtk_style_context_remove_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"redBox");
gtk_style_context_remove_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"greenBox");
} else {
gtk_style_context_add_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"greenBox");
gtk_style_context_remove_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"redBox");
gtk_style_context_remove_class(gtk_widget_get_style_context(window->PasswordStrengthProgress),"yellowBox");
}
return password_strength;
}
void yon_open_browser(GtkWidget *, char *link){ void yon_open_browser(GtkWidget *, char *link){
GtkWidget *window = yon_ubl_browser_window_open(link,TITLE_LABEL); GtkWidget *window = yon_ubl_browser_window_open(link,TITLE_LABEL);
if (window) if (window)
@ -26,12 +51,12 @@ void on_open_documentation_confirmation(GtkWidget *self, char *link){
gtk_window_set_icon_name(GTK_WINDOW(window->Window),yon_char_append("com.ublinux.",LocaleName)); gtk_window_set_icon_name(GTK_WINDOW(window->Window),yon_char_append("com.ublinux.",LocaleName));
gtk_widget_show_all(window->Window); gtk_widget_show_all(window->Window);
g_signal_connect(G_OBJECT(window->CloseButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); g_signal_connect(G_OBJECT(window->CloseButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(yon_open_browser),yon_char_new(link)); g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(yon_open_browser),yon_char_new(_(link)));
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
} else { } else {
yon_open_browser(self,link); yon_open_browser(self,_(link));
} }
} }
@ -75,67 +100,6 @@ void yon_on_about(GtkWidget *, main_window *){
//functions //functions
int yon_confirmation_dialog_call(GtkWidget *self,dialog_confirmation_data *data){
textdomain(template_ui_LocaleName);
GtkWidget *dialog = gtk_dialog_new_with_buttons(TITLE_LABEL,GTK_WINDOW(gtk_widget_get_toplevel(self)),GTK_DIALOG_USE_HEADER_BAR,CANCEL_LABEL,GTK_RESPONSE_CANCEL,ACCEPT_LABEL,GTK_RESPONSE_ACCEPT,NULL);
textdomain(LocaleName);
gtk_window_set_modal(GTK_WINDOW(dialog),1);
gtk_window_set_icon_name(GTK_WINDOW(dialog),yon_char_append("com.ublinux.",LocaleName));
gtk_window_set_title(GTK_WINDOW(dialog),TITLE_LABEL);
gtk_widget_set_size_request(dialog,450,-1);
GList *list = gtk_container_get_children(GTK_CONTAINER(gtk_dialog_get_header_bar(GTK_DIALOG(dialog))));
GtkWidget *image_cancel = gtk_image_new_from_icon_name("com.ublinux.libublsettingsui-gtk3.cancel-symbolic",GTK_ICON_SIZE_BUTTON);
GtkWidget *image_accept = gtk_image_new_from_icon_name("com.ublinux.libublsettingsui-gtk3.accept-symbolic",GTK_ICON_SIZE_BUTTON);
gtk_button_set_image((GtkButton*)g_list_nth_data(list,0),image_cancel);
gtk_button_set_image((GtkButton*)g_list_nth_data(list,1),image_accept);
gtk_style_context_add_class(gtk_widget_get_style_context((GtkWidget*)g_list_nth_data(list,0)),"marginright");
gtk_style_context_add_class(gtk_widget_get_style_context((GtkWidget*)g_list_nth_data(list,1)),"marginright");
g_list_free(list);
GtkWidget *header_label = gtk_label_new(yon_char_is_empty(data->title)?TITLE_LABEL:data->title);
gtk_widget_show(header_label);
PangoAttrList *attributes = pango_attr_list_new();
PangoAttribute *boldAttr = pango_attr_weight_new(PANGO_WEIGHT_BOLD);
pango_attr_list_insert(attributes, boldAttr);
gtk_label_set_attributes(GTK_LABEL(header_label),attributes);
GtkWidget *header = gtk_dialog_get_header_bar(GTK_DIALOG(dialog));
gtk_header_bar_set_custom_title(GTK_HEADER_BAR(header),header_label);
gtk_widget_show(header);
GtkWidget *image = gtk_image_new_from_icon_name("dialog-question-symbolic",GTK_ICON_SIZE_DIALOG);
gtk_widget_show(image);
gtk_widget_set_margin_start(image,20);
gtk_widget_set_margin_end(image,20);
gtk_widget_set_margin_bottom(image,20);
gtk_widget_set_margin_top(image,20);
GtkWidget *label = gtk_label_new("");
gtk_widget_set_margin_end(label,20);
gtk_widget_show(label);
gtk_label_set_line_wrap_mode(GTK_LABEL(label),PANGO_WRAP_WORD);
gtk_label_set_line_wrap(GTK_LABEL(label),1);
gtk_label_set_markup(GTK_LABEL(label),data->action_text);
GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
gtk_widget_show(box);
gtk_box_pack_start(GTK_BOX(box),image,0,0,5);
gtk_box_pack_start(GTK_BOX(box),label,0,0,5);
gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),box,1,1,5);
gtk_window_set_default_size(GTK_WINDOW(dialog),450,-1);
int resp = gtk_dialog_run(GTK_DIALOG(dialog));
if (resp == GTK_RESPONSE_ACCEPT){
if (data->function){
data->function(NULL,data->data);
}
} else resp=0;
gtk_widget_destroy(dialog);
return resp;
}
// //functions // //functions
// void yon_encryption_type_setup(GtkComboBoxText *target){ // void yon_encryption_type_setup(GtkComboBoxText *target){
// int size; // int size;
@ -330,7 +294,7 @@ void config_init(){
main_config.save_done=0; main_config.save_done=0;
main_config.save_configured=0; main_config.save_configured=0;
main_config.configure_mode=0; main_config.configure_mode=0;
main_config.load_mode=YON_CONFIG_LOCAL; main_config.load_mode=YON_CONFIG_GLOBAL;
main_config.log_progress_buzy=0; main_config.log_progress_buzy=0;
main_config.log_end=0; main_config.log_end=0;
main_config.exit_accepted=0; main_config.exit_accepted=0;
@ -385,7 +349,11 @@ void on_gparted_update(GtkWidget *, main_window *widgets){
yon_devices_setup(widgets); yon_devices_setup(widgets);
} }
void on_reboot_accepted(main_window *){ void on_reboot_accepted(main_window *widgets){
dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
data->action_text=WARNING_REBOOT_TEXT_LABEL;
data->title=WARNING_TITLE_LABEL;
if (yon_confirmation_dialog_call(widgets->MainWindow,data)==GTK_RESPONSE_ACCEPT){
g_mutex_lock(&main_config.install_mutex); g_mutex_lock(&main_config.install_mutex);
if (main_config.install_thread){ if (main_config.install_thread){
pthread_cancel((pthread_t)main_config.install_thread); pthread_cancel((pthread_t)main_config.install_thread);
@ -394,6 +362,10 @@ void on_reboot_accepted(main_window *){
main_config.exit_accepted=1; main_config.exit_accepted=1;
while(gtk_events_pending()) gtk_main_iteration(); while(gtk_events_pending()) gtk_main_iteration();
if (system("reboot")){}; if (system("reboot")){};
gtk_main_quit();
exit(0);
}
} }
void on_exit_accepted(main_window *){ void on_exit_accepted(main_window *){
@ -404,13 +376,11 @@ void on_exit_accepted(main_window *){
} }
main_config.exit_accepted=1; main_config.exit_accepted=1;
while(gtk_events_pending()) gtk_main_iteration(); while(gtk_events_pending()) gtk_main_iteration();
// gtk_widget_destroy(widgets->MainWindow);
// gtk_main_quit();
} }
gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets){ gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets){
if (!main_config.exit_accepted||(main_config.save_done&&main_config.install_complete)){ if (!main_config.exit_accepted||(main_config.save_done&&main_config.install_complete)){
if (widgets){}; if (!main_config.install_complete||!main_config.save_configured){
dialog_confirmation_data *data = yon_confirmation_dialog_data_new(); dialog_confirmation_data *data = yon_confirmation_dialog_data_new();
data->action_text=INTERRUPT_TEXT_LABEL; data->action_text=INTERRUPT_TEXT_LABEL;
data->title=WARNING_TITLE_LABEL; data->title=WARNING_TITLE_LABEL;
@ -420,170 +390,34 @@ gboolean on_yon_exit(GtkWidget *,GdkEvent*, main_window *widgets){
gtk_main_quit(); gtk_main_quit();
return 1; return 1;
} }
} else {
on_exit_accepted(widgets);
gtk_main_quit();
} }
return 1;
}
void on_locale_changed(GtkWidget *,main_window *widgets){
GtkTreeIter iter;
GtkTreeModel *model;
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->LanguagesTree)),&model,&iter)) return;
gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter));
char *config_code = config(installer_lang_parameter);
if (yon_char_is_empty(config_code)){
config_code = setlocale(LC_ALL,NULL);
}
GtkTreeIter itar;
for_iter(widgets->InstallerCountryFilter,&iter){
gtk_tree_model_filter_convert_iter_to_child_iter(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter),&itar,&iter);
char *target;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->InstallerCountryList),&itar,2,&target,-1);
if (!strcmp(config_code,target)){
gtk_tree_model_filter_convert_child_iter_to_iter(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter),&iter,&itar);
gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->CountryLanguagesTree)),&iter);
GtkTreePath *path = gtk_tree_model_get_path(GTK_TREE_MODEL(widgets->InstallerCountryFilter),&iter);
gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(widgets->CountryLanguagesTree),path,0,0,0,0);
gtk_tree_path_free(path);
break;
}
}
}
void on_installer_language_changed(GtkWidget *self,GtkTreePath*,GtkTreeViewColumn*, main_window *widgets){
char *window_language;
GtkTreeIter iter;
GtkTreeModel *model;
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->CountryLanguagesTree)),&model,&iter)) return;
gtk_tree_model_get(model,&iter,2,&window_language,-1);
if (!yon_char_is_empty(window_language)){
char *prev_lang = config(installer_lang_parameter);
if (!yon_char_is_empty(prev_lang)&&!strcmp(prev_lang,window_language)) return;
yon_config_register(installer_lang_parameter,installer_lang_parameter_command,(char*)window_language);
}
char *active_lang_id = gtk_tree_model_get_string_from_iter(model,&iter);
int size;
config_str parameters = yon_config_get_save_parameters_by_key(&size,installer_lang_parameter,NULL);
char *command_parameters = yon_char_parsed_to_string(parameters,size," ");
char *command = yon_char_unite(ubconfig_dull_command,"--target system ",command_parameters,NULL);
g_signal_handlers_block_by_func(G_OBJECT(widgets->MainWindow),G_CALLBACK(on_yon_exit),widgets);
if (!system(command)){};
gtk_widget_destroy(widgets->MainWindow);
setlocale(LC_ALL, window_language);
textdomain(LocaleName);
g_setenv("LANGUAGE",window_language,1);
yon_main_window_create(widgets);
char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL);
yon_window_config_setup(GTK_WINDOW(widgets->MainWindow));
yon_window_config_load(path);
g_signal_handlers_block_by_func(G_OBJECT(self),G_CALLBACK(on_locale_changed),widgets);
model = GTK_TREE_MODEL(widgets->InstallerLanguageList);
gtk_tree_model_get_iter_from_string(model,&iter,active_lang_id);
g_signal_handlers_unblock_by_func(G_OBJECT(self),G_CALLBACK(on_locale_changed),widgets);
} }
typedef struct{ return 1;
char *locale_name;
char *code;
char *localised_name;
char *code_full;
} locale_struct;
int yon_char_parsed_compare(const void *a, const void *b){
const config_str str_a = (const config_str)a;
const config_str str_b = (const config_str)b;
return strcmp(*str_a,*str_b);
} }
void set_locales_list(main_window *widgets){ void yon_licence_load(main_window *widgets){
gtk_list_store_clear(widgets->InstallerLanguageList);
gtk_list_store_clear(widgets->InstallerCountryList);
char *config_code = yon_char_new(config(installer_lang_parameter));
int size; int size;
config_str locales = yon_locale_get_all_codes(&size); config_str parsed = NULL;
qsort(locales,size,sizeof(char*),yon_char_parsed_compare); parsed = yon_file_open(licence_path,&size);
GtkTreeIter iter,itar; if (size){
GHashTable *added = g_hash_table_new(g_str_hash,g_str_equal); bind_textdomain_codeset("ublinux-init-eula","UTF-8");
textdomain(LOCALES_DOMAIN_NAME); textdomain("ublinux-init-eula");
for (int i=0;i<size;i++){ char *licence = yon_char_parsed_to_string(parsed,size,"");
char *lang_ab = yon_locale_get_parameter(locales[i],YON_LOCALE_LANG_AB); gtk_label_set_text(GTK_LABEL(widgets->LicenceLabel),_(licence));
char *code = yon_locale_get_parameter(locales[i],YON_LOCALE_CODE); free(licence);
char *language = yon_locale_get_parameter(locales[i],YON_LOCALE_LANGUAGE); yon_char_parsed_free(parsed,size);
char *lang_name = yon_locale_get_parameter(locales[i],YON_LOCALE_LANG_NAME);
char *territory = yon_locale_get_parameter(locales[i],YON_LOCALE_TERRITORY);
char *title = yon_locale_get_parameter(locales[i],YON_LOCALE_TITLE);
if (yon_char_is_empty(lang_ab)||
yon_char_is_empty(language)||
yon_char_is_empty(lang_name)||
yon_char_is_empty(territory)||
yon_char_is_empty(title)) continue;
char *country = yon_char_unite(language,", ",territory,NULL);
if (!g_hash_table_contains(added,lang_ab)){
g_hash_table_add(added,yon_char_new(lang_ab));
gtk_list_store_append(widgets->InstallerLanguageList,&iter);
gtk_list_store_set(widgets->InstallerLanguageList,&iter,
0,lang_ab,
1,_(language),
2,lang_name,
3,locales[i],
-1);
}
gtk_list_store_append(widgets->InstallerCountryList,&itar);
gtk_list_store_set(widgets->InstallerCountryList,&itar,
0,lang_ab,
1,_(country),
2,code,
3,title,
-1);
if (yon_char_is_empty(config_code)){
config_code=yon_char_new(setlocale(LC_ALL,NULL));
}
char *temp = strstr(config_code,".");
if (temp) temp[0]='\0';
if (!strcmp(config_code,locales[i])){
g_signal_handlers_block_by_func(G_OBJECT(widgets->CountryLanguagesTree),G_CALLBACK(on_installer_language_changed),widgets);
GtkTreePath *path = gtk_tree_model_get_path(GTK_TREE_MODEL(widgets->InstallerLanguageList),&iter);
gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(widgets->LanguagesTree),path,0,0,0,0);
gtk_tree_path_free(path);
gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->LanguagesTree)),&iter);
on_locale_changed(NULL,widgets);
g_signal_handlers_unblock_by_func(G_OBJECT(widgets->CountryLanguagesTree),G_CALLBACK(on_installer_language_changed),widgets);
}
}
textdomain(LocaleName); textdomain(LocaleName);
}
gboolean on_country_filter(GtkTreeModel *self, GtkTreeIter *iter, main_window *widgets){
GtkTreeIter itar;
GtkTreeModel *model;
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->LanguagesTree)),&model,&itar)) return 0;
char *cur_code,*country;
gtk_tree_model_get(self,iter,0,&cur_code,1,&country,-1);
if (yon_char_is_empty(cur_code)) return 0;
char *code;
gtk_tree_model_get(model,&itar,0,&code,-1);
if (!strcmp(code,cur_code)){
char *config_lang = config(installer_lang_parameter);
if (!yon_char_is_empty(config_lang)&&!strcmp(cur_code,config_lang)){
if (gtk_tree_model_filter_convert_child_iter_to_iter(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter),iter,&itar)){
gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->CountryLanguagesTree)),&itar);
} }
} }
return 1;
}
return 0;
}
void yon_main_window_create(main_window *widgets){ void yon_main_window_create(main_window *widgets){
__attribute__((unused)) char *locale = setlocale(LC_ALL, "en_US.UTF-8");
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path); GtkBuilder *builder = gtk_builder_new_from_resource(glade_path);
yon_translation_init(builder);
gtk_builder_add_callback_symbol(builder,"yon_gtk_widget_set_sensitive_from_toggle_button",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button)); gtk_builder_add_callback_symbol(builder,"yon_gtk_widget_set_sensitive_from_toggle_button",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button));
gtk_builder_add_callback_symbol(builder,"on_toggle_button_switch_on",G_CALLBACK(on_toggle_button_switch_on)); gtk_builder_add_callback_symbol(builder,"on_toggle_button_switch_on",G_CALLBACK(on_toggle_button_switch_on));
// Custom widgets configuration // Custom widgets configuration
@ -720,6 +554,7 @@ void yon_main_window_create(main_window *widgets){
widgets->OSFormatFSMarkEntry = yon_gtk_builder_get_widget(builder,"OSFormatFSMarkEntry"); widgets->OSFormatFSMarkEntry = yon_gtk_builder_get_widget(builder,"OSFormatFSMarkEntry");
widgets->OSFormatEncryptionCombo = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionCombo"); widgets->OSFormatEncryptionCombo = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionCombo");
widgets->OSFormatEncryptionEntry = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionEntry"); widgets->OSFormatEncryptionEntry = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionEntry");
widgets->OSFormatEncryptionButton = yon_gtk_builder_get_widget(builder,"OSFormatEncryptionButton");
widgets->UserdataDevicesTree = yon_gtk_builder_get_widget(builder,"UserdataDevicesTree"); widgets->UserdataDevicesTree = yon_gtk_builder_get_widget(builder,"UserdataDevicesTree");
widgets->UserdataSysSectionTree = yon_gtk_builder_get_widget(builder,"UserdataSysSectionTree"); widgets->UserdataSysSectionTree = yon_gtk_builder_get_widget(builder,"UserdataSysSectionTree");
@ -734,6 +569,7 @@ void yon_main_window_create(main_window *widgets){
widgets->UserdataFormatFSMarkEntry = yon_gtk_builder_get_widget(builder,"UserdataFormatFSMarkEntry"); widgets->UserdataFormatFSMarkEntry = yon_gtk_builder_get_widget(builder,"UserdataFormatFSMarkEntry");
widgets->UserdataFormatEncryptionCombo = yon_gtk_builder_get_widget(builder,"UserdataFormatEncryptionCombo"); widgets->UserdataFormatEncryptionCombo = yon_gtk_builder_get_widget(builder,"UserdataFormatEncryptionCombo");
widgets->UserdataFormatEncryptionEntry = yon_gtk_builder_get_widget(builder,"UserdataFormatEncryptionEntry"); widgets->UserdataFormatEncryptionEntry = yon_gtk_builder_get_widget(builder,"UserdataFormatEncryptionEntry");
widgets->UserdataFormatEncryptionButton = yon_gtk_builder_get_widget(builder,"UserdataFormatEncryptionButton");
widgets->LanguagesFilter = GTK_TREE_MODEL(gtk_builder_get_object(builder,"LanguagesFilter")); widgets->LanguagesFilter = GTK_TREE_MODEL(gtk_builder_get_object(builder,"LanguagesFilter"));
widgets->LayoutsFilter = GTK_TREE_MODEL(gtk_builder_get_object(builder,"LayoutsFilter")); widgets->LayoutsFilter = GTK_TREE_MODEL(gtk_builder_get_object(builder,"LayoutsFilter"));
@ -744,11 +580,20 @@ void yon_main_window_create(main_window *widgets){
widgets->InstallerCountryFilter=GTK_TREE_MODEL(gtk_builder_get_object(builder,"InstallerCountryFilter")); widgets->InstallerCountryFilter=GTK_TREE_MODEL(gtk_builder_get_object(builder,"InstallerCountryFilter"));
widgets->InstallerLanguageList=GTK_LIST_STORE(gtk_builder_get_object(builder,"InstallerLanguageList")); widgets->InstallerLanguageList=GTK_LIST_STORE(gtk_builder_get_object(builder,"InstallerLanguageList"));
// widgets->LanguageCombo=yon_gtk_builder_get_widget(builder,"LanguageCombo"); // widgets->LanguageCombo=yon_gtk_builder_get_widget(builder,"LanguageCombo");
widgets->RegionMapBox=yon_gtk_builder_get_widget(builder,"RegionMapBox");
widgets->RegionMapTarget=NULL;
widgets->RegionCombo=yon_gtk_builder_get_widget(builder,"RegionCombo"); widgets->RegionCombo=yon_gtk_builder_get_widget(builder,"RegionCombo");
widgets->ZoneCombo=yon_gtk_builder_get_widget(builder,"ZoneCombo"); widgets->ZoneCombo=yon_gtk_builder_get_widget(builder,"ZoneCombo");
widgets->RegionSensitiveSwitch = yon_gtk_builder_get_widget(builder,"RegionSensitiveSwitch"); widgets->RegionSensitiveSwitch = yon_gtk_builder_get_widget(builder,"RegionSensitiveSwitch");
widgets->RegionEntry = yon_gtk_builder_get_widget(builder,"RegionEntry");
widgets->RegionTimezoneCompletionList = GTK_LIST_STORE(gtk_builder_get_object(builder,"RegionTimezoneCompletionList"));
widgets->RegionTimezoneCompletionFilter = GTK_TREE_MODEL_FILTER(gtk_builder_get_object(builder,"RegionTimezoneCompletionFilter"));
widgets->RegionMapOverlay = yon_gtk_builder_get_widget(builder,"RegionMapOverlay");
widgets->TimeZoneMapOverlayBox = yon_gtk_builder_get_widget(builder,"TimeZoneMapOverlayBox");
widgets->TimeZoneMapOverlayImage = yon_gtk_builder_get_widget(builder,"TimeZoneMapOverlayImage");
widgets->TimeZoneMapOverlayTitleLabel = yon_gtk_builder_get_widget(builder,"TimeZoneMapOverlayTitleLabel");
widgets->TimeZoneMapOverlayInfoLabel = yon_gtk_builder_get_widget(builder,"TimeZoneMapOverlayInfoLabel");
// widgets->UserImage=yon_gtk_builder_get_widget(builder,"UserImage");
widgets->UserRootNameEntry=yon_gtk_builder_get_widget(builder,"UserRootNameEntry"); widgets->UserRootNameEntry=yon_gtk_builder_get_widget(builder,"UserRootNameEntry");
widgets->UserRootLoginEntry=yon_gtk_builder_get_widget(builder,"UserRootLoginEntry"); widgets->UserRootLoginEntry=yon_gtk_builder_get_widget(builder,"UserRootLoginEntry");
widgets->UserRootPasswordCombo=yon_gtk_builder_get_widget(builder,"UserRootPasswordCombo"); widgets->UserRootPasswordCombo=yon_gtk_builder_get_widget(builder,"UserRootPasswordCombo");
@ -868,6 +713,7 @@ void yon_main_window_create(main_window *widgets){
widgets->PackagesChosenCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"PackagesChosenCell")); widgets->PackagesChosenCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"PackagesChosenCell"));
widgets->PackagesList = GTK_TREE_STORE(gtk_builder_get_object(builder,"Packages")); widgets->PackagesList = GTK_TREE_STORE(gtk_builder_get_object(builder,"Packages"));
widgets->ConfigHubRebootCombo = yon_gtk_builder_get_widget(builder,"ConfigHubRebootCombo");
widgets->HubPersonalListBox = yon_gtk_builder_get_widget(builder,"HubPersonalListBox"); widgets->HubPersonalListBox = yon_gtk_builder_get_widget(builder,"HubPersonalListBox");
widgets->HubSystemListBox = yon_gtk_builder_get_widget(builder,"HubSystemListBox"); widgets->HubSystemListBox = yon_gtk_builder_get_widget(builder,"HubSystemListBox");
widgets->HubPackagesListBox = yon_gtk_builder_get_widget(builder,"HubPackagesListBox"); widgets->HubPackagesListBox = yon_gtk_builder_get_widget(builder,"HubPackagesListBox");
@ -886,11 +732,15 @@ void yon_main_window_create(main_window *widgets){
} }
g_signal_connect(G_OBJECT(widgets->MainWindow),"delete-event",G_CALLBACK(on_yon_exit),widgets); g_signal_connect(G_OBJECT(widgets->MainWindow),"delete-event",G_CALLBACK(on_yon_exit),widgets);
GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2"); GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2");
g_object_set_data(G_OBJECT(widgets->DocumentationMenuItem),"original_label",yon_char_new(DOCUMENTATION_LABEL));
g_object_set_data(G_OBJECT(widgets->AboutMenuItem),"original_label",yon_char_new(ABOUT_LABEL));
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemmiddle"); gtk_style_context_add_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemmiddle");
gtk_style_context_remove_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemtop"); gtk_style_context_remove_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemtop");
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->DocumentationMenuItem); gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->DocumentationMenuItem);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->AboutMenuItem); gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->AboutMenuItem);
{
g_signal_connect(G_OBJECT(widgets->LicenseAgreeRadio),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->NextButton); g_signal_connect(G_OBJECT(widgets->LicenseAgreeRadio),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),widgets->NextButton);
g_signal_connect(G_OBJECT(widgets->LoadGlobalConfigurationMenuItem),"activate",G_CALLBACK(on_config_global_load),widgets); g_signal_connect(G_OBJECT(widgets->LoadGlobalConfigurationMenuItem),"activate",G_CALLBACK(on_config_global_load),widgets);
@ -904,7 +754,6 @@ void yon_main_window_create(main_window *widgets){
g_signal_connect(G_OBJECT(widgets->CommonGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL); g_signal_connect(G_OBJECT(widgets->CommonGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->SameGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL); g_signal_connect(G_OBJECT(widgets->SameGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->NextInstallationGPartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL); g_signal_connect(G_OBJECT(widgets->NextInstallationGPartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->OSGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->UserdataGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL); g_signal_connect(G_OBJECT(widgets->UserdataGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->GrubUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL); g_signal_connect(G_OBJECT(widgets->GrubUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->GrubInstallGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL); g_signal_connect(G_OBJECT(widgets->GrubInstallGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
@ -913,7 +762,6 @@ void yon_main_window_create(main_window *widgets){
g_signal_connect(G_OBJECT(widgets->CommonUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets); g_signal_connect(G_OBJECT(widgets->CommonUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
g_signal_connect(G_OBJECT(widgets->SameUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets); g_signal_connect(G_OBJECT(widgets->SameUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
g_signal_connect(G_OBJECT(widgets->NextInstallationUpdateGPartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets); g_signal_connect(G_OBJECT(widgets->NextInstallationUpdateGPartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
g_signal_connect(G_OBJECT(widgets->OSUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
g_signal_connect(G_OBJECT(widgets->UserdataUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets); g_signal_connect(G_OBJECT(widgets->UserdataUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
g_signal_connect(G_OBJECT(widgets->GrubUpdateUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets); g_signal_connect(G_OBJECT(widgets->GrubUpdateUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
g_signal_connect(G_OBJECT(widgets->GrubInstallUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets); g_signal_connect(G_OBJECT(widgets->GrubInstallUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
@ -930,8 +778,17 @@ void yon_main_window_create(main_window *widgets){
g_signal_connect(G_OBJECT(widgets->CancelInstallButton),"clicked",G_CALLBACK(on_page_cancel_clicked),widgets); g_signal_connect(G_OBJECT(widgets->CancelInstallButton),"clicked",G_CALLBACK(on_page_cancel_clicked),widgets);
g_signal_connect(G_OBJECT(widgets->RegionCombo),"changed",G_CALLBACK(on_region_changed),widgets); g_signal_connect(G_OBJECT(widgets->RegionCombo),"changed",G_CALLBACK(on_region_changed),widgets);
#ifdef TIMEZONEMAP_INCLUDE
g_signal_connect(G_OBJECT(widgets->ZoneCombo),"changed",G_CALLBACK(on_zone_changed),widgets);
g_signal_connect(G_OBJECT(widgets->TimeZoneMapOverlayBox),"enter-notify-event",G_CALLBACK(on_time_zone_status_hover),widgets);
g_signal_connect(G_OBJECT(widgets->TimeZoneMapOverlayBox),"leave-notify-event",G_CALLBACK(on_time_zone_status_hover_end),widgets);
#endif
g_signal_connect(G_OBJECT(widgets->RegionEntry),"changed",G_CALLBACK(on_region_entry_changed),widgets);
g_signal_connect(G_OBJECT(widgets->RegionSensitiveSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch),widgets->RegionCombo); g_signal_connect(G_OBJECT(widgets->RegionSensitiveSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch),widgets->RegionCombo);
g_signal_connect(G_OBJECT(widgets->RegionSensitiveSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch),widgets->ZoneCombo); g_signal_connect(G_OBJECT(widgets->RegionSensitiveSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch),widgets->ZoneCombo);
g_signal_connect(G_OBJECT(widgets->RegionSensitiveSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch),widgets->RegionMapBox);
g_signal_connect(G_OBJECT(widgets->RegionSensitiveSwitch),"state-set",G_CALLBACK(yon_gtk_widget_set_sensitive_from_switch),widgets->RegionEntry);
g_signal_connect(G_OBJECT(widgets->RegionMapBox),"button-press-event",G_CALLBACK(on_map_box_ckicked_skip),NULL);
g_signal_connect(G_OBJECT(widgets->KeyboardLayoutTree),"cursor-changed",G_CALLBACK(on_layout_selection_changed),widgets); g_signal_connect(G_OBJECT(widgets->KeyboardLayoutTree),"cursor-changed",G_CALLBACK(on_layout_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->KeyboardDefaultLayoutsSwitch),"state-set",G_CALLBACK(on_layout_default_toggled),widgets); g_signal_connect(G_OBJECT(widgets->KeyboardDefaultLayoutsSwitch),"state-set",G_CALLBACK(on_layout_default_toggled),widgets);
@ -947,12 +804,13 @@ void yon_main_window_create(main_window *widgets){
g_signal_connect(G_OBJECT(widgets->NextInstallationSysDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets); g_signal_connect(G_OBJECT(widgets->NextInstallationSysDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->SamePlaceDeviceTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets); g_signal_connect(G_OBJECT(widgets->SamePlaceDeviceTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->UserdataDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets); g_signal_connect(G_OBJECT(widgets->UserdataDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->OSDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->SamePlacePartTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets); g_signal_connect(G_OBJECT(widgets->SamePlacePartTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets);
g_signal_connect(G_OBJECT(widgets->NextInstallationSysSectionTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets); g_signal_connect(G_OBJECT(widgets->NextInstallationSysSectionTree),"cursor-changed",G_CALLBACK(on_partition_changed),widgets);
g_signal_connect(G_OBJECT(widgets->NextInstallationSizeTypeSpin),"changed",G_CALLBACK(on_partition_changed),widgets); g_signal_connect(G_OBJECT(widgets->NextInstallationSizeTypeSpin),"changed",G_CALLBACK(on_partition_changed),widgets);
g_signal_connect(G_OBJECT(widgets->OSFormatSizeCombo),"changed",G_CALLBACK(on_partition_changed),widgets);
g_signal_connect(G_OBJECT(widgets->UserdataFormatSizeCombo),"changed",G_CALLBACK(on_partition_changed),widgets);
g_signal_connect(G_OBJECT(widgets->UserRootPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->UserRootPasswordEntry); g_signal_connect(G_OBJECT(widgets->UserRootPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->UserRootPasswordEntry);
g_signal_connect(G_OBJECT(widgets->UserRootPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->UserRootPasswordButton); g_signal_connect(G_OBJECT(widgets->UserRootPasswordCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->UserRootPasswordButton);
@ -963,25 +821,36 @@ void yon_main_window_create(main_window *widgets){
g_signal_connect(G_OBJECT(widgets->LanguagesTree),"cursor-changed",G_CALLBACK(on_locale_changed),widgets); g_signal_connect(G_OBJECT(widgets->LanguagesTree),"cursor-changed",G_CALLBACK(on_locale_changed),widgets);
g_signal_connect(G_OBJECT(widgets->CountryLanguagesTree),"row-activated",G_CALLBACK(on_installer_language_changed),widgets); g_signal_connect(G_OBJECT(widgets->CountryLanguagesTree),"row-activated",G_CALLBACK(on_installer_language_changed),widgets);
// g_signal_connect(G_OBJECT(widgets->LanguageCombo),"changed",G_CALLBACK(on_locale_changed),widgets); // g_signal_connect(G_OBJECT(widgets->LanguageCombo),"changed",G_CALLBACK(on_locale_changed),widgets);
g_signal_connect(G_OBJECT(widgets->StartupChosenCell),"toggled",G_CALLBACK(on_srartup_services_toggled),widgets);
g_signal_connect(G_OBJECT(widgets->StartupServicesTree),"cursor-changed",G_CALLBACK(on_startup_services_selection_changed),widgets); g_signal_connect(G_OBJECT(widgets->StartupServicesTree),"cursor-changed",G_CALLBACK(on_startup_services_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->StartupServicesAddButton),"clicked",G_CALLBACK(on_startup_service_add),widgets); g_signal_connect(G_OBJECT(widgets->StartupServicesAddButton),"clicked",G_CALLBACK(on_startup_service_add),widgets);
g_signal_connect(G_OBJECT(widgets->StartupServicesEditButton),"clicked",G_CALLBACK(on_startup_service_edit),widgets); g_signal_connect(G_OBJECT(widgets->StartupServicesEditButton),"clicked",G_CALLBACK(on_startup_service_edit),widgets);
g_signal_connect(G_OBJECT(widgets->StartupServicesRemoveButton),"clicked",G_CALLBACK(on_startup_services_remove),widgets); g_signal_connect(G_OBJECT(widgets->StartupServicesRemoveButton),"clicked",G_CALLBACK(on_startup_services_remove),widgets);
g_signal_connect(G_OBJECT(widgets->StartupChosenCell),"toggled",G_CALLBACK(on_srartup_services_toggled),widgets);
g_signal_connect(G_OBJECT(widgets->StartupAppsTree),"cursor-changed",G_CALLBACK(on_startup_apps_selection_changed),widgets); g_signal_connect(G_OBJECT(widgets->StartupAppsTree),"cursor-changed",G_CALLBACK(on_startup_apps_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->StartupAppsAddButton),"clicked",G_CALLBACK(on_startup_app_add),widgets); g_signal_connect(G_OBJECT(widgets->StartupAppsAddButton),"clicked",G_CALLBACK(on_startup_app_add),widgets);
g_signal_connect(G_OBJECT(widgets->StartupAppsEditButton),"clicked",G_CALLBACK(on_startup_app_edit),widgets); g_signal_connect(G_OBJECT(widgets->StartupAppsEditButton),"clicked",G_CALLBACK(on_startup_app_edit),widgets);
g_signal_connect(G_OBJECT(widgets->StartupAppsRemoveButton),"clicked",G_CALLBACK(on_startup_apps_remove),widgets); g_signal_connect(G_OBJECT(widgets->StartupAppsRemoveButton),"clicked",G_CALLBACK(on_startup_apps_remove),widgets);
g_signal_connect(G_OBJECT(widgets->StartupAppsChosenCell),"toggled",G_CALLBACK(on_srartup_services_toggled),widgets);
g_signal_connect(G_OBJECT(widgets->AutoHostnameCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),widgets->HotnameEntry); g_signal_connect(G_OBJECT(widgets->AutoHostnameCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),widgets->HotnameEntry);
yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->NextInstallationFormatRevealer),GTK_SWITCH(widgets->NextInstallationFormatSwitch)); yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->NextInstallationFormatRevealer),GTK_SWITCH(widgets->NextInstallationFormatSwitch));
yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->SameInstallationFormatRevealer),GTK_SWITCH(widgets->SameInstallationFormatSwitch)); yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->SameInstallationFormatRevealer),GTK_SWITCH(widgets->SameInstallationFormatSwitch));
yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->OSRevealer),GTK_SWITCH(widgets->OSFormatSwitch));
yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->UserdataRevealer),GTK_SWITCH(widgets->UserdataFormatSwitch)); yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->UserdataRevealer),GTK_SWITCH(widgets->UserdataFormatSwitch));
g_signal_connect(G_OBJECT(widgets->OSGpartedButton),"clicked",G_CALLBACK(on_gparted_open),NULL);
g_signal_connect(G_OBJECT(widgets->OSUpdateGpartedButton),"clicked",G_CALLBACK(on_gparted_update),widgets);
g_signal_connect(G_OBJECT(widgets->OSDevicesTree),"cursor-changed",G_CALLBACK(on_device_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->OSFormatEncryptionCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->OSFormatEncryptionEntry);
g_signal_connect(G_OBJECT(widgets->OSFormatEncryptionCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->OSFormatEncryptionButton);
g_signal_connect(G_OBJECT(widgets->OSFormatEncryptionButton),"clicked",G_CALLBACK(yon_os_password_open),widgets);
yon_gtk_revealer_set_from_switch(GTK_REVEALER(widgets->OSRevealer),GTK_SWITCH(widgets->OSFormatSwitch));
g_signal_connect(G_OBJECT(widgets->UserdataFormatEncryptionCombo),"changed",G_CALLBACK(yon_gtk_widget_set_sensitive_from_combo_box),widgets->UserdataFormatEncryptionButton);
g_signal_connect(G_OBJECT(widgets->UserdataFormatEncryptionButton),"clicked",G_CALLBACK(yon_userdata_password_open),widgets);
g_signal_connect(G_OBJECT(widgets->PacmanSoftwareAllCell),"toggled",G_CALLBACK(on_pacman_software_all_toggled),widgets); g_signal_connect(G_OBJECT(widgets->PacmanSoftwareAllCell),"toggled",G_CALLBACK(on_pacman_software_all_toggled),widgets);
g_signal_connect(G_OBJECT(widgets->PacmanSoftwareChosenCell),"toggled",G_CALLBACK(on_pacman_software_chosen_toggled),widgets); g_signal_connect(G_OBJECT(widgets->PacmanSoftwareChosenCell),"toggled",G_CALLBACK(on_pacman_software_chosen_toggled),widgets);
g_signal_connect(G_OBJECT(widgets->PacmanSoftwareSearchEntry),"icon-press",G_CALLBACK(on_pacman_icon_press),widgets); g_signal_connect(G_OBJECT(widgets->PacmanSoftwareSearchEntry),"icon-press",G_CALLBACK(on_pacman_icon_press),widgets);
@ -1036,17 +905,40 @@ void yon_main_window_create(main_window *widgets){
g_signal_connect(G_OBJECT(widgets->AboutMenuItem),"activate",G_CALLBACK(yon_on_about),NULL); g_signal_connect(G_OBJECT(widgets->AboutMenuItem),"activate",G_CALLBACK(yon_on_about),NULL);
g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),WIKI_LINK); g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),WIKI_LINK);
}
yon_window_config_setup(GTK_WINDOW(widgets->MainWindow));
int fullscreen = 0;
char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL);
if (access(path,F_OK)){
fullscreen = 1;
g_thread_new("fullscreen",(GThreadFunc)yon_maximize,widgets);
}
yon_window_config_load(path);
yon_window_config_add_instant_parameter("fullscreen","window",&fullscreen,YON_TYPE_BOOLEAN);
yon_startup_language_init();
yon_locale_init();
yon_main_window_update_locale(widgets);
yon_gtk_window_setup(GTK_WINDOW(widgets->MainWindow),NULL,TITLE_LABEL,icon_path,NULL); yon_gtk_window_setup(GTK_WINDOW(widgets->MainWindow),NULL,TITLE_LABEL,icon_path,NULL);
gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter),(GtkTreeModelFilterVisibleFunc)on_country_filter,widgets,NULL); gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(widgets->InstallerCountryFilter),(GtkTreeModelFilterVisibleFunc)on_country_filter,widgets,NULL);
gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(widgets->LanguagesTree),(GtkTreeViewSearchEqualFunc)on_languages_search_func,widgets,NULL);
gtk_overlay_add_overlay(GTK_OVERLAY(widgets->RegionMapOverlay),widgets->TimeZoneMapOverlayBox);
gtk_overlay_set_overlay_pass_through(GTK_OVERLAY(widgets->RegionMapOverlay),widgets->TimeZoneMapOverlayBox,1);
gtk_widget_hide(widgets->TimeZoneMapOverlayBox);
{ {
widgets->EnableRDPMenuItem = gtk_menu_item_new(); widgets->EnableRDPMenuItem = gtk_menu_item_new();
GtkWidget *Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5); GtkWidget *Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
GtkWidget *Label = gtk_label_new(ENABLE_RDP_LABEL); GtkWidget *Label = gtk_label_new(ENABLE_RDP_LABEL);
GtkWidget *Check = gtk_check_button_new(); GtkWidget *Check = gtk_check_button_new();
gtk_box_pack_start(GTK_BOX(Box),Label,0,0,0);
gtk_box_pack_start(GTK_BOX(Box),Check,0,0,0); gtk_box_pack_start(GTK_BOX(Box),Check,0,0,0);
gtk_box_pack_start(GTK_BOX(Box),Label,0,0,0);
gtk_container_add(GTK_CONTAINER(widgets->EnableRDPMenuItem),Box); gtk_container_add(GTK_CONTAINER(widgets->EnableRDPMenuItem),Box);
g_signal_connect(G_OBJECT(widgets->EnableRDPMenuItem),"activate",G_CALLBACK(on_rdp_toggled),widgets); g_signal_connect(G_OBJECT(widgets->EnableRDPMenuItem),"activate",G_CALLBACK(on_rdp_toggled),widgets);
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->EnableRDPMenuItem),"menuitemmiddle"); gtk_style_context_add_class(gtk_widget_get_style_context(widgets->EnableRDPMenuItem),"menuitemmiddle");
@ -1058,8 +950,8 @@ void yon_main_window_create(main_window *widgets){
GtkWidget *Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5); GtkWidget *Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
GtkWidget *Label = gtk_label_new(ENABLE_VNC_LABEL); GtkWidget *Label = gtk_label_new(ENABLE_VNC_LABEL);
GtkWidget *Check = gtk_check_button_new(); GtkWidget *Check = gtk_check_button_new();
gtk_box_pack_start(GTK_BOX(Box),Label,0,0,0);
gtk_box_pack_start(GTK_BOX(Box),Check,0,0,0); gtk_box_pack_start(GTK_BOX(Box),Check,0,0,0);
gtk_box_pack_start(GTK_BOX(Box),Label,0,0,0);
gtk_container_add(GTK_CONTAINER(widgets->EnableVNCMenuItem),Box); gtk_container_add(GTK_CONTAINER(widgets->EnableVNCMenuItem),Box);
g_signal_connect(G_OBJECT(widgets->EnableVNCMenuItem),"activate",G_CALLBACK(on_vnc_toggled),widgets); g_signal_connect(G_OBJECT(widgets->EnableVNCMenuItem),"activate",G_CALLBACK(on_vnc_toggled),widgets);
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->EnableVNCMenuItem),"menuitemmiddle"); gtk_style_context_add_class(gtk_widget_get_style_context(widgets->EnableVNCMenuItem),"menuitemmiddle");
@ -1071,8 +963,8 @@ void yon_main_window_create(main_window *widgets){
GtkWidget *Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5); GtkWidget *Box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
GtkWidget *Label = gtk_label_new(CONFIGURATION_MODE_LABEL); GtkWidget *Label = gtk_label_new(CONFIGURATION_MODE_LABEL);
GtkWidget *Check = gtk_check_button_new(); GtkWidget *Check = gtk_check_button_new();
gtk_box_pack_start(GTK_BOX(Box),Label,0,0,0);
gtk_box_pack_start(GTK_BOX(Box),Check,0,0,0); gtk_box_pack_start(GTK_BOX(Box),Check,0,0,0);
gtk_box_pack_start(GTK_BOX(Box),Label,0,0,0);
gtk_container_add(GTK_CONTAINER(widgets->ConfigurationModeMenuItem),Box); gtk_container_add(GTK_CONTAINER(widgets->ConfigurationModeMenuItem),Box);
g_signal_connect(G_OBJECT(widgets->ConfigurationModeMenuItem),"activate",G_CALLBACK(on_configuration_mode_switch),widgets); g_signal_connect(G_OBJECT(widgets->ConfigurationModeMenuItem),"activate",G_CALLBACK(on_configuration_mode_switch),widgets);
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->ConfigurationModeMenuItem),"menuitemmiddle"); gtk_style_context_add_class(gtk_widget_get_style_context(widgets->ConfigurationModeMenuItem),"menuitemmiddle");
@ -1084,27 +976,10 @@ void yon_main_window_create(main_window *widgets){
if (main_config.lock_load_global == 1){ if (main_config.lock_load_global == 1){
gtk_widget_set_sensitive(widgets->LoadGlobalConfigurationMenuItem,0); gtk_widget_set_sensitive(widgets->LoadGlobalConfigurationMenuItem,0);
} }
if (getuid()){
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widgets->ConfigurationModeMenuItem),1);
}
gtk_window_set_title(GTK_WINDOW(widgets->MainWindow),TITLE_LABEL); gtk_window_set_title(GTK_WINDOW(widgets->MainWindow),TITLE_LABEL);
gtk_window_set_icon_name(GTK_WINDOW(widgets->MainWindow),icon_path); gtk_window_set_icon_name(GTK_WINDOW(widgets->MainWindow),icon_path);
} }
{
int size;
config_str parsed = NULL;
parsed = yon_file_open(licence_path,&size);
if (size){
textdomain("ublinux-init-eula");
char *licence = yon_char_parsed_to_string(parsed,size,"");
gtk_label_set_text(GTK_LABEL(widgets->LicenceLabel),_(licence));
free(licence);
yon_char_parsed_free(parsed,size);
textdomain(LocaleName);
}
}
gtk_builder_connect_signals(builder,NULL); gtk_builder_connect_signals(builder,NULL);
if (!yon_char_is_empty(config(AUTOINSTALL_TYPE_INSTALL))){ if (!yon_char_is_empty(config(AUTOINSTALL_TYPE_INSTALL))){
gtk_widget_show(widgets->StartScenarioButton); gtk_widget_show(widgets->StartScenarioButton);
@ -1114,17 +989,25 @@ void yon_main_window_create(main_window *widgets){
} else { } else {
gtk_widget_hide(widgets->StartScenarioButton); gtk_widget_hide(widgets->StartScenarioButton);
} }
if (getuid()){
gtk_menu_item_activate(GTK_MENU_ITEM(widgets->ConfigurationModeMenuItem));
if (yon_char_is_empty(main_config.config_save_path)){
exit (1);
}
}
if (main_config.force_ini){ if (main_config.force_ini){
main_config.configure_mode=1; if (yon_configuration_path_check(main_config.config_save_path)){
g_signal_handlers_block_by_func(G_OBJECT(widgets->ConfigurationModeMenuItem),G_CALLBACK(on_configuration_mode_switch),widgets); GList *box = gtk_container_get_children(GTK_CONTAINER(widgets->ConfigurationModeMenuItem));
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(widgets->ConfigurationModeMenuItem),1); GList *children = gtk_container_get_children(GTK_CONTAINER(box->data));
gtk_widget_set_sensitive(widgets->ConfigurationModeMenuItem,0);
g_signal_handlers_unblock_by_func(G_OBJECT(widgets->ConfigurationModeMenuItem),G_CALLBACK(on_configuration_mode_switch),widgets); GtkWidget *Check = GTK_WIDGET(g_list_nth_data(children,1));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(Check),1);
yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(widgets->StatusBox),"config_mode",CONFIGURATION_MODE_STATUS_LABEL,BACKGROUND_IMAGE_INFO_TYPE); yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(widgets->StatusBox),"config_mode",CONFIGURATION_MODE_STATUS_LABEL,BACKGROUND_IMAGE_INFO_TYPE);
yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(widgets->StatusBox2),"config_mede",CONFIG_PATH_LABEL(main_config.config_save_path),BACKGROUND_IMAGE_INFO_TYPE); yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(widgets->StatusBox2),"config_mede",CONFIG_PATH_LABEL(main_config.config_save_path),BACKGROUND_IMAGE_INFO_TYPE);
} else {
exit (1);
}
} }
yon_locale_init();
set_locales_list(widgets);
} }
gboolean yon_maximize_start(main_window *widgets){ gboolean yon_maximize_start(main_window *widgets){
@ -1145,22 +1028,32 @@ void *yon_maximize(main_window *widgets){
* Функция настройки основного окна приложения. [widgets] - структура со стандартным интерфейсом. * Функция настройки основного окна приложения. [widgets] - структура со стандартным интерфейсом.
*/ */
main_window *yon_main_window_complete(){ main_window *yon_main_window_complete(){
if (main_config.force_ini){ //Check if config path exists
if (yon_configuration_path_check(main_config.config_save_path)){
{
main_config.configure_mode=1;
}
}
}
main_window *widgets=NULL; main_window *widgets=NULL;
widgets = yon_remalloc(widgets,sizeof(main_window)); widgets = malloc(sizeof(main_window));
memset(widgets,0,sizeof(main_window)); memset(widgets,0,sizeof(main_window));
yon_main_window_create(widgets); yon_main_window_create(widgets);
yon_window_config_setup(GTK_WINDOW(widgets->MainWindow));
// yon_window_config_custom_window_setup(GTK_WINDOW(widgets->MainWindow),"MainWindow"); // yon_set_locales_list(widgets);
// yon_main_window_update_locale(widgets);
// // yon_window_config_custom_window_setup(GTK_WINDOW(widgets->MainWindow),"MainWindow");
return widgets; return widgets;
} }
int main(int argc, char *argv[]){ int main(int argc, char *argv[]){
__attribute__((unused)) char *locale = setlocale(LC_ALL, ""); // __attribute__((unused)) char *locale = setlocale(LC_ALL, "en_US.UTF-8");
textdomain(LocaleName); textdomain(LocaleName);
yon_ubl_connect_config((_template_config*)&main_config);
config_init(); config_init();
config_str unfound = NULL; config_str unfound = NULL;
int size=0; int size=0;
yon_ubl_connect_config((_template_config*)&main_config);
opterr=0; opterr=0;
yon_ubl_window_init(TITLE_LABEL,"",LocaleName,CssPath,LocaleName,version_application,WIKI_LINK); yon_ubl_window_init(TITLE_LABEL,"",LocaleName,CssPath,LocaleName,version_application,WIKI_LINK);
yon_ubl_setup_arguments(argc,argv,&unfound,&size,ADDITIONAL_ARGS); yon_ubl_setup_arguments(argc,argv,&unfound,&size,ADDITIONAL_ARGS);
@ -1188,34 +1081,24 @@ int main(int argc, char *argv[]){
} }
gtk_init(&argc,&argv); gtk_init(&argc,&argv);
main_window *widgets = NULL; main_window *widgets = NULL;
if (widgets){}; GtkCssProvider *css=gtk_css_provider_new();
int fullscreen = 0; gtk_css_provider_load_from_resource(css,CssPath);
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),
GTK_STYLE_PROVIDER(css),
-1);
{
widgets = yon_main_window_complete(); widgets = yon_main_window_complete();
GtkWidget *root_button = yon_root_button_new(argv,argc); GtkWidget *root_button = yon_root_button_new(argv,argc);
gtk_style_context_add_class(gtk_widget_get_style_context(root_button),"menuitemtop"); gtk_style_context_add_class(gtk_widget_get_style_context(root_button),"menuitemtop");
gtk_menu_shell_prepend(GTK_MENU_SHELL(gtk_widget_get_parent(widgets->AboutMenuItem)),root_button); gtk_menu_shell_prepend(GTK_MENU_SHELL(gtk_widget_get_parent(widgets->AboutMenuItem)),root_button);
yon_root_button_init(root_button,GTK_WINDOW(widgets->MainWindow)); yon_root_button_init(root_button,GTK_WINDOW(widgets->MainWindow));
on_config_global_load(NULL,widgets);
char *path = yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL);
if (access(path,F_OK)){
fullscreen = 1;
g_thread_new("fullscreen",(GThreadFunc)yon_maximize,widgets);
on_config_global_load(NULL,widgets);
} }
yon_window_config_load(path);
yon_window_config_add_instant_parameter("fullscreen","window",&fullscreen,YON_TYPE_BOOLEAN);
main_config.launch_arguments=yon_char_parsed_copy(argv,argc); main_config.launch_arguments=yon_char_parsed_copy(argv,argc);
main_config.launch_size=argc; main_config.launch_size=argc;
GtkCssProvider *css=gtk_css_provider_new();
gtk_css_provider_load_from_resource(css,CssPath);
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(),
GTK_STYLE_PROVIDER(css),
-1);
if (getuid()!=0){
yon_ubl_status_box_render(yon_char_get_localised_from_lib(ROOT_WARNING_LABEL),BACKGROUND_IMAGE_FAIL_TYPE);
}
gtk_main(); gtk_main();
return 0; return 0;
} }

@ -12,7 +12,7 @@
#include <libublsettings.h> #include <libublsettings.h>
#include <libublsettings-gtk3.h> #include <libublsettings-gtk3.h>
#include <libublsettingsui-gtk3.h> #include <libublsettingsui-gtk3.h>
#ifdef WEBKIT_FOUND #ifdef WEBKIT_INCLUDE
#include <webkit2/webkit2.h> #include <webkit2/webkit2.h>
#endif #endif
#include "ubl-strings.h" #include "ubl-strings.h"
@ -39,6 +39,7 @@
#define glade_locales_path "/com/ublinux/ui/ubinstall-gtk-layouts.glade" #define glade_locales_path "/com/ublinux/ui/ubinstall-gtk-layouts.glade"
#define glade_layouts_path "/com/ublinux/ui/ubinstall-gtk-keyboard-layouts.glade" #define glade_layouts_path "/com/ublinux/ui/ubinstall-gtk-keyboard-layouts.glade"
#define glade_path_slider "/com/ublinux/ui/ubinstall-gtk-slider.glade" #define glade_path_slider "/com/ublinux/ui/ubinstall-gtk-slider.glade"
#define glade_path_package_info "/com/ublinux/ui/ubinstall-gtk-package-info.glade"
#define CssPath "/com/ublinux/css/ubinstall-gtk.css" #define CssPath "/com/ublinux/css/ubinstall-gtk.css"
#define config_path yon_char_unite(yon_ubl_user_get_home_directory(), "/.config/", LocaleName, "/", LocaleName, ".conf", NULL) #define config_path yon_char_unite(yon_ubl_user_get_home_directory(), "/.config/", LocaleName, "/", LocaleName, ".conf", NULL)
@ -142,6 +143,7 @@ layout && /description:/ {\
}\ }\
\" | sort -u\ \" | sort -u\
" "
#define ubinstall_dry_run_command "ubinstall2 --dry-run"
#define os_name_get_command "sed -En 's/^PRETTY_NAME=[\"]*([^\"]+)[\"]*/\\1/p' /etc/os-release" #define os_name_get_command "sed -En 's/^PRETTY_NAME=[\"]*([^\"]+)[\"]*/\\1/p' /etc/os-release"
#define get_keyboard_layout_change_command "grep \"grp:\" /usr/share/X11/xkb/rules/base.lst | awk '{$1=$1; sub(/^!.*$/, \"\"); if ($1 ~ /^grp:/) {opt=$1; $1=\"\"; print opt \"|\" substr($0,2)}}'" #define get_keyboard_layout_change_command "grep \"grp:\" /usr/share/X11/xkb/rules/base.lst | awk '{$1=$1; sub(/^!.*$/, \"\"); if ($1 ~ /^grp:/) {opt=$1; $1=\"\"; print opt \"|\" substr($0,2)}}'"
@ -227,7 +229,7 @@ layout && /description:/ {\
#define DOMAIN_admanger_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [network] DOMAIN[admanger]']" #define DOMAIN_admanger_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL['ubconfig set [network] DOMAIN[admanger]']"
#define USERADD_parameter_all "AUTOINSTALL[ubconfig set [users] USERADD[*]]" #define USERADD_parameter_all "AUTOINSTALL[ubconfig set [users] USERADD[*]]"
#define USERADD_parameter_search "AUTOINSTALL[ubconfig set [users] USERADD[" #define USERADD_parameter_search "AUTOINSTALL[ubconfig set [users] USERADD["
#define USERADD_parameter(target) yon_char_unite("AUTOINSTALL[ubconfig set [users] USERADD[", target, "]]", NULL) #define USERADD_parameter(target) yon_char_unite("AUTOINSTALL[ubconfig set [users] USERADD['", target, "']]", NULL)
#define USERADD_parameter_command(target) yon_char_unite("ubconfig --source global get autoinstall AUTOINSTALL['ubconfig set [users] USERADD[", target, "]']", NULL) #define USERADD_parameter_command(target) yon_char_unite("ubconfig --source global get autoinstall AUTOINSTALL['ubconfig set [users] USERADD[", target, "]']", NULL)
#define KERNEL_BOOT_parameter "AUTOINSTALL[ubconfig set [boot] KERNEL_BOOT]" #define KERNEL_BOOT_parameter "AUTOINSTALL[ubconfig set [boot] KERNEL_BOOT]"
#define KERNEL_BOOT_parameter_command "ubconfig --source global get autoinstall AUTOINSTALL['ubconfig set [boot] KERNEL_BOOT']" #define KERNEL_BOOT_parameter_command "ubconfig --source global get autoinstall AUTOINSTALL['ubconfig set [boot] KERNEL_BOOT']"
@ -254,10 +256,16 @@ layout && /description:/ {\
#define NETWORK_parameter_command(target) yon_char_unite("ubconfig get autoinstall AUTOINSTALL['ubconfig set [network] NETWORK[", target, "@connmod]']", NULL) #define NETWORK_parameter_command(target) yon_char_unite("ubconfig get autoinstall AUTOINSTALL['ubconfig set [network] NETWORK[", target, "@connmod]']", NULL)
#define NETWORK_devdown_parameter_command(target) yon_char_unite("ubconfig get autoinstall AUTOINSTALL['ubconfig set [network] NETWORK[", target, "@devdown]']", NULL) #define NETWORK_devdown_parameter_command(target) yon_char_unite("ubconfig get autoinstall AUTOINSTALL['ubconfig set [network] NETWORK[", target, "@devdown]']", NULL)
#define NETWORK(target) yon_char_unite("NETWORK[", target, "@connmod]", NULL) #define NETWORK(target) yon_char_unite("NETWORK[", target, "@connmod]", NULL)
#define installer_lang_parameter "AUTOINSTALL[installer_lang]" #define installer_locale_parameter "AUTOINSTALL[installer_locale]"
#define installer_lang_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[installer_lang]" #define installer_locale_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[installer_locale]"
#define source_parameter "AUTOINSTALL[source]" #define source_parameter "AUTOINSTALL[source]"
#define source_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[source]" #define source_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[source]"
#define finish_parameter "AUTOINSTALL[finish]"
#define finish_parameter_command "ubconfig --source global get [autoinstall] AUTOINSTALL[finish]"
#define SYSTEM_LANG_parameter "AUTOINSTALL['ubconfig set [locale] LANG']"
#define SYSTEM_LANG_parameter_command "ubconfig --source global get autoinstall AUTOINSTALL['ubconfig set [locale] LANG']"
#define get_localisation_command "ubconfig -ea --source global get [autoinstall] AUTOINSTALL[installer_locale] -- get [autoinstall] AUTOINSTALL['ubconfig set [locale] LANG'] -- get [locale] LANG"
#define save_config_command(parameters) yon_char_unite("ubconfig --target system set [autoinstall] AUTOINSTALL[log]=yes ", parameters, "; nice ubinstall2 --debug autoinstall", NULL) #define save_config_command(parameters) yon_char_unite("ubconfig --target system set [autoinstall] AUTOINSTALL[log]=yes ", parameters, "; nice ubinstall2 --debug autoinstall", NULL)
@ -280,9 +288,9 @@ layout && /description:/ {\
#define full_log_path "/var/log/ubinstall.log" #define full_log_path "/var/log/ubinstall.log"
#define config_get_command(target) yon_char_unite("ubconfig --source ", target, " --conarg get [autoinstall] AUTOINSTALL[*]", NULL) #define config_get_command(target) yon_char_unite("ubconfig -ea --conarg --source ", target, " get [autoinstall] AUTOINSTALL[*] -- get [locale] LANG", NULL)
#define config_get_default_command "ubconfig --source default --conarg get [autoinstall] AUTOINSTALL[*]" #define config_get_default_command "ubconfig -ea --conarg --source default get [autoinstall] AUTOINSTALL[*] -- get [locale] LANG"
#define config_get_global_only_parameters "" #define config_get_global_only_parameters ""
#define config_get_local_only_parameters "" #define config_get_local_only_parameters ""
@ -293,7 +301,7 @@ layout && /description:/ {\
#define languages_command "while IFS= read -ru3 SELECT_LOCALE; do SELECT_LOCALE=\"${SELECT_LOCALE% *}\"; [[ $(< /usr/share/i18n/locales/${SELECT_LOCALE%.*}) =~ (\"language\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"territory\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"country_name\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"lang_name\"[[:blank:]]*\\\"([^\\\"]*)\\\")|(\"language\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"territory\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"lang_name\"[[:blank:]]*\\\"([^\\\"]*)\\\")|(\"language\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"territory\"[[:blank:]]*\\\"([^\\\"]*)\\\") ]] && echo \"${SELECT_LOCALE}|${BASH_REMATCH[2]}${BASH_REMATCH[7]}${BASH_REMATCH[11]}${BASH_REMATCH[5]:+ (${BASH_REMATCH[5]})}${BASH_REMATCH[9]:+ (${BASH_REMATCH[9]})}|${BASH_REMATCH[3]}${BASH_REMATCH[8]}${BASH_REMATCH[12]}${BASH_REMATCH[4]:+ (${BASH_REMATCH[4]})}\" || echo \"${SELECT_LOCALE}\"; done 3< \"/usr/share/i18n/SUPPORTED\"" #define languages_command "while IFS= read -ru3 SELECT_LOCALE; do SELECT_LOCALE=\"${SELECT_LOCALE% *}\"; [[ $(< /usr/share/i18n/locales/${SELECT_LOCALE%.*}) =~ (\"language\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"territory\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"country_name\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"lang_name\"[[:blank:]]*\\\"([^\\\"]*)\\\")|(\"language\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"territory\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"lang_name\"[[:blank:]]*\\\"([^\\\"]*)\\\")|(\"language\"[[:blank:]]*\\\"([^\\\"]*)\\\".*\"territory\"[[:blank:]]*\\\"([^\\\"]*)\\\") ]] && echo \"${SELECT_LOCALE}|${BASH_REMATCH[2]}${BASH_REMATCH[7]}${BASH_REMATCH[11]}${BASH_REMATCH[5]:+ (${BASH_REMATCH[5]})}${BASH_REMATCH[9]:+ (${BASH_REMATCH[9]})}|${BASH_REMATCH[3]}${BASH_REMATCH[8]}${BASH_REMATCH[12]}${BASH_REMATCH[4]:+ (${BASH_REMATCH[4]})}\" || echo \"${SELECT_LOCALE}\"; done 3< \"/usr/share/i18n/SUPPORTED\""
#define get_package_info_command(target) yon_char_append("pacman -Si ", target) #define get_package_info_command(target) yon_char_unite("pacman -Si ", target,"| sed 's/ */ /g'",NULL)
#define layouts_command "sed -En '/^! layout$/,/^ *$/!d;s/[[:blank:]]+([^ ]+)[[:blank:]]+(.*)/\\1|\\2/p' /usr/share/X11/xkb/rules/evdev.lst" #define layouts_command "sed -En '/^! layout$/,/^ *$/!d;s/[[:blank:]]+([^ ]+)[[:blank:]]+(.*)/\\1|\\2/p' /usr/share/X11/xkb/rules/evdev.lst"
#define layouts_variant_command "sed -En '/^! variant$/,/^ *$/!d;s/[[:blank:]]+([^ ]+)[[:blank:]]+([^ :]+):[[:blank:]]+(.*)/\\2|\\1|\\3/p' /usr/share/X11/xkb/rules/evdev.lst" #define layouts_variant_command "sed -En '/^! variant$/,/^ *$/!d;s/[[:blank:]]+([^ ]+)[[:blank:]]+([^ :]+):[[:blank:]]+(.*)/\\2|\\1|\\3/p' /usr/share/X11/xkb/rules/evdev.lst"
@ -490,8 +498,21 @@ typedef struct
GtkListStore *InstallerLanguageList; GtkListStore *InstallerLanguageList;
GtkTreeModel *InstallerCountryFilter; GtkTreeModel *InstallerCountryFilter;
// GtkWidget *LanguageCombo; // GtkWidget *LanguageCombo;
GtkWidget *RegionMapBox;
GtkWidget *RegionMapOverlay;
GtkWidget *RegionMapTarget;
GtkWidget *TimeZoneMapOverlayBox;
GtkWidget *TimeZoneMapOverlayImage;
GtkWidget *TimeZoneMapOverlayTitleLabel;
GtkWidget *TimeZoneMapOverlayInfoLabel;
GtkWidget *RegionSensitiveSwitch;
GtkWidget *RegionCombo; GtkWidget *RegionCombo;
GtkWidget *ZoneCombo; GtkWidget *ZoneCombo;
GtkWidget *RegionEntry;
GtkListStore *RegionTimezoneCompletionList;
GtkTreeModelFilter *RegionTimezoneCompletionFilter;
GtkWidget *InstallationRadio; GtkWidget *InstallationRadio;
GtkWidget *InstallationNearRadio; GtkWidget *InstallationNearRadio;
@ -612,6 +633,7 @@ typedef struct
GtkWidget *OSFormatFSMarkEntry; GtkWidget *OSFormatFSMarkEntry;
GtkWidget *OSFormatEncryptionCombo; GtkWidget *OSFormatEncryptionCombo;
GtkWidget *OSFormatEncryptionEntry; GtkWidget *OSFormatEncryptionEntry;
GtkWidget *OSFormatEncryptionButton;
GtkWidget *OSSpinner; GtkWidget *OSSpinner;
GtkWidget *OSOverlay; GtkWidget *OSOverlay;
@ -628,11 +650,11 @@ typedef struct
GtkWidget *UserdataFormatFSMarkEntry; GtkWidget *UserdataFormatFSMarkEntry;
GtkWidget *UserdataFormatEncryptionCombo; GtkWidget *UserdataFormatEncryptionCombo;
GtkWidget *UserdataFormatEncryptionEntry; GtkWidget *UserdataFormatEncryptionEntry;
GtkWidget *UserdataFormatEncryptionButton;
GtkTreeModel *LanguagesFilter; GtkTreeModel *LanguagesFilter;
GtkTreeModel *LayoutsFilter; GtkTreeModel *LayoutsFilter;
GtkWidget *RegionSensitiveSwitch;
GtkWidget *HostnameSensitiveSwitch; GtkWidget *HostnameSensitiveSwitch;
GtkWidget *KernelListBox; GtkWidget *KernelListBox;
@ -744,6 +766,7 @@ typedef struct
GtkWidget *PackagesTree; GtkWidget *PackagesTree;
// Configuration hub slide section // Configuration hub slide section
GtkWidget *ConfigHubRebootCombo;
GtkWidget *HubPersonalListBox; GtkWidget *HubPersonalListBox;
GtkWidget *HubSystemListBox; GtkWidget *HubSystemListBox;
GtkWidget *HubPackagesListBox; GtkWidget *HubPackagesListBox;
@ -772,7 +795,7 @@ typedef struct
GtkWidget *SystemSectionToggle; GtkWidget *SystemSectionToggle;
GtkWidget *UserDataSectionToggle; GtkWidget *UserDataSectionToggle;
GtkWidget *RemoveButton; GtkWidget *RemoveButton;
GtkWidget *FormatSwitch; GtkWidget *FormatCombo;
GtkWidget *FormatRevealer; GtkWidget *FormatRevealer;
GtkWidget *SizeSpin; GtkWidget *SizeSpin;
GtkWidget *SizeCombo; GtkWidget *SizeCombo;
@ -1025,13 +1048,7 @@ typedef struct
GtkWidget *CancelButton; GtkWidget *CancelButton;
GtkWidget *AcceptButton; GtkWidget *AcceptButton;
GtkWidget *AutoSwitch; GtkWidget *AutoSwitch;
GtkWidget *TypeCombo;
GtkWidget *PathEntry;
GtkWidget *DeviceCombo;
GtkWidget *PathButton;
GtkWidget *AddButton;
GtkWidget *AddBox; GtkWidget *AddBox;
dictionary *sources;
} source_window; } source_window;
typedef struct typedef struct
@ -1042,6 +1059,7 @@ typedef struct
GtkWidget *DeviceCombo; GtkWidget *DeviceCombo;
GtkWidget *PathButton; GtkWidget *PathButton;
GtkWidget *RemoveButton; GtkWidget *RemoveButton;
GtkWidget *AddButton;
} source_element; } source_element;
@ -1093,6 +1111,8 @@ typedef struct
GtkCellRenderer *ToggleCell; GtkCellRenderer *ToggleCell;
GtkListStore *LanguagesList; GtkListStore *LanguagesList;
char *languages;
} language_window; } language_window;
struct locales_struct struct locales_struct
@ -1163,6 +1183,7 @@ gboolean on_install_error(main_window *widgets);
void on_reboot_accepted(main_window *widgets); void on_reboot_accepted(main_window *widgets);
int yon_configuration_path_check(const char *path);
void on_keyboard_clicked(GtkWidget *, main_window *widgets); void on_keyboard_clicked(GtkWidget *, main_window *widgets);
void on_keyboard_accept(GtkWidget *self, main_window *widgets); void on_keyboard_accept(GtkWidget *self, main_window *widgets);
void on_layout_toggle(GtkCellRendererToggle *, gchar *path, ubinstall_keyboard_window *window); void on_layout_toggle(GtkCellRendererToggle *, gchar *path, ubinstall_keyboard_window *window);
@ -1178,6 +1199,9 @@ void on_partition_changed(GtkWidget *self, main_window *widgets);
void yon_set_max_size_from_partition(GtkTreeView *table, GtkSpinButton *spin_size, GtkComboBox *size_type); void yon_set_max_size_from_partition(GtkTreeView *table, GtkSpinButton *spin_size, GtkComboBox *size_type);
gboolean on_yon_exit(GtkWidget *, GdkEvent *, main_window *widgets); gboolean on_yon_exit(GtkWidget *, GdkEvent *, main_window *widgets);
void on_locale_changed(GtkWidget *, main_window *); void on_locale_changed(GtkWidget *, main_window *);
#ifdef TIMEZONEMAP_INCLUDE
void on_zone_changed(GtkWidget *, main_window *widgets);
#endif
void on_region_changed(GtkComboBox *self, main_window *widgets); void on_region_changed(GtkComboBox *self, main_window *widgets);
void on_page_cancel_clicked(GtkWidget *, main_window *widgets); void on_page_cancel_clicked(GtkWidget *, main_window *widgets);
int yon_install_options_save(GtkWidget *device_tree, GtkWidget *part_tree, char *mode, main_window *widgets); int yon_install_options_save(GtkWidget *device_tree, GtkWidget *part_tree, char *mode, main_window *widgets);
@ -1276,7 +1300,7 @@ void yon_kernel_resize(main_window *widgets);
void yon_kernel_addon_setup(main_window *widgets); void yon_kernel_addon_setup(main_window *widgets);
void yon_kernel_addon_resize(main_window *widgets); void yon_kernel_addon_resize(main_window *widgets);
void yon_startup_services_setup(main_window *widgets); void yon_startup_services_setup(main_window *widgets);
void on_srartup_services_toggled(GtkWidget *, char *path, main_window *widgets); void on_srartup_services_toggled(GtkCellRenderer *, char *path, main_window *widgets);
void on_startup_service_edit(GtkWidget *, main_window *widgets); void on_startup_service_edit(GtkWidget *, main_window *widgets);
void on_startup_service_add(GtkWidget *, main_window *widgets); void on_startup_service_add(GtkWidget *, main_window *widgets);
startup_service_window *yon_startup_service_window_new(); startup_service_window *yon_startup_service_window_new();
@ -1333,16 +1357,14 @@ void on_source_accept(GtkWidget *, source_window *window);
void on_source_choose(GtkWidget *self); void on_source_choose(GtkWidget *self);
void on_source_remove(GtkWidget *, source_element *element); void on_source_remove(GtkWidget *, source_element *element);
void on_source_add(GtkWidget *, source_window *window); void on_source_add(GtkWidget *, source_window *window);
void yon_source_update(source_window *window);
void yon_source_element_add(char *key, void *, source_window *window); void yon_source_element_add(char *key, void *, source_window *window);
source_element *yon_source_element_new(); source_element *yon_source_element_new();
void on_rdp_toggled(GtkWidget *self, main_window *); void on_rdp_toggled(GtkWidget *self, main_window *);
void on_vnc_toggled(GtkWidget *self, main_window *widgets); void on_vnc_toggled(GtkWidget *self, main_window *widgets);
void yon_main_window_create(main_window *widgets); void yon_main_window_create(main_window *widgets);
void set_locales_list(main_window *widgets); void yon_set_locales_list(main_window *widgets);
void on_installer_language_changed(GtkWidget *self, GtkTreePath *, GtkTreeViewColumn *, main_window *widgets); void on_installer_language_changed(GtkWidget *self, GtkTreePath *, GtkTreeViewColumn *, main_window *widgets);
gboolean on_country_filter(GtkTreeModel *self, GtkTreeIter *iter, main_window *widgets); gboolean on_country_filter(GtkTreeModel *self, GtkTreeIter *iter, main_window *widgets);
int yon_char_parsed_compare(const void *a, const void *b);
gboolean yon_os_component_insert(struct row_data *row_input); gboolean yon_os_component_insert(struct row_data *row_input);
void *yon_os_components_setup(main_window *widgets); void *yon_os_components_setup(main_window *widgets);
gboolean yon_spinner_switch_off(GtkSpinner *target); gboolean yon_spinner_switch_off(GtkSpinner *target);
@ -1367,7 +1389,7 @@ int yon_advanced_section_get_by_part(advanced_partition *part);
void yon_advanced_section_remove_by_name(char *part); void yon_advanced_section_remove_by_name(char *part);
void on_advanced_virtual_device_changed(GtkWidget *, main_window *widgets); void on_advanced_virtual_device_changed(GtkWidget *, main_window *widgets);
int yon_advanced_section_append(advanced_section *section); int yon_advanced_section_append(advanced_section *section);
gboolean on_format_changed(GtkWidget *self, gboolean state, advanced_partition *part); void on_format_changed(GtkWidget *self, advanced_partition *part);
int yon_layouts_get(); int yon_layouts_get();
void on_link(GtkWidget *self, char *uri, gpointer); void on_link(GtkWidget *self, char *uri, gpointer);
void on_source_changed(GtkComboBox *self); void on_source_changed(GtkComboBox *self);
@ -1449,3 +1471,27 @@ yon_menu_item *yon_menu_add_item(yon_menu_window *target_menu,const char *id, co
void yon_menu_ungrab(yon_menu_window *window); void yon_menu_ungrab(yon_menu_window *window);
void on_menu_chosen(GtkWidget *, GtkListBoxRow* row, yon_menu_window *window); void on_menu_chosen(GtkWidget *, GtkListBoxRow* row, yon_menu_window *window);
gboolean yon_locale_window_load(language_window *window); gboolean yon_locale_window_load(language_window *window);
void yon_os_password_open(GtkWidget *, main_window *widgets);
void yon_userdata_password_open(GtkWidget *, main_window *widgets);
double yon_password_check_func(yon_password_window *window, const char *password_string);
void yon_source_update(source_window *window);
void yon_main_window_update_locale(main_window *widgets);
gboolean yon_progress_bar_start(main_window *widgets);
void *yon_progress_file_buzyfy(void*);
void yon_startup_language_init();
gboolean on_languages_search_func(GtkTreeModel *model, gint col,const char *key, GtkTreeIter *iter, main_window *widgets);
void yon_update_translation(main_window *widgets);
void yon_translation_init(GtkBuilder *builder);
void yon_licence_load(main_window *widgets);
void on_network_removed(GtkWidget *,network_info *info);
char *yon_bootloader_get_os_name(char *parameter);
gboolean on_region_refilter(GtkTreeModel* model, GtkTreeIter* iter, main_window *widgets);
void on_region_entry_changed(GtkWidget *, main_window *widgets);
char *yon_size_get_name_from_letter(char letter);
void yon_map_status_hide(main_window *widgets);
gboolean yon_map_status_hide_timeout(main_window *widgets);
void yon_map_status_show(main_window *widgets, char *icon_name, char *title, char *title_info);
gboolean on_map_box_ckicked_skip();
gboolean on_time_zone_status_hover(GtkWidget *, GdkEvent *, main_window *widgets);
gboolean on_time_zone_status_hover_end(GtkWidget *, GdkEvent *, main_window *widgets);
void yon_map_update(main_window *widgets, const char *timezone);

@ -4,17 +4,13 @@
#define WELCOME_BOTTOM_LABEL _("This program will ask you few questions\nand help you install system on your computer") #define WELCOME_BOTTOM_LABEL _("This program will ask you few questions\nand help you install system on your computer")
#define OPEN_LABEL _("Open")
#define ADDITIONAL_ARGS yon_char_unite(\ #define ADDITIONAL_ARGS yon_char_unite(\
" --dry-run ",_("Dry run; Installation will not start"),"\n",\ " --dry-run ",_("Dry run; Installation will not start"),"\n",\
" --ini <PATH> ", _("Set ini file for configuration mode"),\ " --ini <PATH> ", _("Set ini file for configuration mode"),\
NULL) NULL)
#define KEYBOARD_TITLE_LABEL _("Keyboard layout") #define KEYBOARD_TITLE_LABEL _("Keyboard layout")
#define CUSTOM_CONFIG_CREATION_ERROR_LABEL _("New configuration file creation failed")
#define CANCEL_LABEL _("Cancel")
#define BACK_LABEL _("Back") #define BACK_LABEL _("Back")
#define NEXT_LABEL _("Next") #define NEXT_LABEL _("Next")
#define ROOT_ONLY_LABEL _("Root only") #define ROOT_ONLY_LABEL _("Root only")
@ -47,7 +43,7 @@ NULL)
#define ACCOUNT_NAME_LABEL _("Administrator name:") #define ACCOUNT_NAME_LABEL _("Administrator name:")
#define LOGIN__LABEL _("Administrator login:") #define LOGIN__LABEL _("Administrator login:")
#define PASSWORD__LABEL _("Administrator password:") #define PASSWORD__LABEL _("Administrator password:")
#define DEFAULT_LABEL _("Default") // #define DEFAULT_LABEL _("Default")
#define SET_PASSWORD_LABEL _("Set a password") #define SET_PASSWORD_LABEL _("Set a password")
#define DO_NOT_SET_PASSWORD_LABEL _("Do no set a password") #define DO_NOT_SET_PASSWORD_LABEL _("Do no set a password")
#define AUTOMATIC_LOGIN_LABEL _("Automatic login without password prompt") #define AUTOMATIC_LOGIN_LABEL _("Automatic login without password prompt")
@ -66,6 +62,7 @@ NULL)
#define TB_LABEL _("Tb") #define TB_LABEL _("Tb")
#define GB_LABEL _("Gb") #define GB_LABEL _("Gb")
#define MB_LABEL _("Mb") #define MB_LABEL _("Mb")
#define KB_LABEL _("Kb")
#define AVALIABLE_LANGUAGES_LABEL _("Available languages in the system:") #define AVALIABLE_LANGUAGES_LABEL _("Available languages in the system:")
#define AVALIABLE_LANGUAGES_TITLE_LABEL _("Available languages in the system") #define AVALIABLE_LANGUAGES_TITLE_LABEL _("Available languages in the system")
@ -78,13 +75,13 @@ NULL)
#define ADVANCED_INSTALLATION_LABEL _("Installing OS files, user data on different partitions, creating RAID, etc.") #define ADVANCED_INSTALLATION_LABEL _("Installing OS files, user data on different partitions, creating RAID, etc.")
#define ADVANCED_INSTALLATION_ATTENTION_LABEL _("Attention! The selected system components will be installed\nseparately into the selected partition.") #define ADVANCED_INSTALLATION_ATTENTION_LABEL _("Attention! The selected system components will be installed\nseparately into the selected partition.")
#define GRUB_INSTALL_HEAD_LABEL _("GRUB install") #define GRUB_INSTALL_HEAD_LABEL _("GRUB install")
#define GRUB_INSTALL_LABEL _("Install the GRUB bootloader") #define GRUB_INSTALL_LABEL _("Installing the GRUB bootloader into the MBR or EFI partition")
#define GRUB_UPDATE_HEAD_LABEL _("GRUB update") #define GRUB_UPDATE_HEAD_LABEL _("GRUB update")
#define GRUN_UPDATE_LABEL _("Update (reinstall) the GRUB bootloader") #define GRUN_UPDATE_LABEL _("Update (reinstall) the GRUB bootloader")
#define SEPARATE_INSTALL_HEAD_LABEL _("Separate installation") #define SEPARATE_INSTALL_HEAD_LABEL _("Separate installation")
#define SEPARATE_INSTALL_LABEL _("Installing OS components and user data on different disk partitions") #define SEPARATE_INSTALL_LABEL _("Installing OS components and user data on different disk partitions")
#define OS_ONLY_HEAD_LABEL _("OS only") #define OS_ONLY_HEAD_LABEL _("System restore")
#define OS_ONLY_LABEL _("Installing only OS components without user data") #define OS_ONLY_LABEL _("Restore missing or corrupted system files. Users data is not affected")
#define USER_DATA_HEAD_LABEL _("User data only") #define USER_DATA_HEAD_LABEL _("User data only")
#define USER_DATA_LABEL _("Installing only user data without OS components") #define USER_DATA_LABEL _("Installing only user data without OS components")
@ -103,6 +100,8 @@ NULL)
#define RESTART_LABEL _("Restart PC") #define RESTART_LABEL _("Restart PC")
#define CHOOSE_LABEL _("Choose file system type for the section:") #define CHOOSE_LABEL _("Choose file system type for the section:")
#define SECTION_NAME_LABEL _("Section name:") #define SECTION_NAME_LABEL _("Section name:")
#define DO_NOT_FORMAT_LABEL _("Do not format")
#define AUTOMATIC_FORMAT_LABEL _("Format automatically")
#define FORMAT_LABEL _("Format") #define FORMAT_LABEL _("Format")
#define INSTALL_SUCCESS_LABEL _("You have system installed on your computer.\nYou can reboot and use your new system\nor continue working in the system Live environment.") #define INSTALL_SUCCESS_LABEL _("You have system installed on your computer.\nYou can reboot and use your new system\nor continue working in the system Live environment.")
@ -123,13 +122,13 @@ NULL)
#define INSTALL_BEGIN_HEADER_LABEL _("Installation configuration has ended") #define INSTALL_BEGIN_HEADER_LABEL _("Installation configuration has ended")
#define INSTALL_BEGIN_LABEL _("System installation is about to begin") #define INSTALL_BEGIN_LABEL _("System installation is about to begin")
#define DOCUMENTATION_LABEL _("Documentation")
#define ABOUT_LABEL _("About")
#define DOCUMENTATION_QUESTION_LABEL _("Would you like to read documentation in the Web?") #define DOCUMENTATION_QUESTION_LABEL _("Would you like to read documentation in the Web?")
#define DOCUMENTATION_HEAD_LABEL _("You will be redirected to documentation website where documentation is\ntranslated and supported by community.") #define DOCUMENTATION_HEAD_LABEL _("You will be redirected to documentation website where documentation is\ntranslated and supported by community.")
#define DOCUMENTATION_CHECK_LABEL _("Always redirect to online documentation") #define DOCUMENTATION_CHECK_LABEL _("Always redirect to online documentation")
#define OPEN_DOCUMENTATION_LABEL _("Open documentation") #define OPEN_DOCUMENTATION_LABEL _("Open documentation")
#define ABOUT_LABEL yon_char_get_localised_from_lib("About")
#define DOCUMENTATION_LABEL yon_char_get_localised_from_lib("Documentation")
#define INSTALLATION_ERROR _("Installation error") #define INSTALLATION_ERROR _("Installation error")
#define ATTENTION_NEXT_LABEL _("Attention! The system will be installed on the selected partition with OS already installed. All user data will be saved.") #define ATTENTION_NEXT_LABEL _("Attention! The system will be installed on the selected partition with OS already installed. All user data will be saved.")
@ -143,18 +142,6 @@ NULL)
#define ERROR_LABEL _("Error has occured while installation process") #define ERROR_LABEL _("Error has occured while installation process")
#define LOG_VIEW_LABEL _("Log exploration") #define LOG_VIEW_LABEL _("Log exploration")
#define SAVE_LABEL _("Save")
#define LOAD_LABEL _("Load")
#define LOAD_GLOBAL_LABEL _("Load global configuration")
#define LOAD_LOCAL_LABEL _("Load local configuration")
#define LOAD_CUSTOM_LABEL _("Load from specific file")
#define SAVE_ALL_LABEL _("Save configuration")
#define SAVE_GLOBAL_LABEL _("Save to global configuration")
#define SAVE_LOCAL_LABEL _("Save to local configuration")
#define SAVE_CUSTOM_LABEL _("Save to specific file")
#define CONFIGURATION_TITLE_LABEL _("Configuration") #define CONFIGURATION_TITLE_LABEL _("Configuration")
#define CONFIGURATION_FINISH_HEAD_LABEL _("Installer configuration has been finished") #define CONFIGURATION_FINISH_HEAD_LABEL _("Installer configuration has been finished")
@ -206,6 +193,9 @@ NULL)
#define SERVICE_ADD_TITLE_LABEL _("Add service") #define SERVICE_ADD_TITLE_LABEL _("Add service")
#define SERVICE_EDIT_TITLE_LABEL _("Edit service") #define SERVICE_EDIT_TITLE_LABEL _("Edit service")
#define SERVICE_REMOVE_TITLE_LABEL _("Remove service") #define SERVICE_REMOVE_TITLE_LABEL _("Remove service")
#define APPLICATIONS_ADD_TITLE_LABEL _("Add application")
#define APPLICATIONS_EDIT_TITLE_LABEL _("Edit application")
#define APPLICATIONS_REMOVE_TITLE_LABEL _("Remove application")
#define BOOTLOADER_USER_EXIST_LABEL(target) yon_char_unite(_("User")," <b>", target,"</b> ", _("is already exists. Do you really want to save user")," <b>",target,"</b>?",NULL) #define BOOTLOADER_USER_EXIST_LABEL(target) yon_char_unite(_("User")," <b>", target,"</b> ", _("is already exists. Do you really want to save user")," <b>",target,"</b>?",NULL)
#define GRUB_PASSWORD(target) yon_char_unite("GRUB_PASSWORD[",target,"]",NULL) #define GRUB_PASSWORD(target) yon_char_unite("GRUB_PASSWORD[",target,"]",NULL)
@ -288,6 +278,20 @@ NULL)
#define GROUP_LABEL _("Group:") #define GROUP_LABEL _("Group:")
#define APP_TABLE_LABEL _("Application") #define APP_TABLE_LABEL _("Application")
#define GROUP_TABLE_LABEL _("Group") #define GROUP_TABLE_LABEL _("Group")
#define ON_LABEL _("On")
#define OFF_LABEL _("Off")
#define DO_NOT_CONFIGURE_LABEL _("Do not configure")
#define LOAD_CUSTOM_LABEL yon_char_get_localised_from_lib("Load from specific file")
#define LOAD_LOCAL_LABEL yon_char_get_localised_from_lib("Load local configuration")
#define LOAD_GLOBAL_LABEL yon_char_get_localised_from_lib("Load global configuration")
#define LOAD_LABEL yon_char_get_localised_from_lib("Load")
#define REBOOT_LABEL _("Reboot")
#define SHUTDOWN_LABEL _("Shudown")
#define FINISH_ACTION_LABEL _("After successful installation:")
#define MAP_TITLE_LABEL(utc) yon_char_unite(_("UTC"),utc,NULL)
#define MAP_INFO_LABEL(tz_location) yon_char_unite(_("Geasfa"),tz_location,NULL)
// #define _LABEL _("Select your language:") // #define _LABEL _("Select your language:")
// #define _LABEL _("Selecting additional system kernel components") // #define _LABEL _("Selecting additional system kernel components")
@ -301,7 +305,6 @@ NULL)
// #define _LABEL _("File system type:") // #define _LABEL _("File system type:")
// #define _LABEL _("File system label:") // #define _LABEL _("File system label:")
// #define _LABEL _("Encryption:") // #define _LABEL _("Encryption:")
// #define _LABEL _("Off")
// #define _LABEL _("Encryption password:") // #define _LABEL _("Encryption password:")
// #define _LABEL _("User name:") // #define _LABEL _("User name:")
// #define _LABEL _("User password:") // #define _LABEL _("User password:")
@ -384,7 +387,6 @@ NULL)
// #define _LABEL _("Domain administrator:") // #define _LABEL _("Domain administrator:")
// #define _LABEL _("NTP Server:") // #define _LABEL _("NTP Server:")
// #define _LABEL _("Manual") // #define _LABEL _("Manual")
// #define _LABEL _("Do not configure")
// #define _LABEL _("auto") // #define _LABEL _("auto")
// #define _LABEL _("Net interfaces") // #define _LABEL _("Net interfaces")
// #define _LABEL _("Installation process") // #define _LABEL _("Installation process")
@ -397,7 +399,7 @@ NULL)
// #define _LABEL _("Installation on same partition") // #define _LABEL _("Installation on same partition")
// #define _LABEL _("Advanced section") // #define _LABEL _("Advanced section")
// #define _LABEL _("Recovery section") // #define _LABEL _("Recovery section")
// #define _LABEL _("Start installation scenario") // #define _LABEL _("Install according to the script")
// #define _LABEL _("Source") // #define _LABEL _("Source")
// #define _LABEL _("Skip configuration") // #define _LABEL _("Skip configuration")
@ -410,7 +412,7 @@ NULL)
// #define _LABEL _("Configuring the system") // #define _LABEL _("Configuring the system")
// #define _LABEL _("Configuring the parameters of the installed system") // #define _LABEL _("Configuring the parameters of the installed system")
// #define _LABEL _("Selecting the system kernel") // #define _LABEL _("Selecting the system kernel")
// #define _LABEL _("Selecting kernels for installation in the system and selecting the default kernel. Internet access is required to install additional kernels") // #define _LABEL _("Selecting kernels for installation in the system and selecting the default kernel. Internet access required")
// #define _LABEL _("Selecting additional kernel modules from the repository via the Internet") // #define _LABEL _("Selecting additional kernel modules from the repository via the Internet")
// #define _LABEL _("Search and select the software you need to install by package name. Internet access required") // #define _LABEL _("Search and select the software you need to install by package name. Internet access required")
// #define _LABEL _("Chosen packages") // #define _LABEL _("Chosen packages")
@ -430,7 +432,6 @@ NULL)
// #define _LABEL _("Selecting software packages to install from the repository. Internet access is required") // #define _LABEL _("Selecting software packages to install from the repository. Internet access is required")
// #define _LABEL _("Selecting software modules to install from the repository. Internet access is required") // #define _LABEL _("Selecting software modules to install from the repository. Internet access is required")
// #define _LABEL _("Language") // #define _LABEL _("Language")
// #define _LABEL _("On")
// #define _LABEL _("Selecting the software group to install from the repository. Internet access is required") // #define _LABEL _("Selecting the software group to install from the repository. Internet access is required")
// #define _LABEL _("Recovery configuration has ended") // #define _LABEL _("Recovery configuration has ended")
// #define _LABEL _("System recovery is about to begin") // #define _LABEL _("System recovery is about to begin")
@ -439,6 +440,24 @@ NULL)
// #define _LABEL _("System recovery successfully completed!") // #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 _("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 _("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_title _("Product ecosystem")
#define slide_1_text _("Developed by a team of professionals and successfully presented on the market.\n\ #define slide_1_text _("Developed by a team of professionals and successfully presented on the market.\n\

@ -138,7 +138,6 @@
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkSwitch" id="FormatSwitch"> <object class="GtkSwitch" id="FormatSwitch">
<property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
</object> </object>
<packing> <packing>
@ -148,10 +147,9 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkComboBoxText" id="FormatCombo">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Format</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -159,6 +157,17 @@
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkLabel">
<property name="can-focus">False</property>
<property name="label" translatable="yes">Format</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -205,6 +214,11 @@
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child> <child>
<object class="GtkSpinButton" id="SizeSpin"> <object class="GtkSpinButton" id="SizeSpin">
<property name="visible">True</property> <property name="visible">True</property>
@ -214,7 +228,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -222,17 +236,18 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="active">0</property> <property name="active">0</property>
<items>
<item id="K" translatable="yes">Kb</item>
<item id="M" translatable="yes">Mb</item>
<item id="G" translatable="yes">Gb</item>
<item id="T" translatable="yes">Tb</item>
</items>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">2</property> <property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -245,7 +260,7 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">3</property> <property name="position">4</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -256,54 +271,71 @@
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">4</property> <property name="position">5</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">File system type:</property> <property name="spacing">5</property>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Encryption:</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">5</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBoxText" id="FileSystemTypeCombo"> <object class="GtkComboBoxText" id="EncryptionCombo">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="active">0</property> <property name="active">0</property>
<items> <items>
<item translatable="yes">Default</item> <item translatable="yes">Off</item>
</items> </items>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">6</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Encryption password:</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkBox"> <object class="GtkBox" id="box2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkLabel" id="label2"> <object class="GtkEntry" id="EncryptionEntry">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="sensitive">False</property>
<property name="label" translatable="yes">File system label:</property> <property name="can-focus">True</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -312,9 +344,15 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry" id="FileSystemLabelEntry"> <object class="GtkButton" id="EncryptionButton">
<property name="visible">True</property> <property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image4</property>
<style>
<class name="thin"/>
</style>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -322,12 +360,13 @@
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child> </object>
<object class="GtkLabel" id="label4"> <packing>
<property name="visible">True</property> <property name="expand">False</property>
<property name="can-focus">False</property> <property name="fill">True</property>
<property name="label" translatable="yes">Encryption:</property> <property name="position">3</property>
<property name="xalign">0</property> </packing>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
@ -336,66 +375,66 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkComboBoxText" id="EncryptionCombo"> <object class="GtkBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="active">0</property> <property name="spacing">5</property>
<items> <child>
<item translatable="yes">Off</item> <object class="GtkLabel" id="label5">
</items> <property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">File system type:</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">3</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkLabel"> <object class="GtkComboBoxText" id="FileSystemTypeCombo">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="label" translatable="yes">Encryption password:</property> <property name="active">0</property>
<items>
<item translatable="yes">Default</item>
</items>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">4</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkEntry" id="EncryptionEntry"> <object class="GtkLabel" id="label2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="sensitive">False</property> <property name="can-focus">False</property>
<property name="can-focus">True</property> <property name="label" translatable="yes">File system label:</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">5</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkButton" id="EncryptionButton"> <object class="GtkEntry" id="FileSystemLabelEntry">
<property name="visible">True</property> <property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image4</property>
<style>
<class name="thin"/>
</style>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">6</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">2</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
</object> </object>
@ -418,16 +457,32 @@
<class name="bggrey"/> <class name="bggrey"/>
</style> </style>
</object> </object>
<object class="GtkSizeGroup">
<widgets>
<widget name="box2"/>
<widget name="PartLabelEntry"/>
<widget name="FileSystemLabelEntry"/>
</widgets>
</object>
<object class="GtkSizeGroup">
<widgets>
<widget name="box1"/>
<widget name="EncryptionCombo"/>
<widget name="FileSystemTypeCombo"/>
</widgets>
</object>
<object class="GtkSizeGroup"> <object class="GtkSizeGroup">
<widgets> <widgets>
<widget name="label1"/> <widget name="label1"/>
<widget name="label2"/> <widget name="label4"/>
<widget name="label5"/>
</widgets> </widgets>
</object> </object>
<object class="GtkSizeGroup"> <object class="GtkSizeGroup">
<widgets> <widgets>
<widget name="label3"/> <widget name="label3"/>
<widget name="label4"/> <widget name="label6"/>
<widget name="label2"/>
</widgets> </widgets>
</object> </object>
</interface> </interface>

@ -4,6 +4,7 @@
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path ubl-settings-bootloader.css --> <!-- interface-css-provider-path ubl-settings-bootloader.css -->
<object class="GtkListBoxRow" id="MenuItemRow"> <object class="GtkListBoxRow" id="MenuItemRow">
<property name="height-request">25</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<child> <child>

@ -3,11 +3,6 @@
<interface domain="ubl-settings-bootloader"> <interface domain="ubl-settings-bootloader">
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path ubinstall-gtk.css --> <!-- interface-css-provider-path ubinstall-gtk.css -->
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.pan-left-symbolic</property>
</object>
<object class="GtkWindow" id="MainWindow"> <object class="GtkWindow" id="MainWindow">
<property name="width-request">450</property> <property name="width-request">450</property>
<property name="height-request">250</property> <property name="height-request">250</property>
@ -54,7 +49,6 @@
<object class="GtkListBox" id="ItemsListBox"> <object class="GtkListBox" id="ItemsListBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="selection-mode">none</property>
<child type="placeholder"> <child type="placeholder">
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
@ -94,11 +88,40 @@
<property name="spacing">5</property> <property name="spacing">5</property>
<child> <child>
<object class="GtkButton" id="BackButton"> <object class="GtkButton" id="BackButton">
<property name="label" translatable="yes">Back</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">True</property> <property name="receives-default">True</property>
<property name="image">image1</property> <child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.pan-left-symbolic</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Back</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<style> <style>
<class name="noborder"/> <class name="noborder"/>
<class name="menunoborder"/> <class name="menunoborder"/>
@ -110,6 +133,17 @@
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child> <child>
<object class="GtkScrolledWindow"> <object class="GtkScrolledWindow">
<property name="visible">True</property> <property name="visible">True</property>
@ -125,7 +159,6 @@
<object class="GtkListBox" id="ChildrenListBox"> <object class="GtkListBox" id="ChildrenListBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="selection-mode">none</property>
<child type="placeholder"> <child type="placeholder">
<object class="GtkLabel"> <object class="GtkLabel">
<property name="visible">True</property> <property name="visible">True</property>
@ -141,7 +174,7 @@
<packing> <packing>
<property name="expand">True</property> <property name="expand">True</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">1</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
</object> </object>

@ -156,17 +156,6 @@
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child> <child>
<object class="GtkRevealer" id="IpRevealer"> <object class="GtkRevealer" id="IpRevealer">
<property name="visible">True</property> <property name="visible">True</property>

@ -12,7 +12,6 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">True</property> <property name="can-focus">True</property>
<property name="receives-default">False</property> <property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property> <property name="draw-indicator">True</property>
<child> <child>
<object class="GtkBox"> <object class="GtkBox">
@ -81,6 +80,7 @@
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="margin-bottom">2</property> <property name="margin-bottom">2</property>
<property name="label" translatable="yes">Description</property> <property name="label" translatable="yes">Description</property>
<property name="wrap">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
<property name="yalign">0</property> <property name="yalign">0</property>
</object> </object>

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<interface domain="ubinstall-gtk">
<requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path ubinstall-gtk.css -->
<object class="GtkListStore" id="InfoList">
<columns>
<!-- column-name Name -->
<column type="gchararray"/>
<!-- column-name Value -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkBox" id="MainBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow" id="InfoTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">InfoList</property>
<property name="headers-visible">False</property>
<property name="enable-search">False</property>
<property name="enable-grid-lines">both</property>
<child internal-child="selection">
<object class="GtkTreeSelection">
<property name="mode">none</property>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">column</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="markup">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">column</property>
<child>
<object class="GtkCellRendererText">
<property name="wrap-mode">word</property>
<property name="wrap-width">150</property>
</object>
<attributes>
<attribute name="markup">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</interface>

@ -70,6 +70,7 @@
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
<property name="use-markup">True</property> <property name="use-markup">True</property>
<property name="justify">fill</property>
<property name="wrap">True</property> <property name="wrap">True</property>
<property name="xalign">0</property> <property name="xalign">0</property>
</object> </object>

@ -3,16 +3,6 @@
<interface domain="ubinstall-gtk"> <interface domain="ubinstall-gtk">
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path ubinstall-gtk.css --> <!-- interface-css-provider-path ubinstall-gtk.css -->
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.zoom-symbolic</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.increase-symbolic</property>
</object>
<object class="GtkWindow" id="MainWindow"> <object class="GtkWindow" id="MainWindow">
<property name="width-request">400</property> <property name="width-request">400</property>
<property name="height-request">250</property> <property name="height-request">250</property>
@ -139,94 +129,6 @@
<property name="position">0</property> <property name="position">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkComboBoxText" id="TypeCombo">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">False</property>
<property name="active">0</property>
<items>
<item translatable="yes">Device</item>
<item translatable="yes">Folder</item>
<item translatable="yes">ISO-image</item>
</items>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="PathEntry">
<property name="sensitive">False</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="DeviceCombo">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">False</property>
<property name="active">0</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="PathButton">
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkButton" id="AddButton">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
<child> <child>
<object class="GtkScrolledWindow"> <object class="GtkScrolledWindow">
<property name="visible">True</property> <property name="visible">True</property>
@ -265,7 +167,7 @@
</child> </child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">True</property>
<property name="fill">True</property> <property name="fill">True</property>
<property name="position">2</property> <property name="position">2</property>
</packing> </packing>

@ -5,6 +5,9 @@
.noborder { .noborder {
border:none; border:none;
} }
.instant {
transition: 0;
}
.borders *{ .borders *{
border-width:0.5px; border-width:0.5px;
border-style: solid; border-style: solid;
@ -165,11 +168,13 @@ treeview row:nth-child(odd) { background-color: #000000; }
treeview row:nth-child(even) { background-color: #ffffff; } treeview row:nth-child(even) { background-color: #ffffff; }
.blackbg { .blackbg {
background-color: @theme_text_color; background-color: @titlebar_fg_color;
} }
.toggletabs { .toggletabs {
background-color: @background_color; background-color: inherit;
background-image: none;
color:@theme_text_color;
border:none; border:none;
border-radius:0px; border-radius:0px;
transition:0; transition:0;
@ -178,7 +183,9 @@ treeview row:nth-child(even) { background-color: #ffffff; }
} }
.toggletabs:disabled { .toggletabs:disabled {
background-color: @background_color; background-color: inherit;
background-image: none;
color:@theme_base_color;
border:none; border:none;
border-radius:0px; border-radius:0px;
transition:0; transition:0;
@ -189,6 +196,8 @@ treeview row:nth-child(even) { background-color: #ffffff; }
.toggletabs:checked:disabled { .toggletabs:checked:disabled {
background:@theme_base_color; background:@theme_base_color;
background-image: none;
color:@theme_text_color;
border-radius:0px; border-radius:0px;
color:@theme_text_color; color:@theme_text_color;
padding-top:7px; padding-top:7px;
@ -198,6 +207,7 @@ treeview row:nth-child(even) { background-color: #ffffff; }
.toggletabs:checked:disabled>* { .toggletabs:checked:disabled>* {
background:@theme_base_color; background:@theme_base_color;
background-image: none;
color:@theme_text_color; color:@theme_text_color;
opacity:1; opacity:1;
} }
@ -205,6 +215,8 @@ treeview row:nth-child(even) { background-color: #ffffff; }
.toggletabs:checked:active:disabled { .toggletabs:checked:active:disabled {
background:@theme_base_color; background:@theme_base_color;
background-image: none;
color:@theme_text_color;
border-radius:0px; border-radius:0px;
color:inherit; color:inherit;
padding-top:7px; padding-top:7px;
@ -214,7 +226,9 @@ treeview row:nth-child(even) { background-color: #ffffff; }
.toggletabs:disabled:active { .toggletabs:disabled:active {
background-color: @theme_base_color; background-color: inherit;
background-image: none;
color:@theme_bg_color;
border:none; border:none;
border-radius:0px; border-radius:0px;
transition:0; transition:0;
@ -224,7 +238,9 @@ treeview row:nth-child(even) { background-color: #ffffff; }
opacity:1; opacity:1;
} }
.toggletabs:active { .toggletabs:active {
background-color: @theme_base_color; background-color: @theme_fg_color;
background-image: none;
color:@theme_bg_color;
border:none; border:none;
border-radius:0px; border-radius:0px;
transition:0; transition:0;
@ -235,10 +251,11 @@ treeview row:nth-child(even) { background-color: #ffffff; }
} }
.menubox { .menubox {
background-color:@theme_text_color; background-color:inherit;
} }
.menubox *{ .menubox *{
color:@theme_base_color; color:@theme_fg_color;
opacity:1;
} }
.bggrey{ .bggrey{
border-radius:5px; border-radius:5px;
@ -343,3 +360,32 @@ button {
color:@theme_selected_fg_color; color:@theme_selected_fg_color;
opacity: 1; opacity: 1;
} }
.greenBox > trough > progress{
background-color: #99eaab;
}
.redBox > trough > progress{
background-color: #ea9999;
}
.yellowBox > trough > progress{
background-color: #f3f0ac;
}
.timezoneoverlay * {
color:@theme_bg_color;
background-color: @theme_fg_color;
}
.timezoneoverlay {
background-color: @theme_fg_color;
opacity:0.7;
border-radius:10px;
}
.timezoneoverlay_hover {
background-color: @theme_fg_color;
opacity:0.3;
border-radius:10px;
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save