Init commit, moved from another repo

pull/1/head
parent 218fadb001
commit 5457d5800d

12
.gitignore vendored

@ -0,0 +1,12 @@
.vscode/
ubinstall-gtk
*~
build/
compile/
*#
terminal-commands/
source/ubl-cmake.h
vgcore*
.BUILD.md
.updatebuild.sh
.install.sh

@ -0,0 +1,151 @@
#!/usr/bin/make -f
#SHELL := /bin/bash
MAKEFILE_FILEPATH := $(abspath $(lastword $(MAKEFILE_LIST)))
MAKEFILE_DIR := $(notdir $(patsubst %/,%,$(dir $(MAKEFILE_FILEPATH))))
MAKEFILE_PATH := $(dir $(MAKEFILE_FILEPATH))
CMAKE_COMMAND = cmake
CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source
CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile
DEPENDS = /bin/cmake
PREFIX ?= /usr/local
PKGNAME = $(MAKEFILE_DIR)
FILE_VER = source/${PKGNAME}.h
PKGIDENT = $(subst /,-,$(subst /usr,,${PREFIX}))
default_target: all
.PHONY: all init depend debug prepare check build uninstall install clean help
all: init build
init:
@echo "Initialize ..."; \
if [ -d ".git" ]; then \
LATEST_TAG=$$(git describe --abbrev=0 --tags | sed 's/^v//'); \
if [ -z "$${LATEST_TAG}" ]; then \
LATEST_TAG="0.0"; \
fi; \
else \
LATEST_TAG="Development"; \
fi; \
sed -r "s/^(string version_application).*/\1 = \"$${LATEST_TAG}\";/" -i ${FILE_VER}; \
echo "-- Build path: ${CMAKE_BUILD_DIR}"
depend:
@echo "Check depends ..."
@for FILE_DEPEND in $(DEPENDS); do \
if [ ! -f $${FILE_DEPEND} ]; then \
echo "ERROR: Depend '$${FILE_DEPEND}' not found !"; \
exit 1; \
fi; \
done; \
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B${CMAKE_BUILD_DIR} --check-build-system CMakeFiles/Makefile.cmake 1 || exit 1; \
echo "Check depends: OK"
debug:
@echo "Debug ..."
if [ ! -d ${CMAKE_BUILD_DIR} ]; then \
$(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \
fi; \
echo "Debug: OK"
prepare:
@echo "Prepare ..."; \
if [ ! -d ${CMAKE_BUILD_DIR} ]; then \
$(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \
fi; \
echo "Prepare: OK"
check:
@echo "Check ..."; \
if [ -f ${CMAKE_BUILD_DIR}/${PKGNAME} ]; then \
echo "Check: OK"; \
else \
echo "Check: ${CMAKE_BUILD_DIR}/${PKGNAME} not found !"; \
exit 1; \
fi
build: depend prepare
@echo "Build ..."; \
$(MAKE_COMMAND) --directory=${CMAKE_BUILD_DIR}; \
sed -r "s/^(string version_application).*/\1;/" -i ${FILE_VER}; \
echo "Build: OK"
uninstall:
@echo "Uninstall ..."
@for FILE_PO in $(wildcard *.po); do \
LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
$(RM) "$${PATH_FILE_MO}"; \
done
@for SIZE in 16x16 32x32 48x48 scalable; do \
$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \
$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/apps/com.ublinux.${PKGNAME}.png"; \
done
@for FILE_SVG in $(wildcard *.svg); do \
for SIZE in 16x16 32x32 48x48 scalable; do \
$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/status/$${FILE_SVG%.*}".{svg,png,jpg}; \
done; \
done
@$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}"
@$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop"
@$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg"
@$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy"
@if [ -z ${DESTDIR} ]; then \
[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \
update-desktop-database --quiet &>/dev/null || true; \
[ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \
fi
@echo "Uninstall: OK"
install: check uninstall
@echo "Install ..."
@for FILE_PO in $(wildcard *.po); do \
LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
install -dm755 "${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES"; \
FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
echo "$${FILE_PO}"; \
msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \
done
@for SIZE in 16 32 48; do \
install -dm755 "${DESTDIR}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \
rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "com.ublinux.${PKGNAME}-gui.svg" -o "${DESTDIR}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}-gui.svg"; \
done
@install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}-gui.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/csv" "locales.csv"
@for FILE_ICON in $(wildcard icons/*/*.svg); do \
SUB_NAME=$${FILE_ICON#*/}; SUB_NAME=$${SUB_NAME%/*}; \
install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/$${SUB_NAME}" $${FILE_ICON}; \
done
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop"
@install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}"
@if [ -z ${DESTDIR} ]; then \
[ -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; \
[ -d "${DESTDIR}/usr/share/applications" ] && touch "${DESTDIR}/usr/share/applications" &>/dev/null || true; \
fi
@echo "Install: OK"
clean:
@echo "Clean ..."
@$(RM) -rd ${CMAKE_BUILD_DIR}
@if [ -d ${CMAKE_BUILD_DIR} ]; then \
echo "Clean: error, compile directory exist ${CMAKE_BUILD_DIR}"; \
else \
echo "Clean: OK"; \
fi
help:
@echo "The following are some of the valid targets for this Makefile:"; \
echo "... all (the default if no target is provided)"; \
echo "... init"; \
echo "... debug"; \
echo "... prepare"; \
echo "... build"; \
echo "... install"; \
echo "... uninstall"; \
echo "... clean"

@ -1 +1,39 @@
# [ubinstall-gtk] # [UBInstall](https://ublinux.ru/)
![ubinstall-icon-gui](ublinux-ubinstall_gui.svg) ![ubinstall-icon-console](ublinux-ubinstall_console.svg)
## Описание
Установщик оерационной системы UBLinux (<b>UBInstall</b>) позволяет в удобно установить операционную систему.
## Установка
1. Скачайте репозитрий с утилитами
```
$ git clone http://git.ublinux.ru:3000/UBGroup/ubinstall.git
```
2. Перейдите в каталог ubinstall
```
$ cd ubinstall
```
3. Установите утилиту
```
$ make
```
## Использование
### <b>Запуск</b>
Запуск утилиты возможен двумя способами:
1. Терминал
CLI версия:
```
$ ubinstall.cli
```
GTK версия
```
$ ubinstall.gtk
```
2. Ярлык

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 194 KiB

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/com/ublinux/ui">
<file>ubinstall-gtk.glade</file>
<file>ubinstall-gtk-language.glade</file>
<file>ubinstall-gtk-keyboard.glade</file>
</gresource>
<gresource prefix="/com/ublinux/css">
<file>ubinstall-gtk.css</file>
</gresource>
<gresource prefix="/com/ublinux/images">
<file>map-time-zone.png</file>
<file>keyboard.png</file>
<file>keyboard-ru.png</file>
<file>slide-0.png</file>
<file>slide-1.png</file>
<file>slide-2.png</file>
<file>slide-3.png</file>
<file>slide-4.png</file>
<file>slide-5.png</file>
<file>slide-6.png</file>
<file>slide-7.png</file>
<file>slide-8.png</file>
<file>slide-9.png</file>
<file>slide-10.png</file>
<file>slide-11.png</file>
<file>slide-12.png</file>
</gresource>
<gresource prefix="/com/ublinux/csv">
<file>modules.csv</file>
</gresource>
</gresources>

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M48 256a208 208 0 1 1 416 0A208 208 0 1 1 48 256zm464 0A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM217.4 376.9c4.2 4.5 10.1 7.1 16.3 7.1c12.3 0 22.3-10 22.3-22.3V304h96c17.7 0 32-14.3 32-32V240c0-17.7-14.3-32-32-32H256V150.3c0-12.3-10-22.3-22.3-22.3c-6.2 0-12.1 2.6-16.3 7.1L117.5 242.2c-3.5 3.8-5.5 8.7-5.5 13.8s2 10.1 5.5 13.8l99.9 107.1z"/></svg>

After

Width:  |  Height:  |  Size: 569 B

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 135.1c-4.2-4.5-10.1-7.1-16.3-7.1C266 128 256 138 256 150.3V208H160c-17.7 0-32 14.3-32 32v32c0 17.7 14.3 32 32 32h96v57.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.3-7.1l99.9-107.1c3.5-3.8 5.5-8.7 5.5-13.8s-2-10.1-5.5-13.8L294.6 135.1z"/></svg>

After

Width:  |  Height:  |  Size: 570 B

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 512 512"
version="1.1"
id="svg4"
sodipodi:docname="com.ublinux.ubinstall.circle-exit-symbolic.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs8" />
<sodipodi:namedview
id="namedview6"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="1.4199219"
inkscape:cx="404.95185"
inkscape:cy="256"
inkscape:window-width="1920"
inkscape:window-height="1056"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg4"
showguides="false" />
<!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.-->
<path
id="path2"
d="M 236.86914 0.71679688 A 256 256 0 0 0 0 256 A 256 256 0 0 0 512 256 A 256 256 0 0 0 236.86914 0.71679688 z M 238.82422 48.710938 A 208 208 0 0 1 464 256 A 208 208 0 0 1 48 256 A 208 208 0 0 1 238.82422 48.710938 z " />
<path
d="m 371.0487,180.71923 c 9.71451,-9.71452 9.71451,-25.49089 0,-35.20541 -9.71451,-9.71451 -25.49089,-9.71451 -35.2054,0 l -81.83509,81.9128 -81.9128,-81.83508 c -9.71451,-9.71451 -25.49089,-9.71451 -35.2054,0 -9.71452,9.71451 -9.71452,25.49089 0,35.2054 l 81.91279,81.83509 -81.83507,81.9128 c -9.71453,9.71451 -9.71453,25.49089 0,35.2054 9.71451,9.71452 25.49088,9.71452 35.2054,0 l 81.83508,-81.91279 81.9128,81.83507 c 9.71452,9.71453 25.49089,9.71453 35.20541,0 9.71451,-9.71451 9.71451,-25.49088 0,-35.2054 l -81.9128,-81.83508 z"
id="path2-3"
style="stroke-width:0.777162" />
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1009 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="130"
height="148"
version="1.0"
id="svg8"
sodipodi:docname="ublinux-logo.svg"
inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)"
inkscape:export-filename="/media/Data/ShareMX/temp/archtoub_icons/ublinux-logo.png"
inkscape:export-xdpi="136.53334"
inkscape:export-ydpi="136.53334"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs12">
<filter
style="color-interpolation-filters:sRGB"
inkscape:label="Drop Shadow"
id="filter1854"
x="-0.19194186"
y="-0.27932915"
width="1.3838837"
height="1.5586583">
<feFlood
flood-opacity="0.74902"
flood-color="rgb(255,255,255)"
result="flood"
id="feFlood1844" />
<feComposite
in="flood"
in2="SourceGraphic"
operator="in"
result="composite1"
id="feComposite1846" />
<feGaussianBlur
in="composite1"
stdDeviation="5"
result="blur"
id="feGaussianBlur1848" />
<feOffset
dx="-1.94289e-16"
dy="3.05311e-16"
result="offset"
id="feOffset1850" />
<feComposite
in="SourceGraphic"
in2="offset"
operator="over"
result="composite2"
id="feComposite1852" />
</filter>
</defs>
<sodipodi:namedview
id="namedview10"
pagecolor="#ffffff"
bordercolor="#999999"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="1.4633182"
inkscape:cx="-128.13344"
inkscape:cy="93.622836"
inkscape:window-width="1920"
inkscape:window-height="1015"
inkscape:window-x="0"
inkscape:window-y="28"
inkscape:window-maximized="1"
inkscape:current-layer="layer2"
height="148px" />
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="Layer 1"
style="display:none">
<rect
style="fill:#000000;fill-opacity:1;stroke-width:0.109606;stroke-linecap:round"
id="rect850"
width="188.20175"
height="190.63412"
x="-3.9623766"
y="-5.4701967" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2"
style="display:inline">
<g
id="g866"
style="display:inline;filter:url(#filter1854)"
transform="matrix(1.4167054,0,0,1.4415847,-38.069306,-200.87071)">
<path
sodipodi:type="star"
style="display:inline;fill:#0d597f;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.264583;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path9225"
sodipodi:sides="6"
sodipodi:cx="103.70058"
sodipodi:cy="104.69581"
sodipodi:r1="89.197571"
sodipodi:r2="77.247368"
sodipodi:arg1="1.0471976"
sodipodi:arg2="1.5707963"
inkscape:flatsided="true"
inkscape:rounded="0"
inkscape:randomized="0"
transform="matrix(0,0.48761957,-0.48761957,0,123.86572,140.10617)"
d="m 148.29936,181.94317 -89.197572,0 -44.598782,-77.24737 44.598789,-77.247356 89.197575,4e-6 44.59878,77.247362 z" />
<path
d="m 68.071141,169.19256 h 16.33386 c 3.39111,0 5.86851,0.11539 7.43219,0.34611 1.58252,0.23075 3.1462,0.74032 4.69104,1.5287 1.601349,0.82684 2.788229,1.94211 3.560659,3.34582 0.79125,1.38448 1.18689,2.97085 1.18689,4.75912 0,2.07672 -0.53691,3.91307 -1.61078,5.50906 -1.07385,1.57676 -2.590419,2.80742 -4.549739,3.69195 v 0.23074 c 2.750559,0.55764 4.926539,1.71138 6.527889,3.46119 1.6202,1.74981 2.43031,4.0573 2.43031,6.92239 0,2.07672 -0.41448,3.93227 -1.24342,5.56672 -0.8101,1.63445 -1.93104,2.99009 -3.36285,4.06691 -1.65787,1.26908 -3.485299,2.17283 -5.482289,2.71125 -1.97817,0.53841 -4.49323,0.80556 -7.54524,0.80761 l -18.52368,0.0125 -7.65381,-0.005 c -6.160521,0 -10.823301,-1.38471 -13.988341,-4.15412 -3.1462,-2.76939 -4.7193,-6.7445 -4.7193,-11.92538 v -26.87542 h 10.90808 v 26.25285 c 0,2.92012 0.61229,5.09609 1.83685,6.52789 1.22457,1.4318 3.21214,2.14769 5.962711,2.14769 2.71289,0 4.69104,-0.68761 5.93445,-2.06289 1.26225,-1.37529 1.89338,-3.57951 1.88394,-6.64543 z m 22.09875,12.14301 c 0,-0.71147 -0.17897,-1.42295 -0.53692,-2.13441 -0.33911,-0.71146 -0.9514,-1.24025 -1.83686,-1.58638 -0.79125,-0.30766 -1.78033,-0.47111 -2.96722,-0.49033 -1.16805,-0.0384 -2.81651,-0.0576 -4.94537,-0.0576 h -1.01734 v 9.08561 h 1.69556 c 1.7144,0 3.17445,-0.0288 4.38018,-0.0864 1.20573,-0.0577 2.15713,-0.24993 2.85419,-0.57687 0.97966,-0.44226 1.6202,-1.00952 1.92164,-1.70175 0.30143,-0.71148 0.45214,-1.52869 0.45214,-2.45167 z m 2.65637,17.479 c 0,-1.36526 -0.26375,-2.41322 -0.79126,-3.14391 -0.50866,-0.74993 -1.3847,-1.30755 -2.62811,-1.6729 -0.84778,-0.24997 -2.01582,-0.38457 -3.50415,-0.40382 -1.48832,-0.0193 -3.04259,-0.0289 -4.66278,-0.0289 h -2.37378 v 10.70083 h 0.79127 c 3.05199,0 5.23738,-0.009 6.55615,-0.0288 1.31876,-0.0192 2.53391,-0.26918 3.64544,-0.74991 1.13036,-0.48072 1.90279,-1.11526 2.31726,-1.90365 0.43331,-0.80763 0.64996,-1.7306 0.64996,-2.76895 z"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:50.8px;line-height:1.25;font-family:Verdana;-inkscape-font-specification:'Verdana Bold';letter-spacing:0px;word-spacing:0px;display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.113933;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;enable-background:new"
id="path4640-7-5-9-7"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cscccsccccscccscccsccscscccscccsccssccssscccsccssccss" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.8 KiB

@ -0,0 +1,129 @@
af_ZA.UTF-8;Afrikaans, South Africa
ar_AE.UTF-8;Arabic, United Arab Emirates
ar_BH.UTF-8;Arabic, Bahrain
ar_DZ.UTF-8;Arabic, Algeria
ar_EG.UTF-8;Arabic, Egypt
ar_IQ.UTF-8;Arabic, Iraq
ar_JO.UTF-8;Arabic, Jordan
ar_KW.UTF-8;Arabic, Kuwait
ar_LY.UTF-8;Arabic, Libya
ar_MA.UTF-8;Arabic, Morocco
ar_OM.UTF-8;Arabic, Oman
ar_QA.UTF-8;Arabic, Qatar
ar_SA.UTF-8;Arabic, Saudi Arabia
ar_TN.UTF-8;Arabic, Tunisia
ar_YE.UTF-8;Arabic, Yemen
as_IN.UTF-8;Assamese, India
az_AZ.UTF-8;Azerbaijani, Azerbaijan
be_BY.UTF-8;Belarusian, Belarus
bg_BG.UTF-8;Bulgarian, Bulgaria
bn_IN.UTF-8;Bengali, India
bs_BA.UTF-8;Bosnian, Bosnia and Herzegovina
ca_ES.UTF-8;Catalan, Spain
cs_CZ.UTF-8;Czech, Czech Republic
da_DK.UTF-8;Danish, Denmark
de_AT.UTF-8;German, Austria
de_BE.UTF-8;German, Belgium
de_CH.UTF-8;German, Switzerland
de_DE.UTF-8;German, Germany
de_LI.UTF-8;German, Liechtenstein
de_LU.UTF-8;German, Luxembourg
el_CY.UTF-8;Greek, Cyprus
el_GR.UTF-8;Greek, Greece
en_AU.UTF-8;English, Australia
en_BW.UTF-8;English, Botswana
en_CA.UTF-8;English, Canada
en_GB.UTF-8;English, United Kingdom
en_HK.UTF-8;English, Hong Kong SAR China
en_IE.UTF-8;English, Ireland
en_IN.UTF-8;English, India
en_MT.UTF-8;English, Malta
en_NZ.UTF-8;English, New Zealand
en_PH.UTF-8;English, Philippines
en_SG.UTF-8;English, Singapore
en_US.UTF-8;English, U.S.A.
en_ZW.UTF-8;English, Zimbabwe
es_AR.UTF-8;Spanish, Argentina
es_BO.UTF-8;Spanish, Bolivia
es_CL.UTF-8;Spanish, Chile
es_CO.UTF-8;Spanish, Colombia
es_CR.UTF-8;Spanish, Costa Rica
es_DO.UTF-8;Spanish, Dominican Republic
es_EC.UTF-8;Spanish, Ecuador
es_ES.UTF-8;Spanish, Spain
es_GT.UTF-8;Spanish, Guatemala
es_HN.UTF-8;Spanish, Honduras
es_MX.UTF-8;Spanish, Mexico
es_NI.UTF-8;Spanish, Nicaragua
es_PA.UTF-8;Spanish, Panama
es_PE.UTF-8;Spanish, Peru
es_PR.UTF-8;Spanish, Puerto Rico
es_PY.UTF-8;Spanish, Paraguay
es_SV.UTF-8;Spanish, El Salvador
es_US.UTF-8;Spanish, U.S.A.
es_UY.UTF-8;Spanish, Uruguay
es_VE.UTF-8;Spanish, Venezuela
et_EE.UTF-8;Estonian, Estonia
fi_FI.UTF-8;Finnish, Finland
fr_BE.UTF-8;French, Belgium
fr_CA.UTF-8;French, Canada
fr_CH.UTF-8;French, Switzerland
fr_FR.UTF-8;French, France
fr_LU.UTF-8;French, Luxembourg
gu_IN.UTF-8;Gujarati, India
he_IL.UTF-8;Hebrew, Israel
hi_IN.UTF-8;Hindi, India
hr_HR.UTF-8;Croatian, Croatia
hu_HU.UTF-8;Hungarian, Hungary
hy_AM.UTF-8;Armenian, Armenia
id_ID.UTF-8;Indonesian, Indonesia
is_IS.UTF-8;Icelandic, Iceland
it_CH.UTF-8;Italian, Switzerla;nd
it_IT.UTF-8;Italian, Italy
ja_JP.UTF-8;Japanese, Japan
ka_GE.UTF-8;Georgian, Georgia
kk_KZ.UTF-8;Kazakh, Kazakhstan
kn_IN.UTF-8;Kannada, India
ko_KR.UTF-8;Korean, Korea
ks_IN.UTF-8;Kashmiri, India
ku_TR.UTF-8;Kurdish, Turkey
ku_TR.UTF-8@sorani;Kurdish (Sorani), Turkey
ky_KG.UTF-8;Kirghiz, Kyrgyzstan
lt_LT.UTF-8;Lithuanian, Lithuania
lv_LV.UTF-8;Latvian, Latvia
mk_MK.UTF-8;Macedonian, Macedonia
ml_IN.UTF-8;Malayalam, India
mr_IN.UTF-8;Marathi, India
ms_MY.UTF-8;Malay, Malaysia
mt_MT.UTF-8;Maltese, Malta
nb_NO.UTF-8;Bokmal, Norway
nl_BE.UTF-8;Dutch, Belgium
nl_NL.UTF-8;Dutch, Netherlands
nn_NO.UTF-8;Nynorsk, Norway
or_IN.UTF-8;Oriya, India
pa_IN.UTF-8;Punjabi, India
pl_PL.UTF-8;Polish, Poland
pt_BR.UTF-8;Portuguese, Brazil
pt_PT.UTF-8;Portuguese, Portugal
ro_RO.UTF-8;Romanian, Romania
ru_RU.UTF-8;Russian, Russia
ru_UA.UTF-8;Russian, Ukraine
sa_IN.UTF-8;Sanskrit, India
sk_SK.UTF-8;Slovak, Slovakia
sl_SI.UTF-8;Slovenian, Slovenia
sq_AL.UTF-8;Albanian, Albania
sr_ME.UTF-8;Serbian, Montenegro
sr_ME.UTF-8@latin;Serbian, Montenegro (Latin)
sr_RS.UTF-8;Serbian, Serbia
sr_RS.UTF-8@latin;Serbian, Serbia (Latin)
sv_SE.UTF-8;Swedish, Sweden
ta_IN.UTF-8;Tamil, India
te_IN.UTF-8;Telugu, India
th_TH.UTF-8;Thai, Thailand
tr_TR.UTF-8;Turkish, Turkey
uk_UA.UTF-8;Ukrainian, Ukraine
vi_VN.UTF-8;Vietnamese, Vietnam
zh_CN.UTF-8;Simplified Chinese, China
zh_HK.UTF-8;Traditional Chinese, Hong Kong SAR China
zh_SG.UTF-8;Chinese, Singapore
zh_TW.UTF-8;Traditional Chinese, Taiwan
1 af_ZA.UTF-8;Afrikaans South Africa
2 ar_AE.UTF-8;Arabic United Arab Emirates
3 ar_BH.UTF-8;Arabic Bahrain
4 ar_DZ.UTF-8;Arabic Algeria
5 ar_EG.UTF-8;Arabic Egypt
6 ar_IQ.UTF-8;Arabic Iraq
7 ar_JO.UTF-8;Arabic Jordan
8 ar_KW.UTF-8;Arabic Kuwait
9 ar_LY.UTF-8;Arabic Libya
10 ar_MA.UTF-8;Arabic Morocco
11 ar_OM.UTF-8;Arabic Oman
12 ar_QA.UTF-8;Arabic Qatar
13 ar_SA.UTF-8;Arabic Saudi Arabia
14 ar_TN.UTF-8;Arabic Tunisia
15 ar_YE.UTF-8;Arabic Yemen
16 as_IN.UTF-8;Assamese India
17 az_AZ.UTF-8;Azerbaijani Azerbaijan
18 be_BY.UTF-8;Belarusian Belarus
19 bg_BG.UTF-8;Bulgarian Bulgaria
20 bn_IN.UTF-8;Bengali India
21 bs_BA.UTF-8;Bosnian Bosnia and Herzegovina
22 ca_ES.UTF-8;Catalan Spain
23 cs_CZ.UTF-8;Czech Czech Republic
24 da_DK.UTF-8;Danish Denmark
25 de_AT.UTF-8;German Austria
26 de_BE.UTF-8;German Belgium
27 de_CH.UTF-8;German Switzerland
28 de_DE.UTF-8;German Germany
29 de_LI.UTF-8;German Liechtenstein
30 de_LU.UTF-8;German Luxembourg
31 el_CY.UTF-8;Greek Cyprus
32 el_GR.UTF-8;Greek Greece
33 en_AU.UTF-8;English Australia
34 en_BW.UTF-8;English Botswana
35 en_CA.UTF-8;English Canada
36 en_GB.UTF-8;English United Kingdom
37 en_HK.UTF-8;English Hong Kong SAR China
38 en_IE.UTF-8;English Ireland
39 en_IN.UTF-8;English India
40 en_MT.UTF-8;English Malta
41 en_NZ.UTF-8;English New Zealand
42 en_PH.UTF-8;English Philippines
43 en_SG.UTF-8;English Singapore
44 en_US.UTF-8;English U.S.A.
45 en_ZW.UTF-8;English Zimbabwe
46 es_AR.UTF-8;Spanish Argentina
47 es_BO.UTF-8;Spanish Bolivia
48 es_CL.UTF-8;Spanish Chile
49 es_CO.UTF-8;Spanish Colombia
50 es_CR.UTF-8;Spanish Costa Rica
51 es_DO.UTF-8;Spanish Dominican Republic
52 es_EC.UTF-8;Spanish Ecuador
53 es_ES.UTF-8;Spanish Spain
54 es_GT.UTF-8;Spanish Guatemala
55 es_HN.UTF-8;Spanish Honduras
56 es_MX.UTF-8;Spanish Mexico
57 es_NI.UTF-8;Spanish Nicaragua
58 es_PA.UTF-8;Spanish Panama
59 es_PE.UTF-8;Spanish Peru
60 es_PR.UTF-8;Spanish Puerto Rico
61 es_PY.UTF-8;Spanish Paraguay
62 es_SV.UTF-8;Spanish El Salvador
63 es_US.UTF-8;Spanish U.S.A.
64 es_UY.UTF-8;Spanish Uruguay
65 es_VE.UTF-8;Spanish Venezuela
66 et_EE.UTF-8;Estonian Estonia
67 fi_FI.UTF-8;Finnish Finland
68 fr_BE.UTF-8;French Belgium
69 fr_CA.UTF-8;French Canada
70 fr_CH.UTF-8;French Switzerland
71 fr_FR.UTF-8;French France
72 fr_LU.UTF-8;French Luxembourg
73 gu_IN.UTF-8;Gujarati India
74 he_IL.UTF-8;Hebrew Israel
75 hi_IN.UTF-8;Hindi India
76 hr_HR.UTF-8;Croatian Croatia
77 hu_HU.UTF-8;Hungarian Hungary
78 hy_AM.UTF-8;Armenian Armenia
79 id_ID.UTF-8;Indonesian Indonesia
80 is_IS.UTF-8;Icelandic Iceland
81 it_CH.UTF-8;Italian Switzerla;nd
82 it_IT.UTF-8;Italian Italy
83 ja_JP.UTF-8;Japanese Japan
84 ka_GE.UTF-8;Georgian Georgia
85 kk_KZ.UTF-8;Kazakh Kazakhstan
86 kn_IN.UTF-8;Kannada India
87 ko_KR.UTF-8;Korean Korea
88 ks_IN.UTF-8;Kashmiri India
89 ku_TR.UTF-8;Kurdish Turkey
90 ku_TR.UTF-8@sorani;Kurdish (Sorani) Turkey
91 ky_KG.UTF-8;Kirghiz Kyrgyzstan
92 lt_LT.UTF-8;Lithuanian Lithuania
93 lv_LV.UTF-8;Latvian Latvia
94 mk_MK.UTF-8;Macedonian Macedonia
95 ml_IN.UTF-8;Malayalam India
96 mr_IN.UTF-8;Marathi India
97 ms_MY.UTF-8;Malay Malaysia
98 mt_MT.UTF-8;Maltese Malta
99 nb_NO.UTF-8;Bokmal Norway
100 nl_BE.UTF-8;Dutch Belgium
101 nl_NL.UTF-8;Dutch Netherlands
102 nn_NO.UTF-8;Nynorsk Norway
103 or_IN.UTF-8;Oriya India
104 pa_IN.UTF-8;Punjabi India
105 pl_PL.UTF-8;Polish Poland
106 pt_BR.UTF-8;Portuguese Brazil
107 pt_PT.UTF-8;Portuguese Portugal
108 ro_RO.UTF-8;Romanian Romania
109 ru_RU.UTF-8;Russian Russia
110 ru_UA.UTF-8;Russian Ukraine
111 sa_IN.UTF-8;Sanskrit India
112 sk_SK.UTF-8;Slovak Slovakia
113 sl_SI.UTF-8;Slovenian Slovenia
114 sq_AL.UTF-8;Albanian Albania
115 sr_ME.UTF-8;Serbian Montenegro
116 sr_ME.UTF-8@latin;Serbian Montenegro (Latin)
117 sr_RS.UTF-8;Serbian Serbia
118 sr_RS.UTF-8@latin;Serbian Serbia (Latin)
119 sv_SE.UTF-8;Swedish Sweden
120 ta_IN.UTF-8;Tamil India
121 te_IN.UTF-8;Telugu India
122 th_TH.UTF-8;Thai Thailand
123 tr_TR.UTF-8;Turkish Turkey
124 uk_UA.UTF-8;Ukrainian Ukraine
125 vi_VN.UTF-8;Vietnamese Vietnam
126 zh_CN.UTF-8;Simplified Chinese China
127 zh_HK.UTF-8;Traditional Chinese Hong Kong SAR China
128 zh_SG.UTF-8;Chinese Singapore
129 zh_TW.UTF-8;Traditional Chinese Taiwan

@ -0,0 +1,19 @@
UBM_NAME|DESCRIPTION
ubm-001-linux|UBLinux module the kernel and modules
ubm-010-core|UBLinux module includes the core components
ubm-025-xorg-gl|UBLinux module includes graphics accelerators
ubm-036-xorg-qt6|UBLinux module includes QT6 libs
ubm-050-xorg-gtk-app|UBLinux module includes GTK applications
ubm-070-dm-lightdm|UBLinux module includes Lightdm display manager
ubm-002-linux-headers|UBLinux module headers and scripts for building modules for the Meta UBlinux kernel, modules, headers and documentation
ubm-020-xorg-base|UBLinux module includes basic components Xorg
ubm-030-xorg-gtk|UBLinux module includes GTK libs
ubm-040-xorg-xfce|UBLinux module includes Xfce applications
ubm-055-xorg-qt-app|UBLinux module includes QT applications
ubm-080-multimedia|UBLinux module includes multimedia applications
ubm-004-linux-firmware|UBLinux module firmwares
ubm-021-xorg-fonts|UBLinux module includes basic fonts
ubm-035-xorg-qt5|UBLinux module includes QT5 libs
ubm-041-xorg-plasma|UBLinux module includes KDE Plasma applications
ubm-060-xorg-theme|UBLinux module includes GTK and icons themes
ubm-100-ublinux|UBLinux module include system utilites
1 UBM_NAME DESCRIPTION
2 ubm-001-linux UBLinux module the kernel and modules
3 ubm-010-core UBLinux module includes the core components
4 ubm-025-xorg-gl UBLinux module includes graphics accelerators
5 ubm-036-xorg-qt6 UBLinux module includes QT6 libs
6 ubm-050-xorg-gtk-app UBLinux module includes GTK applications
7 ubm-070-dm-lightdm UBLinux module includes Lightdm display manager
8 ubm-002-linux-headers UBLinux module headers and scripts for building modules for the Meta UBlinux kernel, modules, headers and documentation
9 ubm-020-xorg-base UBLinux module includes basic components Xorg
10 ubm-030-xorg-gtk UBLinux module includes GTK libs
11 ubm-040-xorg-xfce UBLinux module includes Xfce applications
12 ubm-055-xorg-qt-app UBLinux module includes QT applications
13 ubm-080-multimedia UBLinux module includes multimedia applications
14 ubm-004-linux-firmware UBLinux module firmwares
15 ubm-021-xorg-fonts UBLinux module includes basic fonts
16 ubm-035-xorg-qt5 UBLinux module includes QT5 libs
17 ubm-041-xorg-plasma UBLinux module includes KDE Plasma applications
18 ubm-060-xorg-theme UBLinux module includes GTK and icons themes
19 ubm-100-ublinux UBLinux module include system utilites

@ -0,0 +1,117 @@
cmake_minimum_required(VERSION 3.7)
project(ubinstall-gtk)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK REQUIRED gtk+-3.0)
include_directories(${GTK_INCLUDE_DIRS})
link_directories(${GTK_LIBRARY_DIRS})
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)
include_directories(${JSON_INCLUDE_DIRS})
link_directories(${JSON_LIBRARY_DIRS})
add_definitions(${JSON_CFLAGS_OTHER})
find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
option(WEBKIT_FOUND "No" OFF)
if(WEBKIT_LIBRARIES_FOUND)
option(WEBKIT_FOUND "Yes" ON)
PKG_CHECK_MODULES(WEBKIT REQUIRED webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
include_directories(${WEBKIT_INCLUDE_DIRS})
link_directories(${WEBKIT_LIBRARY_DIRS})
add_definitions(${WEBKIT_CFLAGS_OTHER})
endif()
set(GRESOURCE_C resources.c)
set(GRESOURCE_XML gresource.xml)
find_program(GLIB_COMPILE_RESOURCES NAMES glib-compile-resources REQUIRED)
add_custom_target(GLADE ubinstall-gtk.glade)
set(DEPENDFILES
../images/keyboard.png
../images/keyboard-ru.png
../images/map-time-zone.png
../images/slide-0.png
../images/slide-1.png
../images/slide-2.png
../images/slide-3.png
../images/slide-4.png
../images/slide-5.png
../images/slide-6.png
../images/slide-7.png
../images/slide-8.png
../images/slide-9.png
../images/slide-10.png
../images/slide-11.png
../images/slide-12.png
../ubinstall-gtk.glade
../ubinstall-gtk-language.glade
../ubinstall-gtk-keyboard.glade
../gresource.xml
../ubinstall-gtk.css
../modules.csv
)
file(COPY ${DEPENDFILES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
add_custom_command(
OUTPUT ${GRESOURCE_C}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${GLIB_COMPILE_RESOURCES}
ARGS
--generate-source
--target=${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
${GRESOURCE_XML}
VERBATIM
MAIN_DEPENDENCY ${GRESOURCE_XML}
DEPENDS
${GLADE}
)
add_custom_target(
dummy-resource
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
)
add_definitions(-DVTE_INCLUDE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \
-O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection")
set(SOURCE_FILES
ubinstall-gtk.c
ubinstall-gtk.h
ubl-strings.h
)
set(LIBRARIES
${GTK_LIBRARIES}
${WEBKIT_LIBRARIES}
${UTILS_LIBRARIES}
${VTE291_LIBRARIES}
${JSON_LIBRARIES}
pthread
ublsettings
ublsettings-gtk3
ublsettingsui-gtk3
)
add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C})
target_link_libraries(${PROJECT_NAME} PUBLIC ${LIBRARIES})
target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_BINARY_DIR})
set_source_files_properties(
${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}
PROPERTIES GENERATED TRUE
)
install(TARGETS ${PROJECT_NAME} DESTINATION bin)
add_dependencies(${PROJECT_NAME} dummy-resource)

@ -0,0 +1,773 @@
#include "ubinstall-gtk.h"
config main_config;
//functions
// void yon_load_proceed(YON_CONFIG_TYPE type){
// if (yon_config_load_register(type,,,NULL)){
// }
// }
double yon_size_long_convert_automatic(unsigned long bytes, char *size);
double yon_size_long_convert_automatic(unsigned long bytes, char *size){
int repeats;
double byte_float=bytes;
for (repeats=-1;byte_float>1024;repeats++){
byte_float=byte_float/1024;
}
if (repeats==-1) {
repeats=0;
byte_float=byte_float/1024;
}
switch(repeats){
case 0: (*size)='K';
break;
case 1: (*size)='M';
break;
case 2: (*size)='G';
break;
case 3: (*size)='T';
break;
}
return byte_float;
}
// standard functions
void on_keyboard_accept();
void on_keyboard_accept(){
}
ubinstall_keyboard_window *yon_ubinstall_keyboard_new(){
ubinstall_keyboard_window *window = malloc(sizeof(ubinstall_keyboard_window));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubinstall_keyboard);
window->MainWindow=yon_gtk_builder_get_widget(builder,"MainWindow");
window->StatusBox=yon_gtk_builder_get_widget(builder,"StatusBox");
window->headerBar=yon_gtk_builder_get_widget(builder,"headerBar");
window->CancelButton=yon_gtk_builder_get_widget(builder,"CancelButton");
window->SaveButton=yon_gtk_builder_get_widget(builder,"SaveButton");
window->LayoutsTree=yon_gtk_builder_get_widget(builder,"LayoutsTree");
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
// g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(),NULL);
return window;
}
void on_keyboard_clicked (GtkWidget *, main_window *widgets);
void on_keyboard_clicked (GtkWidget *, main_window *widgets){
ubinstall_keyboard_window *window = yon_ubinstall_keyboard_new();
yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->MainWindow),KEYBOARD_TITLE_LABEL,icon_path,"keyboard-window");
dictionary *dict = NULL;
yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets);
yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window);
gtk_tree_view_set_model(GTK_TREE_VIEW(window->LayoutsTree),GTK_TREE_MODEL(widgets->LayoutList));
g_signal_connect(G_OBJECT(window->SaveButton),"clicked",G_CALLBACK(on_keyboard_accept),dict);
gtk_widget_show(window->MainWindow);
}
void yon_language_selection_changed(GtkCellRenderer *, char *path, ubinstall_language_window *window);
void yon_language_selection_changed(GtkCellRenderer *, char *path, ubinstall_language_window *window){
GtkTreeIter iter;
int state;
if (gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(window->liststore1),&iter,path)){
gtk_tree_model_get(GTK_TREE_MODEL(window->liststore1),&iter,0,&state,-1);
gtk_list_store_set(window->liststore1,&iter,0,!state,-1);
}
}
void on_language_window_accept(GtkWidget *,dictionary *dict);
void on_language_window_accept(GtkWidget *,dictionary *dict){
main_window *widgets= yon_dictionary_get_data(dict->first,main_window*);
ubinstall_language_window *window = yon_dictionary_get_data(dict->first->next,ubinstall_language_window*);
yon_gtk_list_store_copy_full(widgets->LanguagesList,window->liststore1);
gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter));
config_str parsed = NULL;
int size;
GtkTreeIter iter;
for_iter(GTK_TREE_MODEL(window->liststore1),&iter){
char *current;
int status;
gtk_tree_model_get(GTK_TREE_MODEL(window->liststore1),&iter,0,&status,1,&current,-1);
if (status)
yon_char_parsed_add_or_create_if_exists(parsed,&size,current);
}
gtk_entry_set_text(GTK_ENTRY(widgets->AvailableLanguagesEntry),yon_char_parsed_to_string(parsed,size,", "));
on_subwindow_close(window->MainWindow);
free(window);
}
ubinstall_language_window *yon_ubinstall_language_new(){
ubinstall_language_window *window = malloc(sizeof(ubinstall_language_window));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubinstall_language);
window->liststore1=GTK_LIST_STORE(gtk_builder_get_object(builder,"liststore1"));
window->MainWindow=yon_gtk_builder_get_widget(builder,"MainWindow");
window->StatusBox=yon_gtk_builder_get_widget(builder,"StatusBox");
window->DefaultCheck=yon_gtk_builder_get_widget(builder,"DefaultCheck");
window->LanguagesTree=yon_gtk_builder_get_widget(builder,"LanguagesTree");
window->headerBar=yon_gtk_builder_get_widget(builder,"headerBar");
window->CancelButton=yon_gtk_builder_get_widget(builder,"CancelButton");
window->SaveButton=yon_gtk_builder_get_widget(builder,"SaveButton");
window->ToggleRenderer=GTK_CELL_RENDERER(gtk_builder_get_object(builder,"ToggleRenderer"));
g_signal_connect(G_OBJECT(window->DefaultCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->LanguagesTree);
g_signal_connect(G_OBJECT(window->ToggleRenderer),"toggled",G_CALLBACK(yon_language_selection_changed),window);
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
return window;
}
void on_language_clicked(GtkWidget *, main_window *widgets);
void on_language_clicked(GtkWidget *, main_window *widgets){
ubinstall_language_window *window = yon_ubinstall_language_new();
g_object_ref(G_OBJECT(window->liststore1));
gtk_tree_view_set_model(GTK_TREE_VIEW(window->LanguagesTree),NULL);
yon_gtk_list_store_copy_full(window->liststore1,widgets->LanguagesList);
gtk_tree_view_set_model(GTK_TREE_VIEW(window->LanguagesTree),GTK_TREE_MODEL(window->liststore1));
yon_gtk_window_setup(GTK_WINDOW(window->MainWindow),GTK_WINDOW(widgets->MainWindow),TITLE_LABEL,icon_path,"language-chooser-window");
dictionary *dict=NULL;
yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets);
yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window);
g_signal_connect(G_OBJECT(window->SaveButton),"clicked",G_CALLBACK(on_language_window_accept),dict);
gtk_widget_show(window->MainWindow);
}
/**config_init()
* [EN]
*
* [RU]
* Функция инициализации всех параметров конфигурации
*/
void config_init(){
main_config.always_open_documentation=0;
main_config.socket_id=-1;
main_config.save_socket_id=-1;
main_config.load_socket_id=-1;
main_config.lock_help=0;
main_config.lock_help=0;
main_config.lock_load_global=0;
main_config.lock_save_global=0;
main_config.lock_save_local=0;
main_config.debug_mode=0;
main_config.slider_thread=0;
}
int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled);
int yon_image_resize_from_container(GtkImage *target, GdkPixbuf *pixbuf_unscaled){
int width = gtk_widget_get_allocated_width(gtk_widget_get_parent(gtk_widget_get_parent(GTK_WIDGET(target))));
int height = gtk_widget_get_allocated_height(gtk_widget_get_parent(gtk_widget_get_parent(GTK_WIDGET(target))));
int newImgWidthDef = (width <= 217) ? width : width - 217;
int newImgHeightDef = (height <= 120) ? height : height - 217;
GdkPixbuf *pixBuf = pixbuf_unscaled;
int newImgHeight = (int)(gdk_pixbuf_get_height(pixBuf) / ((double) gdk_pixbuf_get_width(pixBuf) / newImgWidthDef));
if (newImgHeight > newImgHeightDef) {
newImgHeight = newImgHeightDef;
newImgWidthDef = newImgWidthDef;
}
int newImageWidth = (int)(gdk_pixbuf_get_width(pixBuf) / ((double) gdk_pixbuf_get_height(pixBuf) / newImgHeight));
GdkPixbuf *scaledPixBuf = gdk_pixbuf_scale_simple(pixBuf, abs(newImageWidth), abs(newImgHeight), GDK_INTERP_BILINEAR);
gtk_image_set_from_pixbuf(target, scaledPixBuf);
return 1;
}
void on_region_resized(GtkWidget *,main_window *widgets);
void on_region_resized(GtkWidget *,main_window *widgets){
int page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook));
switch(page){
case YON_PAGE_INSTALLATION: {
yon_image_resize_from_container(GTK_IMAGE(widgets->SlidesImage), widgets->slides_original);
} break;
case YON_PAGE_REGION: {
yon_image_resize_from_container(GTK_IMAGE(widgets->RegionImage), widgets->regions_original);
} break;
case YON_PAGE_KEYBOARD: {
yon_image_resize_from_container(GTK_IMAGE(widgets->KeyboardImage), widgets->keyboard_original);
} break;
}
}
void on_toggle_block(GtkToggleButton *self);
void on_toggle_block(GtkToggleButton *self){
int state = gtk_toggle_button_get_active(self);
g_signal_handlers_block_by_func(G_OBJECT(self),on_toggle_block,NULL);
gtk_toggle_button_set_active(self,!state);
g_signal_handlers_unblock_by_func(G_OBJECT(self),on_toggle_block,NULL);
}
void yon_switch_page_render(main_window *widgets, int page);
void yon_switch_page_render(main_window *widgets, int page){
GtkContainer *parent = GTK_CONTAINER(gtk_widget_get_parent(widgets->UsersToggle));
GList *list = gtk_container_get_children(parent);
for (guint i=0;i<g_list_length(list);i++){
if (i!=(guint)page){
g_signal_handlers_block_by_func(G_OBJECT(g_list_nth_data(list,i)),on_toggle_block,NULL);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_list_nth_data(list,i)),0);
g_signal_handlers_unblock_by_func(G_OBJECT(g_list_nth_data(list,i)),on_toggle_block,NULL);
} else {
g_signal_handlers_block_by_func(G_OBJECT(g_list_nth_data(list,i)),on_toggle_block,NULL);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(g_list_nth_data(list,i)),1);
g_signal_handlers_unblock_by_func(G_OBJECT(g_list_nth_data(list,i)),on_toggle_block,NULL);
}
}
}
int cur_slide=0;
gboolean on_image_slide(void *data);
gboolean on_image_slide(void *data){
main_window *widgets = (main_window*)data;
int size;
config_str target = yon_char_parsed_new(&size,slide_repeat_path);
g_object_unref(widgets->slides_original);
widgets->slides_original = gdk_pixbuf_new_from_resource_at_scale(target[cur_slide],600,400,1,NULL);
GtkWidget *parent = gtk_widget_get_parent(widgets->SlidesImage);
gtk_widget_destroy(widgets->SlidesImage);
widgets->SlidesImage = gtk_image_new();
gtk_container_add(GTK_CONTAINER(parent),widgets->SlidesImage);
gtk_widget_show(widgets->SlidesImage);
gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->SlidesImage),widgets->slides_original);
gtk_widget_queue_draw(widgets->SlidesImage);
if (cur_slide<size-1) cur_slide++; else cur_slide=0;
return 1;
}
void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets);
void on_page_changed(GtkWidget *,GtkWidget *,int page, main_window *widgets){
yon_switch_page_render(widgets,page>3?page-1:page);
switch(page){
case YON_PAGE_WELCOME: {
gtk_widget_hide(widgets->CancelInstallButton);
gtk_widget_set_sensitive(widgets->BackButton,0);
} break;
case YON_PAGE_LICENCE:{
gtk_widget_show(widgets->CancelInstallButton);
gtk_widget_set_sensitive(widgets->BackButton,1);
} break;
case YON_PAGE_REGION: {
yon_image_resize_from_container(GTK_IMAGE(widgets->RegionImage), widgets->regions_original);
} break;
case YON_PAGE_KEYBOARD: {
yon_image_resize_from_container(GTK_IMAGE(widgets->KeyboardImage), widgets->keyboard_original);
} break;
case YON_PAGE_OS_COMPONENTS:
case YON_PAGE_SOFTWARE:
yon_switch_page_render(widgets,3);
break;
case YON_PAGE_INSTALL_COMMON:
case YON_PAGE_INSTALL_SEPARATE:
case YON_PAGE_INSTALL_SAME_PARTITION: {
yon_switch_page_render(widgets,2);
}
}
}
void on_page_navigation_clicked(GtkWidget *self, main_window *widgets);
void on_page_navigation_clicked(GtkWidget *self, main_window *widgets){
int mode = self==widgets->NextButton ? 1 : self == widgets->BackButton ? -1 : self==widgets->CancelInstallButton?-2:0;
int page = gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->Notebook));
switch (mode){
case 1: { // Next
switch (page){
case YON_PAGE_SECTIONS:{ //sections
int active_id=-1;
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationRadio)))
active_id=0;
else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationRadio)))
active_id=1;
else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationRadio)))
active_id=2;
else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationRadio)))
active_id=3;
else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->InstallationRadio)))
active_id=4;
main_config.install_mode=active_id;
switch (active_id){
case 0:{ // normal installation
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALL_COMMON);
} break;
case 1:
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALL_SEPARATE);
break;
case 2:
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),YON_PAGE_INSTALL_SAME_PARTITION);
}
}break;
case YON_PAGE_REGION:{ //region
gtk_widget_set_sensitive(widgets->BackButton,1);
if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->RegionCombo))==-1){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),REGION_EMPTY_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(widgets->RegionCombo);
return;
} else if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->ZoneCombo))==-1){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),ZONE_EMPTY_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(widgets->ZoneCombo);
return;
} else if (yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(widgets->AvailableLanguagesEntry)))){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),LANGUAGES_EMPTY_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(widgets->AvailableLanguagesEntry);
return;
} else if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->LanguagesCombo))==-1){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),LOCALE_EMPTY_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(widgets->LanguagesCombo);
return;
}
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page+1);
}break;
case YON_PAGE_KEYBOARD: { //keyboard
gtk_widget_set_sensitive(widgets->BackButton,1);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->ManualLayoutRadio))){
GtkTreeIter iter;
if (!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->LayoutList),&iter)){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),LAYOUTS_CHOSEN_BUT_EMPTY_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(widgets->ManualLayoutRadio);
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->LayoutTree));
}
}
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page+1);
} break;
default:{ // all other pages
gtk_widget_set_sensitive(widgets->BackButton,1);
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page+1);
}break;
case YON_PAGE_SOFTWARE:
gtk_widget_set_sensitive(widgets->BackButton,0);
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page+1);
yon_config_save_simple(YON_CONFIG_BOTH,"");
yon_launch_app_with_arguments(start_fast_install_command,"");
break;
case YON_PAGE_INSTALL_COMMON: {
GtkTreeModel *model;
GtkTreeIter iter;
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->CommonInstallationDevicesTree)),&model,&iter)){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
return;
}
char *device;
gtk_tree_model_get(model,&iter,0,&device,-1);
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL,"fast");
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_DEVICE_command,device);
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),3);
if (!main_config.slider_thread)
main_config.slider_thread = g_timeout_add(5000,(GSourceFunc)on_image_slide,widgets);
}break;
case YON_PAGE_INSTALL_SEPARATE:
{
GtkTreeModel *model;
GtkTreeIter iter;
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->InstallationNearSysDevicesTree)),&model,&iter)){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
return;
}
char *device;
gtk_tree_model_get(model,&iter,0,&device,-1);
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->InstallationNearSysSectionTree)),&model,&iter)){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
return;
}
char *part;
gtk_tree_model_get(model,&iter,0,&part,-1);
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL,"near");
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_DEVICE_command,device);
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOSTART_PARTS,part);
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),3);
if (!main_config.slider_thread)
main_config.slider_thread = g_timeout_add(5000,(GSourceFunc)on_image_slide,widgets);
}
break;
case YON_PAGE_INSTALL_SAME_PARTITION:
{
GtkTreeModel *model;
GtkTreeIter iter;
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->InstallationNearSysDevicesTree)),&model,&iter)){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
return;
}
char *device;
gtk_tree_model_get(model,&iter,0,&device,-1);
if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->InstallationNearSysSectionTree)),&model,&iter)){
yon_ubl_status_box_spawn(GTK_CONTAINER(widgets->StatusBox),NO_DEVICE_CHOSEN_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(gtk_widget_get_parent(widgets->CommonInstallationDevicesTree));
return;
}
char *part;
gtk_tree_model_get(model,&iter,0,&part,-1);
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_TYPE_INSTALL,"near");
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOINSTALL_DEVICE_command,device);
yon_config_register(AUTOINSTALL_TYPE_INSTALL,AUTOSTART_PARTS,part);
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),3);
if (!main_config.slider_thread)
main_config.slider_thread = g_timeout_add(5000,(GSourceFunc)on_image_slide,widgets);
}
}
} break;
case -1: { // Previous
switch (page){
case YON_PAGE_REGION: {
gtk_widget_set_sensitive(widgets->BackButton,0);
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page-1);
}break;
case YON_PAGE_INSTALL_COMMON:
case YON_PAGE_INSTALL_SEPARATE:
case YON_PAGE_INSTALL_SAME_PARTITION:
{
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),2);
} break;
default:{
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),page-1);
}
}
} break;
case -2: { // Cancel/repeat
switch (page){
default:{
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->Notebook),0);
}
}
}break;
}
}
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);
int size;
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->ZoneCombo));
if (yon_file_is_directory(active)){
config_str parsed = yon_file_ls(active,&size);
for (int i=0;i<size;i++){
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(widgets->ZoneCombo),_(parsed[i]));
}
}
}
void on_locale_changed(GtkWidget *,main_window *);
void on_locale_changed(GtkWidget *,main_window *){
}
void on_additional_software_toggled();
void on_additional_software_toggled(){
}
/**yon_main_window_complete(main_window *widgets)
* [EN]
*
* [RU]
* Функция настройки основного окна приложения. [widgets] - структура со стандартным интерфейсом.
*/
main_window *yon_main_window_complete(){
main_window *widgets=NULL;
widgets = yon_remalloc(widgets,sizeof(main_window));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path);
// Custom widgets configuration
widgets->builder = builder;
widgets->DevicesList=GTK_LIST_STORE(gtk_builder_get_object(builder,"DevicesList"));
widgets->LanguagesList=GTK_LIST_STORE(gtk_builder_get_object(builder,"LanguagesList"));
widgets->MainWindow=yon_gtk_builder_get_widget(builder,"MainWindow");
widgets->WelcomeToggle=yon_gtk_builder_get_widget(builder,"WelcomeToggle");
widgets->LicenceToggle=yon_gtk_builder_get_widget(builder,"LicenceToggle");
widgets->LocationToggle=yon_gtk_builder_get_widget(builder,"LocationToggle");
widgets->KeyboardToggle=yon_gtk_builder_get_widget(builder,"KeyboardToggle");
widgets->SectionsToggle=yon_gtk_builder_get_widget(builder,"SectionsToggle");
widgets->UsersToggle=yon_gtk_builder_get_widget(builder,"USersToggle");
widgets->SummaryToggle=yon_gtk_builder_get_widget(builder,"SummaryToggle");
widgets->InstallationToggle=yon_gtk_builder_get_widget(builder,"InstallationToggle");
widgets->LanguageCombo=yon_gtk_builder_get_widget(builder,"LanguageCombo");
widgets->RegionCombo=yon_gtk_builder_get_widget(builder,"RegionCombo");
widgets->ZoneCombo=yon_gtk_builder_get_widget(builder,"ZoneCombo");
widgets->AvailableLanguagesEntry=yon_gtk_builder_get_widget(builder,"AvailableLanguagesEntry");
widgets->AvailableLanguagesButton=yon_gtk_builder_get_widget(builder,"AvailableLanguagesButton");
widgets->LanguagesCombo=yon_gtk_builder_get_widget(builder,"LanguagesCombo");
widgets->KeyboardModelCombo=yon_gtk_builder_get_widget(builder,"KeyboardModelCombo");
widgets->LayoutBindingCombo=yon_gtk_builder_get_widget(builder,"LayoutBindingCombo");
widgets->DefaultLayoutRadio=yon_gtk_builder_get_widget(builder,"DefaultLayoutRadio");
widgets->ManualLayoutRadio=yon_gtk_builder_get_widget(builder,"ManualLayoutRadio");
widgets->LayoutTree=yon_gtk_builder_get_widget(builder,"LayoutTree");
widgets->AddButton=yon_gtk_builder_get_widget(builder,"AddButton");
widgets->RemoveButton=yon_gtk_builder_get_widget(builder,"RemoveButton");
widgets->InstallationRadio=yon_gtk_builder_get_widget(builder,"InstallationRadio");
widgets->InstallationNearRadio=yon_gtk_builder_get_widget(builder,"InstallationNearRadio");
widgets->InstallationLinuxRadio=yon_gtk_builder_get_widget(builder,"InstallationLinuxRadio");
widgets->InstallationWindowsRadio=yon_gtk_builder_get_widget(builder,"InstallationWindowsRadio");
widgets->InstallationOptionsRadio=yon_gtk_builder_get_widget(builder,"InstallationOptionsRadio");
widgets->UserNameEntry=yon_gtk_builder_get_widget(builder,"UserNameEntry");
widgets->LoginEntry=yon_gtk_builder_get_widget(builder,"LoginEntry");
widgets->PasswordCombo=yon_gtk_builder_get_widget(builder,"PasswordCombo");
widgets->PasswordEntry=yon_gtk_builder_get_widget(builder,"PasswordEntry");
widgets->PasswordButton=yon_gtk_builder_get_widget(builder,"PasswordButton");
widgets->AutologinCheck=yon_gtk_builder_get_widget(builder,"AutologinCheck");
widgets->AdminPasswordCombo=yon_gtk_builder_get_widget(builder,"AdminPasswordCombo");
widgets->AdminPasswordEntry=yon_gtk_builder_get_widget(builder,"AdminPasswordEntry");
widgets->AdminPasswordButton=yon_gtk_builder_get_widget(builder,"AdminPasswordButton");
widgets->HotnameEntry=yon_gtk_builder_get_widget(builder,"HotnameEntry");
widgets->CancelInstallButton=yon_gtk_builder_get_widget(builder,"CancelInstallButton");
widgets->BackButton=yon_gtk_builder_get_widget(builder,"BackButton");
widgets->NextButton=yon_gtk_builder_get_widget(builder,"NextButton");
widgets->mainSettingsButton=yon_gtk_builder_get_widget(builder,"mainSettingsButton");
widgets->menu1=yon_gtk_builder_get_widget(builder,"menu1");
widgets->menu2=yon_gtk_builder_get_widget(builder,"menu2");
widgets->RegionImage = yon_gtk_builder_get_widget(builder,"RegionImage");
widgets->RegionBox = yon_gtk_builder_get_widget(builder,"RegionBox");
widgets->RegionAspect = yon_gtk_builder_get_widget(builder,"RegionAspect");
widgets->KeyboardImage = yon_gtk_builder_get_widget(builder,"KeyboardImage");
widgets->KeyboardBox = yon_gtk_builder_get_widget(builder,"KeyboardBox");
widgets->Notebook = yon_gtk_builder_get_widget(builder,"Notebook");
widgets->LicenceLabel = yon_gtk_builder_get_widget(builder,"LicenceLabel");
widgets->SlidesImage = yon_gtk_builder_get_widget(builder,"SlidesImage");
widgets->CommonInstallationDevicesTree = yon_gtk_builder_get_widget(builder,"CommonInstallationDevicesTree");
widgets->AdditionalSoftwareTree = yon_gtk_builder_get_widget(builder,"AdditionalSoftwareTree");
widgets->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
widgets->AdditionalSoftwareCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"AdditionalSoftwareCell"));
widgets->LanguagesList = GTK_LIST_STORE(gtk_builder_get_object(builder,"LanguagesList"));
widgets->LanguagesFilter = GTK_TREE_MODEL(gtk_builder_get_object(builder,"LanguagesFilter"));
widgets->LayoutList = GTK_TREE_STORE(gtk_builder_get_object(builder,"LayoutList"));
widgets->AdditionalSoftwareList = GTK_LIST_STORE(gtk_builder_get_object(builder,"AdditionalSoftwareList"));
g_signal_connect(G_OBJECT(widgets->Notebook),"switch-page",G_CALLBACK(on_page_changed),widgets);
g_signal_connect(G_OBJECT(widgets->MainWindow),"check-resize",G_CALLBACK(on_region_resized),widgets);
g_signal_connect(G_OBJECT(widgets->BackButton),"clicked",G_CALLBACK(on_page_navigation_clicked),widgets);
g_signal_connect(G_OBJECT(widgets->NextButton),"clicked",G_CALLBACK(on_page_navigation_clicked),widgets);
g_signal_connect(G_OBJECT(widgets->CancelInstallButton),"clicked",G_CALLBACK(on_page_navigation_clicked),widgets);
g_signal_connect(G_OBJECT(widgets->AvailableLanguagesButton),"clicked",G_CALLBACK(on_language_clicked),widgets);
g_signal_connect(G_OBJECT(widgets->RegionCombo),"changed",G_CALLBACK(on_region_changed),widgets);
g_signal_connect(G_OBJECT(widgets->AddButton),"clicked",G_CALLBACK(on_keyboard_clicked),widgets);
g_signal_connect(G_OBJECT(widgets->UsersToggle),"toggled",G_CALLBACK(on_toggle_block),NULL);
g_signal_connect(G_OBJECT(widgets->LicenceToggle),"toggled",G_CALLBACK(on_toggle_block),NULL);
g_signal_connect(G_OBJECT(widgets->WelcomeToggle),"toggled",G_CALLBACK(on_toggle_block),NULL);
g_signal_connect(G_OBJECT(widgets->KeyboardToggle),"toggled",G_CALLBACK(on_toggle_block),NULL);
g_signal_connect(G_OBJECT(widgets->LocationToggle),"toggled",G_CALLBACK(on_toggle_block),NULL);
g_signal_connect(G_OBJECT(widgets->SectionsToggle),"toggled",G_CALLBACK(on_toggle_block),NULL);
g_signal_connect(G_OBJECT(widgets->InstallationToggle),"toggled",G_CALLBACK(on_toggle_block),NULL);
g_signal_connect(G_OBJECT(widgets->LanguageCombo),"changed",G_CALLBACK(on_locale_changed),widgets);
g_signal_connect(G_OBJECT(widgets->AdditionalSoftwareCell),"toggled",G_CALLBACK(on_additional_software_toggled),widgets);
// g_signal_connect(G_OBJECT(widgets->InstallationToggle),"toggled",G_CALLBACK(on_toggle_block),widgets);
gtk_tree_model_filter_set_visible_column(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter),0);
gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(widgets->LanguagesFilter));
gtk_window_set_title(GTK_WINDOW(widgets->MainWindow),TITLE_LABEL);
gtk_window_set_icon_name(GTK_WINDOW(widgets->MainWindow),icon_path);
int size;
config_str parsed = yon_file_open(licence_path,&size);
if (size){
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);
}
widgets->regions_original = gdk_pixbuf_new_from_resource(regions_path,NULL);
widgets->keyboard_original = gdk_pixbuf_new_from_resource(keyboard_path,NULL);
widgets->slides_original = gdk_pixbuf_new_from_resource(slide_0_path,NULL);
int width = gdk_pixbuf_get_width(widgets->regions_original);
int height = gdk_pixbuf_get_height(widgets->regions_original);
widgets->region_height_mult = (float)height/width;
gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->RegionImage),gdk_pixbuf_scale_simple(widgets->regions_original,600,400,GDK_INTERP_BILINEAR));
gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->KeyboardImage),gdk_pixbuf_scale_simple(widgets->keyboard_original,600,400,GDK_INTERP_BILINEAR));
gtk_image_set_from_pixbuf(GTK_IMAGE(widgets->SlidesImage),gdk_pixbuf_scale_simple(widgets->slides_original,600,400,GDK_INTERP_BILINEAR));
GtkTreeIter iter;
gtk_list_store_clear(widgets->LanguagesList);
parsed = yon_file_open(languages_path,&size);
for (int i=0;i<size;i++){
int cur_size;
yon_char_remove_last_symbol(parsed[i],'\n')
config_str cur = yon_char_parse(parsed[i],&cur_size,";");
if (cur_size){
gtk_list_store_append(widgets->LanguagesList,&iter);
gtk_list_store_set(widgets->LanguagesList,&iter,0,0,1,cur[1],2,cur[0],-1);
}
yon_char_parsed_free(cur,cur_size);
}
yon_char_parsed_free(parsed,size);
parsed = yon_dir_get_contents(zone_path,&size);
for (int i=0;i<size;i++){
if (!strstr(parsed[i],".")&&strcmp(parsed[i],"posix")&&strcmp(parsed[i],"right")){
char *path = yon_char_append(zone_path,parsed[i]);
if (yon_file_is_directory(path)){
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->RegionCombo),path,_(parsed[i]));
}
free(path);
}
}
yon_char_parsed_free(parsed,size);
parsed = yon_config_load(get_layouts_command,&size);
GtkTreeIter itar;
for (int i=0;i<size;i++){
yon_char_remove_last_symbol(parsed[i],'\n');
int layout_size;
config_str layout = yon_char_parse(parsed[i],&layout_size,"|");
if (layout_size){
char *layout_id = yon_char_new(layout[0]);
gtk_tree_store_append(widgets->LayoutList,&iter,NULL);
gtk_tree_store_set(widgets->LayoutList,&iter,0,layout[0],1,_(layout[1]),2,0,-1);
yon_char_parsed_free(layout,layout_size);
layout = yon_config_load(get_layouts_local_command(layout_id),&layout_size);
for (int j=0;j<layout_size;j++){
yon_char_remove_last_symbol(layout[j],'\n');
int parsed_size;
config_str layouts_parsed = yon_char_parse(layout[j],&parsed_size,"|");
if (parsed_size){
gtk_tree_store_append(widgets->LayoutList,&itar,&iter);
gtk_tree_store_set(widgets->LayoutList,&itar,0,layouts_parsed[0],1,_(layouts_parsed[1]),2,1,3,0,-1);
yon_char_parsed_free(layouts_parsed,parsed_size);
}
}
if (layout_size==-1) {
gtk_tree_store_set(widgets->LayoutList,&iter,2,1,-1);
}
yon_char_parsed_free(layout,layout_size);
}
}
yon_char_parsed_free(parsed,size);
parsed = yon_config_load(get_devices_command,&size);
char *string = yon_char_parsed_to_string(parsed,size,"");
struct json_object *root;
struct json_object *blockdevices;
root = json_tokener_parse(string);
json_object_object_get_ex(root, "blockdevices", &blockdevices);
for (long unsigned int i = 0; i < json_object_array_length(blockdevices); i++) {
struct json_object *device = json_object_array_get_idx(blockdevices, i);
struct json_object *path, *size, *model, *vendor, *serial;
json_object_object_get_ex(device, "path", &path);
json_object_object_get_ex(device, "size", &size);
json_object_object_get_ex(device, "model", &model);
json_object_object_get_ex(device, "vendor", &vendor);
json_object_object_get_ex(device, "serial", &serial);
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),-1);
}
yon_char_parsed_free(parsed,size);
parsed = yon_resource_open_file(additional_software_path,&size);
for (int i=1;i<size;i++){
int module_size;
config_str module_parsed = yon_char_parse(parsed[i],&module_size,"|");
if (module_size){
gtk_list_store_append(widgets->AdditionalSoftwareList,&iter);
gtk_list_store_set(widgets->AdditionalSoftwareList,&iter,0,1,1,module_parsed[0],3,module_parsed[1],-1); //2,module_parsed[2]
}
}
return widgets;
}
int main(int argc, char *argv[]){
local=setlocale(LC_ALL, "");
textdomain (LocaleName);
config_init();
int option_index=0;
int show_help=0;
{
struct option long_options[] = {
{"help", 0, 0, 'h'},
{"version", 0, 0, 'V'},
{"lock-help", 0,0, 1},
{"lock-save", 0,0, 2},
{"lock-save-local", 0,0, 3},
{"lock-save-global", 0,0, 4},
{"lock-load-global", 0,0, 5},
{"socket-id", 1, 0, 's'},
{"socket-ext-id", 1,0, 'e'},
{"socket-trd-id", 1,0, 't'},
{"clear-config", 0,0, 'c'},
{"debug", 0,0, 'd'},
{ NULL, 0, NULL, 0 }
};
for (int i=0;i<argc;i++){
int argument=getopt_long(argc,argv,"hVvs:e:t:cd",long_options,&option_index);
switch(argument){
case 'h':
show_help=1;
break;
case 'v':
case 'V':
printf("%s\n",VERSION_LABEL);
exit(0);
break;
case 's':
if(optarg)
main_config.socket_id=atoi(optarg);
break;
case 'e':
if(optarg)
main_config.save_socket_id=atoi(optarg);
break;
case 't':
if(optarg)
main_config.load_socket_id=atoi(optarg);
break;
case 'c': if (system(yon_char_unite("rm -rfd ", yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",NULL))){};
break;
case 'd': main_config.debug_mode=1;
break;
case 1:
main_config.lock_help=1;
break;
case 2:
main_config.lock_save_local=1;
main_config.lock_save_global=1;
break;
case 3:
main_config.lock_save_local=1;
break;
case 4:
main_config.lock_save_global=1;
break;
case 5:
main_config.lock_load_global=1;
break;
}
}
if (show_help==1&&main_config.lock_help!=1){
printf("%s\n",HELP_LABEL(NULL));
exit(0);
}
}
if (getuid()!=0){
main_config.lock_load_global=1;
main_config.lock_save_global=1;
main_config.lock_save_local=1;
}
gtk_init(&argc,&argv);
main_window *widgets = NULL;
widgets = yon_main_window_complete((main_window*)widgets);
yon_window_config_setup(GTK_WINDOW(widgets->MainWindow));
yon_window_config_load(config_path);
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);
gtk_main();
}

@ -0,0 +1,227 @@
#include <gtk/gtk.h>
#include <gtk/gtkx.h>
#include <locale.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <libintl.h>
#include <getopt.h>
#include <libintl.h>
#include <json-c/json.h>
#include <sys/statvfs.h>
#include <libublsettings.h>
#include <libublsettings-gtk3.h>
#ifdef WEBKIT_FOUND
#include <webkit2/webkit2.h>
#endif
#include "ubl-strings.h"
#define WIKI_LINK "https://wiki.ublinux.ru/ru/Программное_обеспечениерограммы_и_утилиты/Все/ubinstall-gtk-output"
#define _(String) gettext(String)
#define glade_path "/com/ublinux/ui/ubinstall-gtk.glade"
#define glade_path_ubinstall_keyboard "/com/ublinux/ui/ubinstall-gtk-keyboard.glade"
#define glade_path_ubinstall_language "/com/ublinux/ui/ubinstall-gtk-language.glade"
#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 icon_path "com.ublinux.ubinstall-gtk-gui"
#define LocalePath "/usr/share/locale"
#define LocaleName "ubinstall-gtk"
#define clear_config_both_command "ubconfig remove TEMP_SECTION TEMP_PATAMETER"
#define clear_config_global_command "ubconfig --target global remove TEMP_SECTION TEMP_PATAMETER"
#define clear_config_local_command "ubconfig --target system remove TEMP_SECTION TEMP_PATAMETER"
#define regions_path "/com/ublinux/images/map-time-zone.png"
#define keyboard_path "/com/ublinux/images/keyboard.png"
#define licence_path "/usr/share/ublinux/agreement/EULA.txt"
#define languages_path "/usr/share/ubinstall-gtk/csv/locales.csv"
#define zone_path "/usr/share/zoneinfo/"
#define additional_software_path "resource:///com/ublinux/csv/modules.csv"
#define slide_0_path "/com/ublinux/images/slide-0.png"
#define slide_repeat_path "/com/ublinux/images/slide-1.png", \
"/com/ublinux/images/slide-2.png", \
"/com/ublinux/images/slide-3.png", \
"/com/ublinux/images/slide-4.png", \
"/com/ublinux/images/slide-5.png", \
"/com/ublinux/images/slide-6.png", \
"/com/ublinux/images/slide-7.png", \
"/com/ublinux/images/slide-8.png", \
"/com/ublinux/images/slide-9.png", \
"/com/ublinux/images/slide-10.png", \
"/com/ublinux/images/slide-11.png", \
"/com/ublinux/images/slide-12.png", \
NULL
#define get_layouts_command "xkbcli list --load-exotic | awk \"layout && /description:/ {match(\\$0,/: *(.*)/,matches);description=matches[1];printf \\\"%s|%s\\n\\\",layout,description;layout=\\\"\\\"} /layout:/ {match(\\$0, /: *'([^']+)'/,matches);l=matches[1];if (layouts[l]) next;layout=layouts[l]=l}\" | sort -u"
#define get_layouts_local_command(layout) yon_char_unite("xkbcli list --load-exotic | awk -v layout=\"",layout,"\" \"BEGIN {layout_pattern = sprintf(\\\"^ *- *layout: *'%s'\\\",layout);matched=0} matched && /variant:/ {match(\\$0, /: *'([^']+)'/, matches);variant = matches[1]} matched && /description:/ {match(\\$0, /: *(.+)/, matches);description = matches[1]} matched && /^ *-/{matched=0; if (variant) printf \\\"%s|%s\\n\\\",variant,description} \\$0 ~ layout_pattern {matched=1;variant=\\\"\\\";description=\\\"\\\";next}\" | sort -u",NULL)
#define get_devices_command "lsblk --noheadings --nodeps -Jo PATH,SIZE,MODEL,VENDOR,SERIAL --exclude 7,253"
#define AUTOINSTALL_TYPE_INSTALL "AUTOINSTALL[type_install]"
#define AUTOINSTALL_DEVICE "AUTOINSTALL[device]"
#define AUTOSTART_PARTS "AUTOINSTALL[part]"
#define AUTOINSTALL_DEVICE_command "ubconfig --source global get AUTOINSTALL[device]"
#define start_fast_install_command "ubinstall2 --autoinstall"
typedef char* string;
string version_application;
char *local;
enum YON_PAGES {
YON_PAGE_WELCOME = 0,
YON_PAGE_LICENCE,
YON_PAGE_SECTIONS,
YON_PAGE_OS_COMPONENTS,
YON_PAGE_SOFTWARE,
YON_PAGE_INSTALLATION,
YON_PAGE_REGION,
YON_PAGE_KEYBOARD,
YON_PAGE_USERS,
YON_PAGE_COMPLETION,
YON_PAGE_COMPLETED,
YON_PAGE_INSTALL_COMMON,
YON_PAGE_INSTALL_SEPARATE,
YON_PAGE_INSTALL_SAME_PARTITION
};
typedef struct {
int socket_id;
int load_socket_id;
int save_socket_id;
int lock_help;
int lock_save_local;
int lock_save_global;
int lock_load_global;
int always_open_documentation;
int debug_mode;
guint slider_thread;
int install_mode;
} config;
typedef struct {
GtkBuilder *builder;
GtkListStore *DevicesList;
GtkListStore *LanguagesList;
GtkTreeStore *LayoutList;
GtkListStore *AdditionalSoftwareList;
GtkWidget *MainWindow;
GtkWidget *StatusBox;
GtkWidget *WelcomeToggle;
GtkWidget *LicenceToggle;
GtkWidget *LocationToggle;
GtkWidget *KeyboardToggle;
GtkWidget *SectionsToggle;
GtkWidget *UsersToggle;
GtkWidget *SummaryToggle;
GtkWidget *InstallationToggle;
GtkWidget *LanguageCombo;
GtkWidget *RegionCombo;
GtkWidget *ZoneCombo;
GtkWidget *AvailableLanguagesEntry;
GtkWidget *AvailableLanguagesButton;
GtkWidget *LanguagesCombo;
GtkWidget *KeyboardModelCombo;
GtkWidget *LayoutBindingCombo;
GtkWidget *DefaultLayoutRadio;
GtkWidget *ManualLayoutRadio;
GtkWidget *LayoutTree;
GtkWidget *AddButton;
GtkWidget *RemoveButton;
GtkWidget *InstallationRadio;
GtkWidget *InstallationNearRadio;
GtkWidget *InstallationLinuxRadio;
GtkWidget *InstallationWindowsRadio;
GtkWidget *InstallationOptionsRadio;
GtkWidget *UserNameEntry;
GtkWidget *LoginEntry;
GtkWidget *PasswordCombo;
GtkWidget *PasswordEntry;
GtkWidget *PasswordButton;
GtkWidget *AutologinCheck;
GtkWidget *AdminPasswordCombo;
GtkWidget *AdminPasswordEntry;
GtkWidget *AdminPasswordButton;
GtkWidget *HotnameEntry;
GtkWidget *CancelInstallButton;
GtkWidget *BackButton;
GtkWidget *NextButton;
GtkWidget *mainSettingsButton;
GtkWidget *menu1;
GtkWidget *menu2;
GtkWidget *RegionImage;
GtkWidget *RegionBox;
GtkWidget *RegionAspect;
GtkWidget *KeyboardImage;
GtkWidget *KeyboardBox;
GtkWidget *Notebook;
GtkWidget *LicenceLabel;
GtkWidget *SlidesImage;
GtkCellRenderer *AdditionalSoftwareCell;
GtkWidget *CommonInstallationDevicesTree;
GtkWidget *AdditionalSoftwareTree;
GtkTreeModel *LanguagesFilter;
GdkPixbuf *regions_original;
GdkPixbuf *keyboard_original;
GdkPixbuf *slides_original;
float region_height_mult;
} main_window;
typedef struct {
GtkWidget *Window;
GtkWidget *AlwaysOpenCheck;
GtkWidget *CloseButton;
GtkWidget *AcceptButton;
} documentation_confirmation_window;
typedef struct{
GtkWidget *MainWindow;
GtkWidget *StatusBox;
GtkWidget *headerBar;
GtkWidget *CancelButton;
GtkWidget *SaveButton;
GtkWidget *LayoutsTree;
} ubinstall_keyboard_window;
typedef struct{
GtkListStore *liststore1;
GtkWidget *MainWindow;
GtkWidget *StatusBox;
GtkWidget *DefaultCheck;
GtkWidget *headerBar;
GtkWidget *CancelButton;
GtkWidget *SaveButton;
GtkWidget *LanguagesTree;
GtkCellRenderer *ToggleRenderer;
} ubinstall_language_window;
void config_init();
main_window *yon_main_window_complete();
ubinstall_language_window *yon_ubinstall_language_new();
void NewFunction(ubinstall_language_window *window, GtkBuilder *builder);
ubinstall_keyboard_window *yon_ubinstall_keyboard_new();

@ -0,0 +1,77 @@
#define VERSION_LABEL yon_char_unite(_("Version:")," ",!yon_char_is_empty(version_application)?version_application:"","\n",NULL)
#define HELP_LABEL(rest) yon_char_unite(LocaleName,_(" version:")," ", !yon_char_is_empty(version_application)?version_application:"","\n",TITLE_LABEL,"\n",_("Usage:"), " ",LocaleName," ",_("[OPTIONS]"),"\n",_("Options:"),"\n\t--help, -h\t\t\t",_("Show this help"),"\n\t--version, -V\t\t\t",_("Show package version"),"\n\t--lock-help\t\t\t",_("Lock this help menu"),"\n\t--lock-save\t\t\t",_("Lock configuration saving"),"\n\t--lock-save-local\t\t",_("Lock local configration saving"),"\n\t--lock-save-global\t\t",_("Lock global configration saving"),"\n\t--lock-load-global\t\t",_("Lock global configration loading"),"\n\t--clear-config\t\t\t",_("Reset application settings"),"\n",!yon_char_is_empty(rest)?rest:NULL,NULL)
#define TITLE_LABEL _("ubinstall")
#define WELCOME_LABEL _("Welcome to UBLinux installation")
#define WELCOME_BOTTOM_LABEL _("This program will ask you few questions\nand help you install UBLinux on your computer")
#define KEYBOARD_TITLE_LABEL _("Keyboard layout")
#define CANCEL_LABEL _("Cancel")
#define BACK_LABEL _("Back")
#define NEXT_LABEL _("Next")
#define WELCOME_TAB_LABEL _("Welcome")
#define LICENCE_TAB_LABEL _("Licence\nagreement")
#define SECTIONS_TAB__LABEL _("Sections")
#define INSTALLATION_TAB_LABEL _("Installation")
#define LOCATION_TAB_LABEL _("Location")
#define KEYBOARD_TAB_LABEL _("Keyboard")
#define USERS_TAB_LABEL _("Users")
#define COMPLETION_TAB_LABEL _("Completion")
#define COMMON_INSTALL_INFO_LABEL _("Deleting all data on the selected disk and then installing the UBLinux system")
#define NEAR_INSTALL_LABEL _("Installation next to another system")
#define NEAR_INSTALL_INFO_LABEL _("Shrinking a partition and creating a new one for installing UBLinux")
#define SHRINK_SECTION_INSTALL_LABEL _("Installation on the same partition as another system")
#define SHRINK_SECTION_INSTALL_INFO_LABEL _("Unpacking the UBLinux file system into an existing system")
#define ADDITIONAL_INSTALL_INFO_LABEL _("Selecting additional software to install from the repository via the Internet")
#define CHOSEN_LABEL _("Chosen")
#define MODULE_NAME_LABEL _("Module name")
#define TAG_LABEL _("Tag")
#define DESCRIPTION_LABEL _("Description")
#define INSTALLATION_COMPLETION_LABEL _("Installation completion")
#define LOCATION_LABEL _("Location")
#define REGION_LABEL _("Region:")
#define ZONE_LABEL _("Zone:")
#define LANGUAGE_LABEL _("Language:")
#define KEYBOARD_MODEL_LABEL _("Keyboard model:")
#define LAYOUT_CHANGING_LABEL _("Layout changing:")
#define DEFAUL_LAYOUT_LABEL _("Default layout (ru)")
#define DEFINE_LABEL _("Define")
#define ACCOUNT_NAME_LABEL _("Your account name:")
#define LOGIN__LABEL _("Login:")
#define PASSWORD__LABEL _("Password")
#define DEFAULT_LABEL _("Default")
#define SET_PASSWORD_LABEL _("Set a password")
#define DO_NOT_SET_PASSWORD_LABEL _("Do no set a password")
#define AUTOMATIC_LOGIN_LABEL _("Automatic login without password prompt")
#define ADMIN_PASSWORD_LABEL _("Administrator password (root):")
#define COMPUTER_NAME_LABEL _("Computer name:")
#define USER_LABEL _("User")
#define COMPLETION_LABEL _("Completion")
#define INSTALLATION_COMPLETION_LABEL _("Installation completion")
#define SELECT_DEVICE_LABEL _("Select device:")
#define CHOOSE_SECTION_LABEL _("Choose a section:")
#define ATTENSION_LABEL _("Attention! The selected partition will be modified: the size will be reduced. In the resulting free space, a partition will be created into which the UBLinux OS will be\ninstalled.")
#define DEVICE_LABEL _("Device")
#define MARK_LABEL _("Mark")
#define SIZE_LABEL _("Size")
#define FREE_LABEL _("Free")
#define SPECIFY_LABEL _("Specify the size of the new partition for UBLinux OS:")
#define TB_LABEL _("Tb")
#define GB_LABEL _("Gb")
#define MB_LABEL _("Mb")
#define AVALIABLE_LANGUAGES_LABEL _("Available languages in the system:")
#define NO_DEVICE_CHOSEN_LABEL _("No device were chosen")
#define INSTALLATION_PARAMETERS_LABEL _("Installation parameters")
#define KEYBOARD__LABEL _("Keyboard layout language")
#define REGION_EMPTY_LABEL _("Region were not fullified")
#define ZONE_EMPTY_LABEL _("Zone were not fullified")
#define LANGUAGES_EMPTY_LABEL _("Languages list is empty")
#define LOCALE_EMPTY_LABEL _("System locale hasn't been chosen")
#define LAYOUTS_CHOSEN_BUT_EMPTY_LABEL _("Manual layouts has been chosen but empty")

@ -0,0 +1,157 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkWindow" id="MainWindow">
<property name="width-request">200</property>
<property name="height-request">400</property>
<property name="can-focus">False</property>
<property name="default-width">800</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkBox" id="StatusBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="LayoutsTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="headers-visible">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">column</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="visible">2</attribute>
<attribute name="active">3</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<object class="GtkHeaderBar" id="headerBar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child type="title">
<object class="GtkLabel" id="headerTopic">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Keyboard layout language</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
<child>
<object class="GtkImage" id="HeadImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="pixel-size">32</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3</property>
</object>
</child>
<child>
<object class="GtkButton" id="CancelButton">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="SaveButton">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="pack-type">end</property>
<property name="position">2</property>
</packing>
</child>
<style>
<class name="toolbar"/>
</style>
</object>
</child>
</object>
</interface>

@ -0,0 +1,168 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name gboolean1 -->
<column type="gboolean"/>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
<!-- column-name gchararray2 -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkWindow" id="MainWindow">
<property name="width-request">200</property>
<property name="height-request">400</property>
<property name="can-focus">False</property>
<property name="default-width">800</property>
<property name="icon-name">com.ublinux.ubinstall-gui</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkBox" id="StatusBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="DefaultCheck">
<property name="label" translatable="yes">Default</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="LanguagesTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">liststore1</property>
<property name="headers-visible">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<child>
<object class="GtkCellRendererToggle" id="ToggleRenderer"/>
<attributes>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<object class="GtkHeaderBar" id="headerBar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child type="title">
<object class="GtkLabel" id="headerTopic">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Available languages in the system</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
<child>
<object class="GtkImage" id="HeadImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="pixel-size">32</property>
<property name="icon-name">com.ublinux.ubinstall-gui</property>
</object>
</child>
<child>
<object class="GtkButton" id="CancelButton">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="SaveButton">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
</object>
<packing>
<property name="pack-type">end</property>
<property name="position">2</property>
</packing>
</child>
<style>
<class name="toolbar"/>
</style>
</object>
</child>
</object>
</interface>

@ -0,0 +1,208 @@
.thin {
margin:0px;
padding:0px;
}
.noborder {
border:none;
}
.nobackground {
background:transparent;
}
.nobackground:active {
background:transparent;
}
.textHead{
text-shadow: 2px 2px @theme_bg_color;
color: @theme_text_color;
}
.inherited>* {
border:none;
background:inherit;
}
.workingbg {
background:@theme_base_color;
}
.menuitembottom{
margin-top:0px;
margin-bottom:3px;
border-color:inherit;
border-left-width:inherit;
border-right-width:inherit;
}
.menuitemmiddle{
margin-top:0px;
margin-bottom:0px;
border-color:inherit;
border-left-width:inherit;
border-right-width:inherit;
}
.menuitemtop{
margin-bottom:0px;
border-color:inherit;
border-top-width:inherit;
border-left-width:inherit;
border-right-width:inherit;
}
.menuitemtop >*{
margin:4px 2px 0 2px;
padding: 3px 10px 3px 5px;
border:transparent;
}
.menuitemmiddle >*{
margin:0 2px 0 2px;
padding: 3px 10px 3px 5px;
border:transparent;
}
.menuitembottom >*{
margin:0 2px 2px 2px;
padding: 3px 10px 3px 5px;
}
.menuitemtop:hover {
background:@theme_bg_color;
border-color:inherit;
border-top-width:inherit;
border-left-width:inherit;
border-right-width:inherit;
}
.menuitemmiddle:hover {
background:@theme_bg_color;
border-color:inherit;
border-left-width:inherit;
border-right-width:inherit;
}
.menuitembottom:hover {
background:@theme_bg_color;
border-color:inherit;
border-bottom-width:0px;
border-left-width:inherit;
border-right-width:inherit;
}
.menuitemtop:hover>* {
margin:4px 2px 0 2px;
padding: 3px 10px 3px 5px;
background:@theme_selected_bg_color;
border-radius:2px;
}
.menuitemmiddle:hover>* {
margin:0 2px 0 2px;
padding: 3px 10px 3px 5px;
background:@theme_selected_bg_color;
border-radius:2px;
}
.menuitembottom:hover>* {
margin:0 2px 2px 2px;
padding: 3px 10px 3px 5px;
background:@theme_selected_bg_color;
border-radius:2px;
}
.boxInfoMessError{
background-color: #ea9999;
}
.boxInfoMessOK{
background-color: #f3f0ac;
}
.errorBox {
border-width: 2px;
border-color: #ea9999;
border-style:solid;
}
.chosenOutline{
transition: 0ms;
border-width: 1px;
border-color: #f3f0ac;
border-style:solid;
}
.separatorTop{
border-color: darker (@theme_bg_color);
border-top-width:1px;
border-style:solid;
}
.separatorBottom{
border-color: darker (@theme_bg_color);
border-bottom-width:1px;
border-style:solid;
}
.marginright image{
margin-right: 2px;
}
.spinner_image{
-gtk-icon-transform: scale(2);
}
treeview row:nth-child(odd) { background-color: #000000; }
treeview row:nth-child(even) { background-color: #ffffff; }
.blackbg {
background-color: @theme_text_color;
}
.toggletabs {
background-color: @background_color;
border:none;
border-radius:0px;
transition:0;
padding-top:7px;
padding-bottom:7px;
}
.toggletabs:checked {
background:@theme_base_color;
border-radius:0px;
color:inherit;
padding-top:7px;
padding-bottom:7px;
}
.toggletabs:checked>* {
background:@theme_base_color;
border-radius:0px;
color:inherit;
}
.toggletabs:checked:disabled {
background:@theme_base_color;
border-radius:0px;
color:inherit;
padding-top:7px;
padding-bottom:7px;
}
.toggletabs:checked>*:disabled {
background:@theme_base_color;
border-color:inherit;
border-style:solid;
border-radius:0px;
color:inherit;
}
.toggletabs:active {
background-color: @background_color;
border:none;
border-radius:0px;
transition:0;
padding-top:7px;
padding-bottom:7px;
}
.toggletabs:active>* {
background:@background_color;
border-radius:0px;
color:inherit;
}
.menubox {
background-color:@theme_text_color;
}
.menubox *{
color:@theme_base_color;
}

@ -0,0 +1,12 @@
[Desktop Entry]
Version=2.35
Encoding=UTF-8
Name=Установка UBLinux
Comment=ubinstall-gtk
Comment[ru]=Установка UBLinux
Icon=ubinstall-gtk
Terminal=false
Type=Application
Exec=/bin/ubinstall-gtk
Categories=Settings;System;
StartupNotify=true

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

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