Merge pull request 'Version 2 debug' (#1) from YanTheKaller/ubl-settings-system:master into master

Reviewed-on: #1
pull/27/head^2 v2.0
Dmitry Razumov 2 years ago
commit 6469e69ac2

12
.gitignore vendored

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

@ -0,0 +1,155 @@
#!/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 /,-,${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"; \
echo "$${LATEST_TAG} is empty"; \
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}/usr/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}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \
rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \
done
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg"
@cp ./com.ublinux.${PKGNAME}.policy ./compile/com.ublinux.${PKGNAME}${PKGIDENT}.policy
@sed -e 's+/usr/bin+${PREFIX}/bin+' -e 's+.run+${PKGIDENT}.run+g' ./compile/com.ublinux.${PKGNAME}${PKGIDENT}.policy -i
@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/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.checked.svg"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.warning.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/polkit-1/actions/" "${CMAKE_BUILD_DIR}/com.ublinux.${PKGNAME}${PKGIDENT}.policy"
@install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/csv/" "locales.csv"
@install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/csv/" "fonts.csv"
@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 "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 "... compile"; \
echo "... install"; \
echo "... uninstall"; \
echo "... clean"

@ -1,2 +1,29 @@
# ubl-settings-system # ubl-settings-system
# Выполнить
# Build
In order to build ubl-settings-system you will need:
- CMake
- C compiler
- GTK+ 3 & dependencies
- webkit2gtk (optional)
Once you have all the necessary dependencies, you can use:
```sh
$ make
```
# Installation
After a successful build, just use:
```sh
$ sudo make install clean
```
# Uninstallation
After a successful build, just use:
```sh
$ sudo make uninstall
```
![alt text](screenshot/screenshot.png)

@ -0,0 +1,327 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="24"
height="24"
version="1.1"
viewBox="0 0 24 24"
id="svg25"
sodipodi:docname="checked.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">
<sodipodi:namedview
id="namedview27"
pagecolor="#ffffff"
bordercolor="#999999"
borderopacity="1"
inkscape:pageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="14.8125"
inkscape:cx="-4.6919831"
inkscape:cy="9.9578059"
inkscape:window-width="1920"
inkscape:window-height="1027"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg25" />
<defs
id="defs19">
<style
id="current-color-scheme"
type="text/css">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style3">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style5">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style7">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style9">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style11">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style13">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style15">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
<style
type="text/css"
id="style17">.ColorScheme-Text {
color:#31363b;
}
.ColorScheme-Background{
color:#eff0f1;
}
.ColorScheme-ViewText {
color:#31363b;
}
.ColorScheme-ViewBackground{
color:#fcfcfc;
}
.ColorScheme-ViewHover {
color:#3daee9;
}
.ColorScheme-ViewFocus{
color:#3daee9;
}
.ColorScheme-ButtonText {
color:#31363b;
}
.ColorScheme-ButtonBackground{
color:#eff0f1;
}
.ColorScheme-ButtonHover {
color:#3daee9;
}
.ColorScheme-ButtonFocus{
color:#3daee9;
}</style>
</defs>
<path
id="path21"
d="M 12 1 C 5.906 1 1 5.906 1 12 C 1 18.094 5.906 23 12 23 C 18.094 23 23 18.094 23 12 C 23 5.906 18.094 1 12 1 z M 15.480469 8.9042969 C 16.392469 8.8782969 16.860031 9.9850937 16.207031 10.621094 L 11 15.828125 L 8.09375 12.921875 C 7.11175 11.979875 8.5648125 10.525813 9.5078125 11.507812 L 11 13 L 14.792969 9.2070312 A 1 1 0 0 1 15.480469 8.9042969 z "
style="fill:#4d4d4d;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 7.4 KiB

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>UBLinux</vendor>
<vendor_url>https://ublinux.ru</vendor_url>
<action id="com.ublinux.ubl-settings-system.run">
<description>Run ubl-settings-system as root</description>
<description xml:lang="ru">Запуск утилиты ubl-settings-system с правами root</description>
<message>Authentication is required to run ubl-settings-system</message>
<message xml:lang="ru">Требуется авторизация для запуска утилиты ubl-settings-system с правами root</message>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/ubl-settings-system</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 108 KiB

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 24 24"
id="svg2"
version="1.1"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04, custom)"
sodipodi:docname="warning.svg"
width="24"
height="24"
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"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata
id="metadata12">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs10" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1027"
id="namedview8"
showgrid="false"
inkscape:zoom="18.96875"
inkscape:cx="5.4827018"
inkscape:cy="9.3047776"
inkscape:current-layer="svg2"
inkscape:pagecheckerboard="0"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<path
id="path4136-2"
style="opacity:1;fill:#4d4d4d;fill-opacity:1"
d="M 11.292969 1.0234375 A 11 11.000002 86.311656 0 0 1.0234375 12.707031 A 11 11.000002 86.311656 0 0 12.707031 22.976562 A 11 11.000002 86.311656 0 0 22.976562 11.292969 A 11 11.000002 86.311656 0 0 11.292969 1.0234375 z M 11.996094 6 L 12.003906 6 C 12.556173 6 13 6.4439 13 6.9960938 L 13 14.003906 C 13 14.556325 12.556173 15 12.003906 15 L 11.996094 15 C 11.443827 15 11 14.556325 11 14.003906 L 11 6.9960938 C 11 6.4439 11.443827 6 11.996094 6 z M 12 17 C 12.554 17 13 17.446 13 18 C 13 18.554 12.554 19 12 19 C 11.446 19 11 18.554 11 18 C 11 17.446 11.446 17 12 17 z " />
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -0,0 +1,2 @@
cyr-sun16
terminus-bold-16
1 cyr-sun16
2 terminus-bold-16

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/com/ublinux/ui">
<file>ubl-settings-system.glade</file>
</gresource>
<gresource prefix="/com/ublinux/css">
<file>ubl-settings-system.css</file>
</gresource>
<gresource prefix="/com/ublinux/images">
<file>ubl-settings-system-banner.png</file>
</gresource>
</gresources>

@ -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,96 @@
cmake_minimum_required(VERSION 3.7)
project(ubl-settings-system)
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})
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()
configure_file(ubl-cmake.in ubl-cmake.h)
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/ubl-cmake.h DESTINATION ./)
set(GRESOURCE_C resources.c)
set(GRESOURCE_XML gresource.xml)
find_program(GLIB_COMPILE_RESOURCES NAMES glib-compile-resources REQUIRED)
add_custom_target(GLADE ubl-settings-system.glade)
set(DEPENDFILES
../ubl-settings-system.glade
../gresource.xml
../ubl-settings-system-banner.png
../ubl-settings-system.css
)
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}
)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -std=c++2a")
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -lm")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -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
ubl-settings-system.c
ubl-settings-system.h
ubl-strings.h
ubl-utils.h
ubl-utils.c
${CMAKE_CURRENT_BINARY_DIR}/ubl-cmake.h
)
set(LIBRARIES
${GTK_LIBRARIES}
${WEBKIT_LIBRARIES}
# ${VTE291_LIBRARIES}
pthread)
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 @@
#cmakedefine WEBKIT_FOUND

@ -0,0 +1,500 @@
#include "ubl-settings-system.h"
config main_config;
//signal emmit handlers - no header initialization
/**on_close_subwindow(GtkWidget *self)
* [EN]
* Closes window in which [self] is contained.
* [RU]
* Закрывает окно, в котором расположен виджет [self].
*/
void on_close_subwindow(GtkWidget *self){
gtk_widget_destroy(gtk_widget_get_toplevel(self));
}
/**yon_open_browser(GtkWidget *self, char *link)
* [EN]
* Opens browser with [link] link.
* [RU]
* Открывает браузер с [link] ссылкой.
*/
void yon_open_browser(GtkWidget *self, char *link){
yon_ubl_browser_window_open(link,TITLE_LABEL);
}
/**on_open_documentation_confirmation(GtkWidget *self, char *link)
* [EN]
* Opens confirmation window for [link] link.
* [RU]
* Открывает окно подтверждение перехода по ссылке [link].
*/
void on_open_documentation_confirmation(GtkWidget *self, char *link){
if (main_config.always_open_documentation==0){
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path);
documentation_confirmation_window *widgets = malloc(sizeof(documentation_confirmation_window));
widgets->Window = yon_gtk_builder_get_widget(builder,"helpConfirmationWindow");
widgets->AcceptButton = yon_gtk_builder_get_widget(builder,"ReadHelpButton");
widgets->CloseButton = yon_gtk_builder_get_widget(builder,"CancelHelpButton");
widgets->HatText = yon_gtk_builder_get_widget(builder,"webHeaderNameLabel");
widgets->HeaderText = yon_gtk_builder_get_widget(builder,"helpHeader");
widgets->InfoText = yon_gtk_builder_get_widget(builder,"helpText");
widgets->AlwaysOpenCheck = yon_gtk_builder_get_widget(builder,"AlwaysOpenDocumentationCheckbox");
gtk_label_set_text(GTK_LABEL(widgets->HatText),TITLE_LABEL);
gtk_label_set_text(GTK_LABEL(widgets->HeaderText),HELP_TITLE_LABEL);
gtk_label_set_text(GTK_LABEL(widgets->InfoText),HELP_INFO_LABEL);
gtk_button_set_label(GTK_BUTTON(widgets->AcceptButton),OPEN_HELP_LABEL);
gtk_button_set_label(GTK_BUTTON(widgets->AlwaysOpenCheck),HELP_ALWAYS_OPEN_LABEL);
gtk_button_set_label(GTK_BUTTON(widgets->CloseButton),CANCEL_LABEL);
gtk_widget_show_all(widgets->Window);
g_signal_connect(G_OBJECT(widgets->CloseButton),"clicked",G_CALLBACK(on_close_subwindow),NULL);
g_signal_connect(G_OBJECT(widgets->AcceptButton),"clicked",G_CALLBACK(yon_open_browser),yon_char_new(link));
g_signal_connect(G_OBJECT(widgets->AcceptButton),"clicked",G_CALLBACK(on_close_subwindow),NULL);
} else {
yon_open_browser(self,link);
}
}
/**on_link(GtkWidget *self, char* uri, gpointer user_data)
* [EN]
* Signal for hadnling AboutDialog links.
* Connect to "activate-link" signal.
* [self] is AboutDialog window;
* [uri] is activated link;
* [user_data] is pointer for user data, hasn't used in standard handler;
* [RU]
* Функция для обработки сигнала нажатия на ссылку окна AboutDialog.
* Присоединять к сигналу "activate-link".
* [self] - окно AboutDialog;
* [uri] - ссылка, по которой совершается переход;
* [user_data] - указатель на любые другие данные, не используется в стандартном обработчике;
*/
void on_link(GtkWidget *self, char* uri, gpointer user_data){
gtk_widget_destroy(self);
on_open_documentation_confirmation(self,uri);
}
/**on_about()
* [EN]
* Function for setting up and showing AboutDialog.
* Connect it to "activate" signal of Documentation MenuItem.
* [RU]
* Функиця для настройки и показа окна AboutDialog.
* Присоединять к сигналу "activate" кнопки справки типа MenuItem.
*/
void on_about(){
GtkBuilder *builder=gtk_builder_new_from_resource(glade_path);
GtkWidget *window=yon_gtk_builder_get_widget(builder,"AboutWindow");
GtkWidget *title=yon_gtk_builder_get_widget(builder,"headerAboutTopic");
GtkWidget *hideButtonBox=yon_gtk_builder_get_widget(builder,"buttonBoxHide");
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(window),version_application);
gtk_about_dialog_set_website_label(GTK_ABOUT_DIALOG(window),PROJECT_HOME_LABEL);
gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(window),TITLE_LABEL);
gtk_label_set_text(GTK_LABEL(title),TITLE_LABEL);
g_signal_connect(G_OBJECT(window),"activate-link",G_CALLBACK(on_link),NULL);
gtk_widget_set_visible(hideButtonBox,0);
gtk_widget_destroy(hideButtonBox);
gtk_widget_show(window);
}
//functions
void yon_load_proceed(YON_CONFIG_TYPE type){
if (yon_config_load_register(type,"config",hostname_parameter,"config",id_parameter,"locale",console_font_parameter,"locale",language_parameter,NULL))
yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
else
yon_ubl_status_box_render(LOAD_FAILED_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
}
void yon_config_local_load(GtkWidget *self, main_window *widgets){
gtk_entry_set_text(GTK_ENTRY(widgets->HostnameEntry),"");
gtk_entry_set_text(GTK_ENTRY(widgets->IDEntry),"");
gtk_entry_set_text(GTK_ENTRY(widgets->IDEntry),"");
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ConsoleFontCombo),0);
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->LanguageCombo),0);
yon_load_proceed(YON_CONFIG_LOCAL);
gtk_entry_set_text(GTK_ENTRY(widgets->HostnameEntry),yon_config_get_by_key(hostname_parameter));
char *id = yon_config_get_by_key(id_parameter);
if (!strcmp(id,"Random"))
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->IDCombo),1);
else if (!strcmp(id,"hardware"))
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->IDCombo),2);
else
gtk_entry_set_text(GTK_ENTRY(widgets->IDEntry),id);
GtkTreeIter iter;
char *code;
char *cons_font = yon_config_get_by_key(console_font_parameter);
if (cons_font){
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->fontlist),&iter);
for(;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->fontlist),&iter)){
gtk_tree_model_get(GTK_TREE_MODEL(widgets->fontlist),&iter,0,&code,-1);
if (code&&!strcmp(code,cons_font)) gtk_combo_box_set_active_iter(GTK_COMBO_BOX(widgets->ConsoleFontCombo),&iter);
}
}
char *lang = yon_config_get_by_key(language_parameter);
if (lang){
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->languagelist),&iter);
for(;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->languagelist),&iter)){
gtk_tree_model_get(GTK_TREE_MODEL(widgets->languagelist),&iter,1,&code,-1);
if (code&&!strcmp(code,lang)) gtk_combo_box_set_active_iter(GTK_COMBO_BOX(widgets->LanguageCombo),&iter);
}
}
}
void yon_config_global_load(GtkWidget *self, main_window *widgets){
gtk_entry_set_text(GTK_ENTRY(widgets->HostnameEntry),"");
gtk_entry_set_text(GTK_ENTRY(widgets->IDEntry),"");
gtk_entry_set_text(GTK_ENTRY(widgets->IDEntry),"");
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ConsoleFontCombo),0);
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->LanguageCombo),0);
yon_load_proceed(YON_CONFIG_GLOBAL);
gtk_entry_set_text(GTK_ENTRY(widgets->HostnameEntry),yon_config_get_by_key(hostname_parameter));
char *id = yon_config_get_by_key(id_parameter);
if (!strcmp(id,"Random"))
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->IDCombo),1);
else if (!strcmp(id,"hardware"))
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->IDCombo),2);
else
gtk_entry_set_text(GTK_ENTRY(widgets->IDEntry),id);
GtkTreeIter iter;
char *code;
char *cons_font = yon_config_get_by_key(console_font_parameter);
if (cons_font){
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->fontlist),&iter);
for(;valid;gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->fontlist),&iter)){
gtk_tree_model_get(GTK_TREE_MODEL(widgets->fontlist),&iter,1,&code,-1);
if (code&&!strcmp(code,cons_font)){ gtk_combo_box_set_active_iter(GTK_COMBO_BOX(widgets->ConsoleFontCombo),&iter); break; }
else { gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ConsoleFontCombo),0); }
}
}
char *lang = yon_config_get_by_key(language_parameter);
if (lang){
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->languagelist),&iter);
for(;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->languagelist),&iter)){
gtk_tree_model_get(GTK_TREE_MODEL(widgets->languagelist),&iter,1,&code,-1);
if (!strcmp(code,lang)){ gtk_combo_box_set_active_iter(GTK_COMBO_BOX(widgets->LanguageCombo),&iter); break; }
else { gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->LanguageCombo),0); }
}
}
}
void yon_config_global_local_save(){
yon_config_save_registered(NULL,"");
}
void yon_config_local_save(){
yon_config_save_registered("system","config");
}
void yon_config_global_save(){
yon_config_save_registered("global","");
}
void on_hostname_changed(GtkEntry *self, main_window *widgets){
char *text = (char*)gtk_entry_get_text(self);
if (yon_config_get_by_key(hostname_parameter)){
yon_config_set(hostname_parameter,text);
} else {
yon_config_register(hostname_parameter,"config",text);
}
}
void on_id_combo_toggled(GtkComboBox *self, main_window *widgets){
int id = gtk_combo_box_get_active(self);
if (id==2||id==1){
if (yon_config_get_by_key(id_parameter)){
yon_config_set(id_parameter, id == 1 ? "Random" : "hardware");
} else {
yon_config_register(id_parameter,"config", id == 1 ? "Random":"hardware");
}
}
if (id<3){
gtk_widget_set_sensitive(widgets->IDEntry,0);
gtk_widget_set_sensitive(widgets->IDCopyButton,0);
}
else {
gtk_widget_set_sensitive(widgets->IDCopyButton,1);
gtk_widget_set_sensitive(widgets->IDEntry,1);
}
}
void on_id_changed(GtkEntry *self, main_window *widgets){
char *text = (char*)gtk_entry_get_text(self);
if (yon_config_get_by_key(id_parameter)){
yon_config_set(id_parameter,text);
} else {
yon_config_register(id_parameter,"config",text);
}
}
void on_id_copy(GtkButton *self, main_window *widgets){
GtkClipboard *clipboard = gtk_clipboard_get_default(gdk_display_get_default());
const char *clipboard_id = gtk_entry_get_text(GTK_ENTRY(widgets->IDEntry));
gtk_clipboard_set_text(clipboard,clipboard_id,strlen(clipboard_id));
yon_ubl_status_box_render(COPY_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
}
void on_console_font_changed(GtkComboBox *self, main_window *widgets){
GtkTreeIter iter;
if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->ConsoleFontCombo))==0){
yon_config_remove_by_key(console_font_parameter);
} else {
gtk_combo_box_get_active_iter(self,&iter);
char *code;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->fontlist),&iter,0,&code,-1);
if (code)
if (yon_config_get_by_key(console_font_parameter)){
yon_config_set(console_font_parameter,code);
} else {
yon_config_register(console_font_parameter,"locale",code);
}
}
}
void on_language_changed(GtkComboBox *self, main_window *widgets){
GtkTreeIter iter;
if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->LanguageCombo))==0){
yon_config_remove_by_key(language_parameter);
} else {
gtk_combo_box_get_active_iter(self,&iter);
char *code;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->languagelist),&iter,1,&code,-1);
if (code)
if (yon_config_get_by_key(language_parameter)){
yon_config_set(language_parameter,code);
} else {
yon_config_register(language_parameter,"locale",code);
}
}
}
// standard functions
void config_init(){
main_config.always_open_documentation=0;
main_config.win_height=0;
main_config.win_width=0;
main_config.win_pos_x=0;
main_config.win_pos_y=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_window *setup_window(){
/* Widgets getting | Получение виджетов */
main_window *widgets = malloc(sizeof(main_window));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path);
widgets->Window = yon_gtk_builder_get_widget(builder,"MainWindow");
widgets->HatLabel = yon_gtk_builder_get_widget(builder,"headerTopic");
widgets->PlugBox = yon_gtk_builder_get_widget(builder,"plugBox");
widgets->HeadOverlay = yon_gtk_builder_get_widget(builder,"HeadOverlay");
widgets->HeadImage = yon_gtk_builder_get_widget(builder,"HeadBackgroundImage");
widgets->HeadBox = yon_gtk_builder_get_widget(builder,"HeaderBox");
widgets->HeadTitleLabel = yon_gtk_builder_get_widget(builder,"HeaderTitleLabel");
widgets->HeadInfoLabel = yon_gtk_builder_get_widget(builder,"HeaderInfoLabel");
widgets->StatusBox = yon_gtk_builder_get_widget(builder,"mainStatusBox");
widgets->StatusIcon = yon_gtk_builder_get_widget(builder,"mainStatusIcon");
widgets->StatusLabel = yon_gtk_builder_get_widget(builder,"mainStatusLabel");
widgets->SaveLabel = yon_gtk_builder_get_widget(builder,"headerSaveConfigLabel");
widgets->SaveMenuItem = yon_gtk_builder_get_widget(builder,"SaveGlobalLocalConfigurationMenuItem");
widgets->SaveGlobalMenuItem = yon_gtk_builder_get_widget(builder,"SaveGlobalConfigurationMenuItem");
widgets->SaveLocalMenuItem = yon_gtk_builder_get_widget(builder,"SaveLocalConfigurationMenuItem");
widgets->RightBox = yon_gtk_builder_get_widget(builder,"HeaderRightBox");
widgets->LoadLabel = yon_gtk_builder_get_widget(builder,"headerLoadConfigLabel");
widgets->LoadGlobalMenuItem = yon_gtk_builder_get_widget(builder,"LoadGlobalConfigurationMenuItem");
widgets->LoadLocalMenuItem = yon_gtk_builder_get_widget(builder,"LoadLocalConfigurationMenuItem");
widgets->LeftBox = yon_gtk_builder_get_widget(builder,"HeaderLeftBox");
widgets->HostnameEntry = yon_gtk_builder_get_widget(builder,"HostnameEntry");
widgets->IDCombo = yon_gtk_builder_get_widget(builder,"IDCombo");
widgets->IDEntry = yon_gtk_builder_get_widget(builder,"IDEntry");
widgets->IDCopyButton = yon_gtk_builder_get_widget(builder,"IDCopyButton");
widgets->ConsoleFontCombo = yon_gtk_builder_get_widget(builder,"ConsoleFontCombo");
widgets->LanguageCombo = yon_gtk_builder_get_widget(builder,"LanguageCombo");
widgets->fontlist = GTK_LIST_STORE(gtk_builder_get_object(builder,"fontlist"));
widgets->languagelist = GTK_LIST_STORE(gtk_builder_get_object(builder,"languagelist"));
widgets->DocumentationMenuItem = yon_ubl_menu_item_documentation_new(DOCUMENTATION_LABEL);
widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL);
gtk_window_set_title(GTK_WINDOW(widgets->Window),TITLE_LABEL);
GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2");
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->DocumentationMenuItem);
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->AboutMenuItem);
if (main_config.lock_load_global == 1){
gtk_widget_set_sensitive(widgets->LoadGlobalMenuItem,0);
}
if (main_config.lock_save_global == 1){
gtk_widget_set_sensitive(widgets->SaveGlobalMenuItem,0);
gtk_widget_set_sensitive(widgets->SaveMenuItem,0);
}
if (main_config.lock_save_local == 1){
gtk_widget_set_sensitive(widgets->SaveLocalMenuItem,0);
gtk_widget_set_sensitive(widgets->SaveMenuItem,0);
}
/* Widget registration for config monitoring | Регистрация виджетов для мониторинга конфига */
// yon_window_config_add_custom_parameter(widgets->HeadInfoLabel,"head-text","label",YON_TYPE_STRING);
/* Signal connection | Присоединение сигналов */
g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),WIKI_LINK);
g_signal_connect(G_OBJECT(widgets->AboutMenuItem),"activate",G_CALLBACK(on_about),widgets);
g_signal_connect(G_OBJECT(widgets->LoadGlobalMenuItem),"activate",G_CALLBACK(yon_config_global_load),widgets);
g_signal_connect(G_OBJECT(widgets->LoadLocalMenuItem),"activate",G_CALLBACK(yon_config_local_load),widgets);
g_signal_connect(G_OBJECT(widgets->SaveMenuItem),"activate",G_CALLBACK(yon_config_global_local_save),widgets);
g_signal_connect(G_OBJECT(widgets->SaveGlobalMenuItem),"activate",G_CALLBACK(yon_config_global_save),widgets);
g_signal_connect(G_OBJECT(widgets->SaveLocalMenuItem),"activate",G_CALLBACK(yon_config_local_save),widgets);
g_signal_connect(G_OBJECT(widgets->HostnameEntry),"changed",G_CALLBACK(on_hostname_changed),widgets);
g_signal_connect(G_OBJECT(widgets->IDCombo),"changed",G_CALLBACK(on_id_combo_toggled),widgets);
g_signal_connect(G_OBJECT(widgets->IDEntry),"changed",G_CALLBACK(on_id_changed),widgets);
g_signal_connect(G_OBJECT(widgets->IDCopyButton),"clicked",G_CALLBACK(on_id_copy),widgets);
g_signal_connect(G_OBJECT(widgets->ConsoleFontCombo),"changed",G_CALLBACK(on_console_font_changed),widgets);
g_signal_connect(G_OBJECT(widgets->LanguageCombo),"changed",G_CALLBACK(on_language_changed),widgets);
// g_signal_connect(G_OBJECT(widgets->IDRandomCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),widgets->IDCopyButton);
// g_signal_connect(G_OBJECT(widgets->IDRandomCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),widgets->IDEntry);
int size;
config_str locales = yon_config_load(get_locales_command,&size);
GtkTreeIter iter;
for (int i=0;i<size;i++){
int locsize;
locales[i]=yon_char_divide_search(locales[i],"\n",-1);
config_str loc_parsed = yon_char_parse(locales[i],&locsize,";");
gtk_list_store_append(widgets->languagelist,&iter);
gtk_list_store_set(widgets->languagelist,&iter,0,_(loc_parsed[1]),1,loc_parsed[0],-1);
}
config_str fonts = yon_config_load(get_fonts_command,&size);
for (int i=0;i<size;i++){
fonts[i]=yon_char_divide_search(fonts[i],"\n",-1);
gtk_list_store_append(widgets->fontlist,&iter);
gtk_list_store_set(widgets->fontlist,&iter,0,fonts[i],-1);
}
gtk_widget_show(widgets->Window);
return widgets;
}
int main(int argc, char *argv[]){
local=setlocale(LC_ALL, "");
textdomain (LocaleName);
config_init();
int option_index=0;
int show_help=0;
int debug_mode=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'},
{"debug", 0,0, 'd'},
{ NULL, 0, NULL, 0 }
};
for (int i=0;i<argc;i++){
int argument=getopt_long(argc,argv,"hVvs:e:t:d",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 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);
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 = setup_window();
yon_ubl_header_setup_resource(widgets->HeadOverlay,widgets->HeadBox,widgets->HeadImage,banner_path);
yon_ubl_status_box_setup(widgets->StatusIcon,widgets->StatusBox,widgets->StatusLabel);
if (getuid()!=0)
yon_ubl_status_box_render(ROOT_WARNING_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
else
yon_ubl_status_box_render(TITLE_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
yon_ubl_setup_sockets(widgets->PlugBox,widgets->LeftBox,widgets->RightBox,main_config.socket_id,main_config.load_socket_id,main_config.save_socket_id);
yon_window_config_setup(GTK_WINDOW(widgets->Window));
yon_window_config_load(config_path);
yon_config_local_load(NULL,widgets);
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,114 @@
#include <gtk/gtk.h>
#include <gtk/gtkx.h>
#include "ubl-utils.h"
#include <locale.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <libintl.h>
#include <getopt.h>
#include <libintl.h>
#include "../compile/ubl-cmake.h"
#ifdef WEBKIT_FOUND
#include <webkit2/webkit2.h>
#endif
#include "ubl-strings.h"
#define WIKI_LINK "https://wiki.ublinux.ru/ru/Программное_обеспечениерограммы_и_утилиты/Все/ubl-settings-system"
#define _(String) gettext(String)
#define glade_path "/com/ublinux/ui/ubl-settings-system.glade"
#define banner_path "/com/ublinux/images/ubl-settings-system-banner.png"
#define CssPath "/com/ublinux/css/ubl-settings-system.css"
#define config_path yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL)
#define locale_transcriptions_path "/usr/share/ubl-settings-system/csv/locales.csv"
#define LocalePath "/usr/share/locale"
#define LocaleName "ubl-settings-system"
#define config_global_load_command "ubconfig --source global get "
#define config_local_load_command "ubconfig --source system get "
#define get_locales_command "grep '' /usr/share/ubl-settings-system/csv/locales.csv"
#define get_fonts_command "grep '' /usr/share/ubl-settings-system/csv/fonts.csv"
// #define get_fonts_command "ls /usr/share/kbd/consolefonts/ |grep -v \"README\"|grep -oE \"^[-a-zA-Z0-9_]{3,}.psf\"|sed -e 's/\\.psf//g'"
typedef char* string;
string version_application;
char *local;
typedef struct {
int always_open_documentation;
int win_pos_x;
int win_pos_y;
int win_width;
int win_height;
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;
} config;
typedef struct {
//Standard
GtkWidget *Window;
GtkWidget *HatLabel;
GtkWidget *PlugBox;
GtkWidget *HeadOverlay;
GtkWidget *HeadImage;
GtkWidget *HeadBox;
GtkWidget *HeadTitleLabel;
GtkWidget *HeadInfoLabel;
GtkWidget *StatusBox;
GtkWidget *StatusIcon;
GtkWidget *StatusLabel;
GtkWidget *SaveLabel;
GtkWidget *SaveMenuItem;
GtkWidget *SaveGlobalMenuItem;
GtkWidget *SaveLocalMenuItem;
GtkWidget *RightBox;
GtkWidget *LoadLabel;
GtkWidget *LoadGlobalMenuItem;
GtkWidget *LoadLocalMenuItem;
GtkWidget *LeftBox;
GtkWidget *DocumentationMenuItem;
GtkWidget *AboutMenuItem;
// Custom
GtkWidget *HostnameEntry;
GtkWidget *IDCombo;
GtkWidget *IDEntry;
GtkWidget *IDCopyButton;
GtkWidget *ConsoleFontCombo;
GtkWidget *LanguageCombo;
GtkListStore *fontlist;
GtkListStore *languagelist;
} main_window;
typedef struct {
GtkWidget *Window;
GtkWidget *HatText;
GtkWidget *HeaderText;
GtkWidget *InfoText;
GtkWidget *AlwaysOpenCheck;
GtkWidget *CloseButton;
GtkWidget *AcceptButton;
} documentation_confirmation_window;
main_window *setup_window();

@ -0,0 +1,53 @@
#define VERSION_LABEL yon_char_unite(_("Version:")," ",version_application,"\n",NULL)
#define HELP_LABEL yon_char_unite(_("ubl-settings-system version:")," ", version_application,"\n",_("System configuration"),"\n",_("Usage:"), " ubl-settings-system ",_("[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",NULL)
#define TITLE_LABEL _("System configuration")
#define TITLE_INFO_LABEL _("System basic parameters configuration")
#define SUCCESS_LABEL _("Operation succeeded")
#define ROOT_WARNING_LABEL _("Warning! Application was launched without root - root-dependent actions are locked")
#define ABOUT_LABEL _("About")
#define DOCUMENTATION_LABEL _("Documentation")
#define SAVE_LOCAL_LABEL _("Save to local configuration")
#define SAVE_GLOBAL_LABEL _("Save to global configuration")
#define SAVE_CONFIGURATION_LABEL _("Save configuration")
#define SAVE_LABEL _("Save")
#define LOAD_LOCAL_LABEL _("Load local configuration")
#define LOAD_GLOBAL_LABEL _("Load global configuration")
#define LOAD_LABEL _("Load")
#define CANCEL_LABEL _("Cancel")
#define HELP_TITLE_LABEL _("Would you like to read documentation in the Web?")
#define HELP_INFO_LABEL _("You will be redirected to documentation website where documentation is\ntranslated and supported by community.")
#define HELP_ALWAYS_OPEN_LABEL _("Always redirect to online documentation")
#define OPEN_HELP_LABEL _("Open documentation")
#define PROJECT_HOME_LABEL _("Project Home Page")
#define NOTHING_CHOSEN_LABEL _("Nothing were chosen")
#define GLOBAL_LOAD_SUCCESS_LABEL _("Global configuration loading succseeded.")
#define LOCAL_LOAD_SUCCESS_LABEL _("Local configuration loading succseeded.")
#define LOAD_FAILED_LABEL _("Config loading failed")
#define GLOBAL_LOCAL_SAVE_SUCCESS_LABEL _("Local and global configuration saving succseeded.")
#define GLOBAL_SAVE_SUCCESS_LABEL _("Global configuration saving succseeded.")
#define LOCAL_SAVE_SUCCESS_LABEL _("Local configuration saving succseeded.")
#define HOSTNAME_LABEL _("Hostname:")
#define ID_LABEL _("Work station ID:")
#define SYSTEM_LABEL _("System")
#define RANDOM_LABEL _("Random")
#define HARDWARE_LABEL _("Hardware")
#define MANUAL_LABEL _("Manual")
#define CONSOLE_LABEL _("Console")
#define FONT_LABEL _("Console font:")
#define LOCALE_LABEL _("Locale")
#define LANGUAGE_LABEL _("Language:")
#define DEFAULT_LABEL _("Default")
#define COPY_SUCCESS_LABEL _("Machine ID has been copied")

File diff suppressed because it is too large Load Diff

@ -0,0 +1,384 @@
#ifndef UBL_UTILS
#define UBL_UTILS
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <pthread.h>
#include <string.h>
#include <dirent.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <pwd.h>
#include <locale.h>
#include <gtk/gtk.h>
#include <gtk/gtkx.h>
#include "../compile/ubl-cmake.h"
#ifdef WEBKIT_FOUND
#include <webkit2/webkit2.h>
#endif
#define DesktopPath "/usr/share/applications/"
#define for_dictionaries(obj, obj1) for (obj = obj1->first; obj != NULL; obj = obj->next)
#define new(type) malloc(sizeof(type))
#define new_arr(type,size) malloc(sizeof(type)*size)
#define get_home_dir_command yon_char_unite("getent passwd \"",yon_ubl_root_user_get(),"\" | cut -d: -f6",NULL)
#define hostname_parameter "HOSTNAME"
#define id_parameter "MACHINEID"
#define keyboard_layout_parameter "XkbLayout"
#define console_font_parameter "CONSOLE_FONT"
#define num_lock_boot_parameter "NUMLOCK"
#define language_parameter "LANG"
typedef enum
{
#ifdef __GTK_H__
DICTIONARY_GTK_WIDGETS_TYPE,
#endif
DICTIONARY_OTHER_TYPE=0,
DICTIONARY_CHAR_TYPE,
DICTIONARY_INT_TYPE,
DICTIONARY_BOOL_TYPE,
} DICT_TYPE;
typedef struct dictionary
{
char *key;
void *data;
struct dictionary *next;
struct dictionary *prev;
struct dictionary *first;
DICT_TYPE data_type;
} dictionary;
typedef struct apps
{
char *Name;
int Type;
char *Categories;
char *Exec;
char *Icon;
int Pluggable;
int DualPluggable;
} apps;
typedef char** config_str;
#define config(key) yon_config_get_by_key(key)
#define yon_remalloc(pointer, size) (!pointer) ? malloc(size) : realloc(pointer, size)
// dictionary functions
/**yon_dictionary_get_data(dictionary, type)
* [EN]
* Gets data from dictionary.
* [dictionary] is dictionary, from which data should be extracted;
* [type] is type of data, [dictionary] contains.
* [RU]
* Возвращает данные из словаря.
* [dictionary] - словарь из которого достаются данные.
* [type] - тип данных, хранящихся в словаре [dictionary].
*/
#define yon_dictionary_get_data(dictionary, type) ((type)dictionary->data)
/**yon_dictionary_add_or_create_if_exists_with_data(dict,key,data)
* [EN]
*
* [RU]
* Добавляет элемент словаря в конец словаря [dict] c ключом [key] и данными [data].
* Если словарь не существует, создаёт его
*/
#define yon_dictionary_add_or_create_if_exists_with_data(dict,key,data) {if (!dict) dict=yon_dictionary_new_with_data(key,data); \
else dict=yon_dictionary_append_with_data(dict,key,data);}
dictionary *yon_dictionary_new();
dictionary *yon_dictionary_append(dictionary *targetdict);
dictionary *yon_dictionary_get_last(dictionary *dict);
dictionary *yon_dictionary_swap(dictionary *dict, int aim);
void yon_dictionary_make_first(dictionary *dict);
void yon_dictionary_make_nth(dictionary *dict, int nth);
dictionary *yon_dictionary_new_with_data(char *key, void *data);
dictionary *yon_dictionary_append_with_data(dictionary *dict, char *key, void *data);
dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect);
dictionary *yon_dictionary_get(dictionary **dict, char *key);
dictionary *yon_dictionary_rip(dictionary *dict);
dictionary *yon_dictionary_get_nth(dictionary *dict, int place);
void *yon_dictionary_free_all(dictionary *dictionary,void (data_manipulation)(void*));
// char functions
int yon_char_find_last(char *source, char find);
char *yon_char_append(char *source, char *append);
char *yon_char_new(char *chr);
char *yon_char_unite(char *source, ...);
char *yon_cut(char *source, int size, int startpos);
char *yon_char_divide(char *source, int dividepos);
char *yon_char_divide_search(char *source, char *dividepos, int delete_divider);
char *yon_char_from_int(int int_to_convert);
char *yon_char_replace(char *source, char *find, char*replace);
char **yon_char_parse(char *parameters, int *size, char *divider);
char **yon_char_parsed_rip(char **char_string, int *size, int item_to_delete);
int yon_char_parsed_check_exist(char **parameters, int size, char *param);
int yon_char_find_count(char *source, char *find);
int yon_char_parsed_includes_char_parsed (config_str source, config_str to_check, int source_size, int check_size);
config_str yon_char_parsed_new (int *size, ...);
void yon_char_parsed_copy(config_str *source, config_str *to_copy);
config_str yon_char_parsed_append(config_str parsed, int *size, char *string);
int yon_ubl_check_root();
char *yon_ubl_root_user_get();
char *yon_ubl_user_get_home_directory();
// parsing functions
config_str philos_list_user(int* size);
apps *yon_apps_scan_and_parse_desktops(int *sizef);
void yon_apps_sort(apps *applist, int size);
apps *yon_apps_get_by_name(apps *applist, char *name, int size);
//config functions
#define ubconfig_save_command "ubconfig"
#define ubconfig_load_command "ubconfig --source"
typedef enum {
YON_CONFIG_LOCAL=0,
YON_CONFIG_GLOBAL,
YON_CONFIG_BOTH
} YON_CONFIG_TYPE;
config_str yon_config_load(char *command, int *str_len);
int yon_config_save_registered(char *path, char *section);
char *yon_config_get_parameter(config_str parameters, int size, char *param);
int yon_config_load_register(YON_CONFIG_TYPE config_type,char *section,char *parameter, ...);
int yon_config_remove_by_key(char *key);
int yon_config_remove_by_data(void *data);
int yon_config_remove_element(char *key, char *deleted);
void *yon_config_get_by_key(char *key);
char *yon_config_get_key_by_data(char *data);
int yon_config_set(char *key, void *data);
int yon_config_clean();
void yon_config_register(char *key, char* config_section, void *data);
config_str yon_config_get_all();
// terminal-using functions
int yon_launch_app_with_arguments(char *name, char *args);
void yon_launch(char *command);
// Gtk functions
#ifdef __GTK_H__
#ifdef VTE_TERMINAL
void yon_terminal_integrated_launch(GtkWidget *place_to_show, char* command, void *endwork_function, void* endwork_function_argument);
void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *endwork_function, void* endwork_function_argument);
#endif
enum YON_TYPE{
YON_TYPE_STRING,
YON_TYPE_INT,
YON_TYPE_BOOLEAN,
YON_TYPE_OTHER
};
GtkWidget *yon_ubl_menu_item_about_new(char *buttonname);
GtkWidget *yon_ubl_menu_item_documentation_new(char *buttonname);
/**yon_gtk_builder_get_widget(builder, widget_name)
* [EN]
* Returns GtkWidget from GtkBuilder *[builder].
* [builder] is GtkBuilder*;
* [widget_name] is id of widget;
*/
#define yon_gtk_builder_get_widget(builder, widget_name) GTK_WIDGET(gtk_builder_get_object(builder, widget_name))
typedef struct
{
GtkWidget *Icon;
GtkWidget *Label;
GtkWidget *IconView;
GtkListStore *List;
} expander_icon_view;
void yon_window_config_setup(GtkWindow *window);
int yon_window_config_load(char *path);
config_str yon_window_config_get_section(char *section, gsize *size);
void yon_window_config_add_listener(GtkWidget *widget, char *param_name, char *widget_property, enum YON_TYPE val_type);
void yon_window_config_add_custom_parameter(char *param_name, char *section, void *tracked_value, enum YON_TYPE val_type);
void yon_window_config_erase_custom_parameter(char *param_name, char *section);
int yon_gtk_combo_box_fill(GtkWidget *combo, char **parameters,int size);
int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find);
int yon_gtk_icon_view_hide_empty(dictionary *icon_view_segment);
int yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...);
int yon_dictionary_gtk_pack_end_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...);
void yon_gtk_widget_set_sensitive_from_toggle_button(GtkToggleButton *toggle, GtkWidget *target);
void yon_gtk_widget_set_sensitive_from_toggle_button_inversed(GtkToggleButton *toggle, GtkWidget *target);
void yon_gtk_widget_set_sensitive_from_combo_box(GtkComboBox *toggle, GtkWidget *target);
void yon_gtk_widget_set_sensitive_from_combo_box_inversed(GtkComboBox *toggle, GtkWidget *target);
typedef enum
{
BACKGROUND_IMAGE_SUCCESS_TYPE,
BACKGROUND_IMAGE_FAIL_TYPE
} BACKGROUND_IMAGE_TYPE;
typedef struct {
BACKGROUND_IMAGE_TYPE type;
GtkWidget *icon;
GtkWidget *box;
GtkWidget *label;
char* text_to_render;
} render_data;
/**yon_ubl_status_box_setup(render,icon,box,label)
* [EN]
* Sets up [render] structure of type render_data.
* [icon] is GtkImage widget of status box for showing status icons;
* [box] is GtkBox widget of status box for showing status color;
* [label] is GtkLabel widget of status box for showing status text;
* [RU]
* Настраивает структуру [render] типа render_data.
* [icon] - виджет типа GtkIcon в котором будут отображаться статусные иконки;
* [box] - виджет типа GtkBox в котором будет отображаться цвет статуса;
* [label] - виджет типа GtkLabel в котором будет отображаться текст статусного сообщения;
*/
int yon_ubl_status_box_setup(GtkWidget *icon, GtkWidget *box, GtkWidget *label);
/**yon_ubl_status_box_render(render,text,type)
* [EN]
* Renders message in status box;
* [render] is render_data structure of status box;
* [text] is text to be shown in status box;
* [type] if type of message. Can be BACKGROUND_IMAGE_FAIL_TYPE or BACKGROUND_IMAGE_SUCCESS_TYPE
* [RU]
* Отображает сообщение в статусном окне.
* [render] - структура типа render_data для нужного статусного окна;
* [text] - текст, отображаемый в статусном окне;
* [type] - тип сообщения. Может быть:
* BACKGROUND_IMAGE_FAIL_TYPE (красный фон,иконка - восклицательный знак)
* или
* BACKGROUND_IMAGE_SUCCESS_TYPE (Жёлтный фон, иконка - галка)
*/
void yon_ubl_status_box_render(char *text, BACKGROUND_IMAGE_TYPE type);
#ifdef __cplusplus
/**yon_ubl_header_setup(overlay, head, image, imag_path)
* [EN]
* Sets up header of app.
* [overlay] is overlay for app header;
* [head] is box of header, which connects to [overlay]
* [image] is header background image;
* [imag_path] is path of image, shown in [image]
* [RU]
* Настраивает заголовок приложения.
* [overlay] - оверлей заголовка приложения;
* [head] - шапка заголовка, присоединяемая к [overlay]
* [image] - виджет картинки для заднего фона;
* [imag_path] - путь до картинки, загружаемой в [image]
*/
#define yon_ubl_header_setup(overlay, head, image, imag_path) _yon_ubl_header_setup(GTK_WIDGET(overlay.gobj()), GTK_WIDGET(head.gobj()), GTK_WIDGET(image.gobj()), (char *)imag_path)
#else
/**yon_ubl_header_setup(overlay, head, image, imag_path)
* [EN]
* Sets up header of app.
* [overlay] is overlay for app header;
* [head] is box of header, which connects to [overlay]
* [image] is header background image;
* [imag_path] is path of image, shown in [image]
* [RU]
* Настраивает заголовок приложения.
* [overlay] - оверлей заголовка приложения;
* [head] - шапка заголовка, присоединяемая к [overlay]
* [image] - виджет картинки для заднего фона;
* [imag_path] - путь до картинки, загружаемой в [image]
*/
#define yon_ubl_header_setup(overlay, head, image, imag_path) _yon_ubl_header_setup(GTK_WIDGET(overlay), GTK_WIDGET(head), GTK_WIDGET(image), (char *)imag_path)
#define yon_ubl_header_setup_resource(overlay, head, image, imag_path) _yon_ubl_header_setup_resource(GTK_WIDGET(overlay), GTK_WIDGET(head), GTK_WIDGET(image), (char *)imag_path)
#endif
void _yon_ubl_header_setup(GtkWidget *Overlay, GtkWidget *Head, GtkWidget *Image, char *image_path);
void _yon_ubl_header_setup_resource(GtkWidget *Overlay, GtkWidget *Head, GtkWidget *Image, char *image_path);
void yon_ubl_setup_sockets(GtkWidget *main_window, GtkWidget *left_window, GtkWidget *right_window, int socket_main_id, int socket_left_id, int socket_right_id);
#ifdef WEBKIT_FOUND
void yon_ubl_browser_window_open(char *link, char *browser_window_name);
#else
void yon_ubl_browser_window_open(char *link, char *browser_window_name);
#endif
#endif
#endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkImage" id="image8">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">process-stop-symbolic</property>
</object>
<object class="GtkImage" id="image9">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">emblem-ok-symbolic</property>
</object>
<object class="GtkListStore" id="keyboardList">
<columns>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkApplicationWindow" id="keyboardLayoutswindow">
<property name="width-request">450</property>
<property name="height-request">550</property>
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="default-width">450</property>
<property name="icon-name">dialog-question-symbolic</property>
<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-top">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">10</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="keyboardTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">keyboardList</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="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</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>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkButton" id="keyboardOkButton">
<property name="label" translatable="yes">Ok</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image9</property>
<style>
<class name="button"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="keyboardCancelButton">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image8</property>
<style>
<class name="button"/>
</style>
</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>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<object class="GtkHeaderBar" id="SettingsBar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child type="title">
<object class="GtkLabel" id="webHeaderNameLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">System configuration</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
</child>
</object>
</interface>

@ -0,0 +1,114 @@
.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:2px 2px 0 2px;
padding: 3px 10px 3px 5px;
/* padding: 5px 0px 3px 5px; */
border:transparent;
}
.menuitemmiddle>*{
margin:0 2px 0 2px;
padding: 3px 10px 3px 5px;
/* padding: 3px 0px 3px 5px; */
border:transparent;
}
.menuitembottom>*{
margin:0 2px 2px 2px;
padding: 3px 10px 3px 5px;
/* padding: 3px 0px 5px 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:2px 2px 0 2px;
padding: 3px 10px 3px 5px;
/* padding: 5px 0 3px 5px; */
background:@theme_selected_bg_color;
border-radius:2px;
}
.menuitemmiddle:hover>* {
margin:0 2px 0px 2px;
padding: 3px 10px 3px 5px;
/* padding: 3px 0px 3px 5px; */
background:@theme_selected_bg_color;
border-radius:2px;
}
.menuitembottom:hover>* {
margin:0 2px 2px 2px;
padding: 3px 10px 3px 5px;
/* padding: 3px 0px 5px 5px; */
background:@theme_selected_bg_color;
border-radius:2px;
}
.boxInfoMessError{
background-color: #ea9999;
}
.boxInfoMessOK{
background-color: #f3f0ac;
}

@ -0,0 +1,15 @@
[Desktop Entry]
Encoding=UTF-8
Name=System configuration
Name[ru]=TEMPLATE
GenericName=ubl-settings-system
GenericName[ru]=TEMPLATE
Comment=System basic parameters configuration
Comment[ru]=Приложение для TEMPLATE
Type=Application
Exec=pkexec ubl-settings-system
Icon=com.ublinux.ubl-settings-system
Terminal=false
X-XfcePluggable=true
X-UBLPluggable=true
Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;X-UBL-SettingsManager;X-UBL-Personal-Settings;

File diff suppressed because it is too large Load Diff

@ -0,0 +1,609 @@
# Russian translations for ubl-settings-system package.
# Copyright (C) 2022, UBTech LLC
# This file is distributed under the same license as the ubl-settings-system package.
# UBLinux Team <info@ublinux.com>, 2022
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: ubl-settings-system 1.0\n"
"Report-Msgid-Bugs-To: info@ublinux.com\n"
"POT-Creation-Date: 2023-04-25 15:52+0600\n"
"PO-Revision-Date: 2023-01-01 00:00+0600\n"
"Last-Translator: UBLinux Team <info@ublinux.com>\n"
"Language-Team: UBLinux Team <info@ublinux.com>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: source/ubl-strings.h:1
msgid "Version:"
msgstr ""
#: source/ubl-strings.h:2
msgid "ubl-settings-system version:"
msgstr ""
#: source/ubl-strings.h:2 source/ubl-strings.h:4
msgid "System configuration"
msgstr ""
#: source/ubl-strings.h:2
msgid "Usage:"
msgstr ""
#: source/ubl-strings.h:2
msgid "[OPTIONS]"
msgstr ""
#: source/ubl-strings.h:2
msgid "Options:"
msgstr ""
#: source/ubl-strings.h:2
msgid "Show this help"
msgstr ""
#: source/ubl-strings.h:2
msgid "Show package version"
msgstr ""
#: source/ubl-strings.h:2
msgid "Lock this help menu"
msgstr ""
#: source/ubl-strings.h:2
msgid "Lock configuration saving"
msgstr ""
#: source/ubl-strings.h:2
msgid "Lock local configration saving"
msgstr ""
#: source/ubl-strings.h:2
msgid "Lock global configration saving"
msgstr ""
#: source/ubl-strings.h:2
msgid "Lock global configration loading"
msgstr ""
#: source/ubl-strings.h:5
msgid "System basic parameters configuration"
msgstr ""
#: source/ubl-strings.h:7
msgid "Operation succeeded"
msgstr ""
#: source/ubl-strings.h:8
msgid ""
"Warning! Application was launched without root - root-dependent actions are "
"locked"
msgstr ""
#: source/ubl-strings.h:10
msgid "About"
msgstr ""
#: source/ubl-strings.h:11
msgid "Documentation"
msgstr ""
#: source/ubl-strings.h:13
msgid "Save to local configuration"
msgstr ""
#: source/ubl-strings.h:14
msgid "Save to global configuration"
msgstr ""
#: source/ubl-strings.h:15
msgid "Save configuration"
msgstr ""
#: source/ubl-strings.h:16
msgid "Save"
msgstr ""
#: source/ubl-strings.h:18
msgid "Load local configuration"
msgstr ""
#: source/ubl-strings.h:19
msgid "Load global configuration"
msgstr ""
#: source/ubl-strings.h:20
msgid "Load"
msgstr ""
#: source/ubl-strings.h:22
msgid "Cancel"
msgstr ""
#: source/ubl-strings.h:24
msgid "Would you like to read documentation in the Web?"
msgstr ""
#: source/ubl-strings.h:25
msgid ""
"You will be redirected to documentation website where documentation is\n"
"translated and supported by community."
msgstr ""
#: source/ubl-strings.h:26
msgid "Always redirect to online documentation"
msgstr ""
#: source/ubl-strings.h:27
msgid "Open documentation"
msgstr ""
#: source/ubl-strings.h:28
msgid "Project Home Page"
msgstr ""
#: source/ubl-strings.h:29
msgid "Nothing were chosen"
msgstr ""
#: source/ubl-strings.h:32
msgid "Global configuration loading succseeded."
msgstr ""
#: source/ubl-strings.h:33
msgid "Local configuration loading succseeded."
msgstr ""
#: source/ubl-strings.h:34
msgid "Config loading failed"
msgstr ""
#: source/ubl-strings.h:36
msgid "Local and global configuration saving succseeded."
msgstr ""
#: source/ubl-strings.h:37
msgid "Global configuration saving succseeded."
msgstr ""
#: source/ubl-strings.h:38
msgid "Local configuration saving succseeded."
msgstr ""
#: source/ubl-strings.h:40
msgid "Hostname:"
msgstr ""
#: source/ubl-strings.h:41
msgid "Work station ID:"
msgstr ""
#: source/ubl-strings.h:42
msgid "System"
msgstr ""
#: source/ubl-strings.h:43
msgid "Random"
msgstr ""
#: source/ubl-strings.h:44
msgid "Hardware"
msgstr ""
#: source/ubl-strings.h:45
msgid "Manual"
msgstr ""
#: source/ubl-strings.h:46
msgid "Console"
msgstr ""
#: source/ubl-strings.h:47
msgid "Console font:"
msgstr ""
#: source/ubl-strings.h:48
msgid "Locale"
msgstr ""
#: source/ubl-strings.h:49
msgid "Language:"
msgstr ""
#: source/ubl-strings.h:51
msgid "Default"
msgstr ""
#: source/ubl-strings.h:53
msgid "Machine ID has been copied"
msgstr ""
msgid "Afrikaans, South Africa"
msgstr ""
msgid "Arabic, United Arab Emirates"
msgstr ""
msgid "Arabic, Bahrain"
msgstr ""
msgid "Arabic, Algeria"
msgstr ""
msgid "Arabic, Egypt"
msgstr ""
msgid "Arabic, Iraq"
msgstr ""
msgid "Arabic, Jordan"
msgstr ""
msgid "Arabic, Kuwait"
msgstr ""
msgid "Arabic, Libya"
msgstr ""
msgid "Arabic, Morocco"
msgstr ""
msgid "Arabic, Oman"
msgstr ""
msgid "Arabic, Qatar"
msgstr ""
msgid "Arabic, Saudi Arabia"
msgstr ""
msgid "Arabic, Tunisia"
msgstr ""
msgid "Arabic, Yemen"
msgstr ""
msgid "Assamese, India"
msgstr ""
msgid "Azerbaijani, Azerbaijan"
msgstr ""
msgid "Belarusian, Belarus"
msgstr ""
msgid "Bulgarian, Bulgaria"
msgstr ""
msgid "Bengali, India"
msgstr ""
msgid "Bosnian, Bosnia and Herzegovina"
msgstr ""
msgid "Catalan, Spain"
msgstr ""
msgid "Czech, Czech Republic"
msgstr ""
msgid "Danish, Denmark"
msgstr ""
msgid "German, Austria"
msgstr ""
msgid "German, Belgium"
msgstr ""
msgid "German, Switzerland"
msgstr ""
msgid "German, Germany"
msgstr ""
msgid "German, Liechtenstein"
msgstr ""
msgid "German, Luxembourg"
msgstr ""
msgid "Greek, Cyprus"
msgstr ""
msgid "Greek, Greece"
msgstr ""
msgid "English, Australia"
msgstr ""
msgid "English, Botswana"
msgstr ""
msgid "English, Canada"
msgstr ""
msgid "English, United Kingdom"
msgstr ""
msgid "English, Hong Kong SAR China"
msgstr ""
msgid "English, Ireland"
msgstr ""
msgid "English, India"
msgstr ""
msgid "English, Malta"
msgstr ""
msgid "English, New Zealand"
msgstr ""
msgid "English, Philippines"
msgstr ""
msgid "English, Singapore"
msgstr ""
msgid "English, U.S.A."
msgstr ""
msgid "English, Zimbabwe"
msgstr ""
msgid "Spanish, Argentina"
msgstr ""
msgid "Spanish, Bolivia"
msgstr ""
msgid "Spanish, Chile"
msgstr ""
msgid "Spanish, Colombia"
msgstr ""
msgid "Spanish, Costa Rica"
msgstr ""
msgid "Spanish, Dominican Republic"
msgstr ""
msgid "Spanish, Ecuador"
msgstr ""
msgid "Spanish, Spain"
msgstr ""
msgid "Spanish, Guatemala"
msgstr ""
msgid "Spanish, Honduras"
msgstr ""
msgid "Spanish, Mexico"
msgstr ""
msgid "Spanish, Nicaragua"
msgstr ""
msgid "Spanish, Panama"
msgstr ""
msgid "Spanish, Peru"
msgstr ""
msgid "Spanish, Puerto Rico"
msgstr ""
msgid "Spanish, Paraguay"
msgstr ""
msgid "Spanish, El Salvador"
msgstr ""
msgid "Spanish, U.S.A."
msgstr ""
msgid "Spanish, Uruguay"
msgstr ""
msgid "Spanish, Venezuela"
msgstr ""
msgid "Estonian, Estonia"
msgstr ""
msgid "Finnish, Finland"
msgstr ""
msgid "French, Belgium"
msgstr ""
msgid "French, Canada"
msgstr ""
msgid "French, Switzerland"
msgstr ""
msgid "French, France"
msgstr ""
msgid "French, Luxembourg"
msgstr ""
msgid "Gujarati, India"
msgstr ""
msgid "Hebrew, Israel"
msgstr ""
msgid "Hindi, India"
msgstr ""
msgid "Croatian, Croatia"
msgstr ""
msgid "Hungarian, Hungary"
msgstr ""
msgid "Armenian, Armenia"
msgstr ""
msgid "Indonesian, Indonesia"
msgstr ""
msgid "Icelandic, Iceland"
msgstr ""
msgid "Italian, Switzerla"
msgstr ""
msgid "Italian, Italy"
msgstr ""
msgid "Japanese, Japan"
msgstr ""
msgid "Georgian, Georgia"
msgstr ""
msgid "Kazakh, Kazakhstan"
msgstr ""
msgid "Kannada, India"
msgstr ""
msgid "Korean, Korea"
msgstr ""
msgid "Kashmiri, India"
msgstr ""
msgid "Kurdish, Turkey"
msgstr ""
msgid "Kurdish (Sorani), Turkey"
msgstr ""
msgid "Kirghiz, Kyrgyzstan"
msgstr ""
msgid "Lithuanian, Lithuania"
msgstr ""
msgid "Latvian, Latvia"
msgstr ""
msgid "Macedonian, Macedonia"
msgstr ""
msgid "Malayalam, India"
msgstr ""
msgid "Marathi, India"
msgstr ""
msgid "Malay, Malaysia"
msgstr ""
msgid "Maltese, Malta"
msgstr ""
msgid "Bokmal, Norway"
msgstr ""
msgid "Dutch, Belgium"
msgstr ""
msgid "Dutch, Netherlands"
msgstr ""
msgid "Nynorsk, Norway"
msgstr ""
msgid "Oriya, India"
msgstr ""
msgid "Punjabi, India"
msgstr ""
msgid "Polish, Poland"
msgstr ""
msgid "Portuguese, Brazil"
msgstr ""
msgid "Portuguese, Portugal"
msgstr ""
msgid "Romanian, Romania"
msgstr ""
msgid "Russian, Russia"
msgstr ""
msgid "Russian, Ukraine"
msgstr ""
msgid "Sanskrit, India"
msgstr ""
msgid "Slovak, Slovakia"
msgstr ""
msgid "Slovenian, Slovenia"
msgstr ""
msgid "Albanian, Albania"
msgstr ""
msgid "Serbian, Montenegro"
msgstr ""
msgid "Serbian, Montenegro (Latin)"
msgstr ""
msgid "Serbian, Serbia"
msgstr ""
msgid "Serbian, Serbia (Latin)"
msgstr ""
msgid "Swedish, Sweden"
msgstr ""
msgid "Tamil, India"
msgstr ""
msgid "Telugu, India"
msgstr ""
msgid "Thai, Thailand"
msgstr ""
msgid "Turkish, Turkey"
msgstr ""
msgid "Ukrainian, Ukraine"
msgstr ""
msgid "Vietnamese, Vietnam"
msgstr ""
msgid "Simplified Chinese, China"
msgstr ""
msgid "Traditional Chinese, Hong Kong SAR China"
msgstr ""
msgid "Chinese, Singapore"
msgstr ""
msgid "Traditional Chinese, Taiwan"
msgstr ""

@ -0,0 +1,613 @@
# Russian translations for ubl-settings-system package.
# Copyright (C) 2022, UBTech LLC
# This file is distributed under the same license as the ubl-settings-system package.
# UBLinux Team <info@ublinux.com>, 2022
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: ubl-settings-system 1.0\n"
"Report-Msgid-Bugs-To: info@ublinux.com\n"
"POT-Creation-Date: 2023-04-25 15:52+0600\n"
"PO-Revision-Date: 2023-01-01 00:00+0600\n"
"Last-Translator: UBLinux Team <info@ublinux.com>\n"
"Language-Team: Russian - UBLinux Team <info@ublinux.com>\n"
"Language: Russian\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: source/ubl-strings.h:1
msgid "Version:"
msgstr "Версия:"
#: source/ubl-strings.h:2
msgid "ubl-settings-system version:"
msgstr "Версия ubl-settings-system: "
#: source/ubl-strings.h:2 source/ubl-strings.h:4
msgid "System configuration"
msgstr "Системные настройки"
#: source/ubl-strings.h:2
msgid "Usage:"
msgstr "Использование:"
#: source/ubl-strings.h:2
msgid "[OPTIONS]"
msgstr "[АРГУМЕНТЫ]"
#: source/ubl-strings.h:2
msgid "Options:"
msgstr "Аргументы:"
#: source/ubl-strings.h:2
msgid "Show this help"
msgstr "Показать параметры справки"
#: source/ubl-strings.h:2
msgid "Show package version"
msgstr "Показать текущую версию"
#: source/ubl-strings.h:2
msgid "Lock this help menu"
msgstr "Блокировка вызова справки"
#: source/ubl-strings.h:2
msgid "Lock configuration saving"
msgstr "Блокировка сохранения локальной и глобальной конфигурации"
#: source/ubl-strings.h:2
msgid "Lock local configration saving"
msgstr "Блокировка сохранения локальной конфигурации"
#: source/ubl-strings.h:2
msgid "Lock global configration saving"
msgstr "Блокировка сохранения глобальной конфигурации"
#: source/ubl-strings.h:2
msgid "Lock global configration loading"
msgstr "Блокировка загрузки глобальной конфигурации"
#: source/ubl-strings.h:5
msgid "System basic parameters configuration"
msgstr "Настройка основных параметров системы"
#: source/ubl-strings.h:7
msgid "Operation succeeded"
msgstr "Операция завершена"
#: source/ubl-strings.h:8
msgid ""
"Warning! Application was launched without root - root-dependent actions are "
"locked"
msgstr ""
"Внимание! Приложение было запущено без прав суперпользователя - действия, "
"требующие их наличия заблокированы"
#: source/ubl-strings.h:10
msgid "About"
msgstr "О программе"
#: source/ubl-strings.h:11
msgid "Documentation"
msgstr "Справка"
#: source/ubl-strings.h:13
msgid "Save to local configuration"
msgstr "Сохранить в локальную конфигурацию"
#: source/ubl-strings.h:14
msgid "Save to global configuration"
msgstr "Сохранить в глобальную конфигурацию"
#: source/ubl-strings.h:15
msgid "Save configuration"
msgstr "Сохранить конфигурацию"
#: source/ubl-strings.h:16
msgid "Save"
msgstr "Сохранить"
#: source/ubl-strings.h:18
msgid "Load local configuration"
msgstr "Загрузить локальную конфигуруцию"
#: source/ubl-strings.h:19
msgid "Load global configuration"
msgstr "Загрузить глобальную конфигурацию"
#: source/ubl-strings.h:20
msgid "Load"
msgstr "Загрузить"
#: source/ubl-strings.h:22
msgid "Cancel"
msgstr "Отмена"
#: source/ubl-strings.h:24
msgid "Would you like to read documentation in the Web?"
msgstr "Вы хотите прочитать справку в Сети?"
#: source/ubl-strings.h:25
msgid ""
"You will be redirected to documentation website where documentation is\n"
"translated and supported by community."
msgstr ""
"Вы будете перенаправлены на сайт с документацией, где страницы помощи\n"
"переводятся и поддерживаются сообществом."
#: source/ubl-strings.h:26
msgid "Always redirect to online documentation"
msgstr "Всегда перенаправлять"
#: source/ubl-strings.h:27
msgid "Open documentation"
msgstr "Прочитать справку"
#: source/ubl-strings.h:28
msgid "Project Home Page"
msgstr "Домашняя страница проекта"
#: source/ubl-strings.h:29
msgid "Nothing were chosen"
msgstr "Ничего не было выбрано"
#: source/ubl-strings.h:32
msgid "Global configuration loading succseeded."
msgstr "Успешно загружена глобальная конфигурация"
#: source/ubl-strings.h:33
msgid "Local configuration loading succseeded."
msgstr "Успешно загружена локальная конфигурация"
#: source/ubl-strings.h:34
msgid "Config loading failed"
msgstr "Ошибка загрузки конфигурации"
#: source/ubl-strings.h:36
msgid "Local and global configuration saving succseeded."
msgstr "Успешно записаны локальная и глобальная конфигурация"
#: source/ubl-strings.h:37
msgid "Global configuration saving succseeded."
msgstr "Успешно записана глобальная конфигурация"
#: source/ubl-strings.h:38
msgid "Local configuration saving succseeded."
msgstr "Успешно записана локальная конфигурация"
#: source/ubl-strings.h:40
msgid "Hostname:"
msgstr "Имя хоста:"
#: source/ubl-strings.h:41
msgid "Work station ID:"
msgstr "ID рабочей станции:"
#: source/ubl-strings.h:42
msgid "System"
msgstr "Система"
#: source/ubl-strings.h:43
msgid "Random"
msgstr "Случайный"
#: source/ubl-strings.h:44
msgid "Hardware"
msgstr "Системный"
#: source/ubl-strings.h:45
msgid "Manual"
msgstr "Вручную"
#: source/ubl-strings.h:46
msgid "Console"
msgstr "Консоль"
#: source/ubl-strings.h:47
msgid "Console font:"
msgstr "Шрифт в консоли"
#: source/ubl-strings.h:48
msgid "Locale"
msgstr "Локаль"
#: source/ubl-strings.h:49
msgid "Language:"
msgstr "Язык"
#: source/ubl-strings.h:51
msgid "Default"
msgstr "По умолчанию"
#: source/ubl-strings.h:53
msgid "Machine ID has been copied"
msgstr "ID рабочей станции скопирован"
msgid "Afrikaans, South Africa"
msgstr "Африканский, Южная Африка"
msgid "Arabic, United Arab Emirates"
msgstr "Арабский, ЮАР"
msgid "Arabic, Bahrain"
msgstr "Арабский, Бахрейн"
msgid "Arabic, Algeria"
msgstr "Арабский, Алжир"
msgid "Arabic, Egypt"
msgstr "Арабский, Египт"
msgid "Arabic, Iraq"
msgstr "Арабский, Ирак"
msgid "Arabic, Jordan"
msgstr "Арабский, Иордания"
msgid "Arabic, Kuwait"
msgstr "Арабский, Кувейт"
msgid "Arabic, Libya"
msgstr "Арабский, Ливия"
msgid "Arabic, Morocco"
msgstr "Арабский, Морокко"
msgid "Arabic, Oman"
msgstr "Арабский, Оман"
msgid "Arabic, Qatar"
msgstr "Арабский, Катар"
msgid "Arabic, Saudi Arabia"
msgstr "Арабский, Саудовская Аравия"
msgid "Arabic, Tunisia"
msgstr "Арабский, Тунис"
msgid "Arabic, Yemen"
msgstr "Арабский, Йемен"
msgid "Assamese, India"
msgstr "Ассамский, Индия"
msgid "Azerbaijani, Azerbaijan"
msgstr "Азербайджанский,Азербайджан"
msgid "Belarusian, Belarus"
msgstr "Беларусский, Беларусь"
msgid "Bulgarian, Bulgaria"
msgstr "Болгарский, Болгария"
msgid "Bengali, India"
msgstr "Бенгальский, Индия"
msgid "Bosnian, Bosnia and Herzegovina"
msgstr "Боснийский, Босния и Герцеговина"
msgid "Catalan, Spain"
msgstr "Каталонский, Испания"
msgid "Czech, Czech Republic"
msgstr "Чешский, Чехия"
msgid "Danish, Denmark"
msgstr "Датский, Дания"
msgid "German, Austria"
msgstr "Немецкий, Австрия"
msgid "German, Belgium"
msgstr "Немецкий, Бельгия"
msgid "German, Switzerland"
msgstr "Немецкий, Швейцария"
msgid "German, Germany"
msgstr "Немецкий, Германия"
msgid "German, Liechtenstein"
msgstr "Немецкий, Лихтенштейн"
msgid "German, Luxembourg"
msgstr "Немецкий, Люксембург"
msgid "Greek, Cyprus"
msgstr "Греческий, Кипр"
msgid "Greek, Greece"
msgstr "Греческий, Греция"
msgid "English, Australia"
msgstr "Английский, Австралия"
msgid "English, Botswana"
msgstr "Английский, ботсвана"
msgid "English, Canada"
msgstr "Английский, Канада"
msgid "English, United Kingdom"
msgstr "Английский, Великобритания"
msgid "English, Hong Kong SAR China"
msgstr "Английский, Гонконг"
msgid "English, Ireland"
msgstr "Английский, Ирландия"
msgid "English, India"
msgstr "Английский, Индия"
msgid "English, Malta"
msgstr "Английский, Мальта"
msgid "English, New Zealand"
msgstr "Английский, Новая Зеландия"
msgid "English, Philippines"
msgstr "Английский, Филиппины"
msgid "English, Singapore"
msgstr "Английский, Сингапур"
msgid "English, U.S.A."
msgstr "Английский, США"
msgid "English, Zimbabwe"
msgstr "Английский, Зимбабве"
msgid "Spanish, Argentina"
msgstr "Испанский, Аргентина"
msgid "Spanish, Bolivia"
msgstr "Испанский, Боливия"
msgid "Spanish, Chile"
msgstr "Испанский, Чили"
msgid "Spanish, Colombia"
msgstr "Испанский, Колумбия"
msgid "Spanish, Costa Rica"
msgstr "Испанский, Коста-Рика"
msgid "Spanish, Dominican Republic"
msgstr "Испанский, Доминиканская республика"
msgid "Spanish, Ecuador"
msgstr "Испанский, Эквадор"
msgid "Spanish, Spain"
msgstr "Испанский, Испания"
msgid "Spanish, Guatemala"
msgstr "Испанский, Гватемала"
msgid "Spanish, Honduras"
msgstr "Испанский, Гондурас"
msgid "Spanish, Mexico"
msgstr "Испанский, Мексика"
msgid "Spanish, Nicaragua"
msgstr "Испанский, Никарагуа"
msgid "Spanish, Panama"
msgstr "Испанский, Панама"
msgid "Spanish, Peru"
msgstr "Испанский, Перу"
msgid "Spanish, Puerto Rico"
msgstr "Испанский, Пуэрто-Рико"
msgid "Spanish, Paraguay"
msgstr "Испанский, Парагвай"
msgid "Spanish, El Salvador"
msgstr "Испанский, Сальвадор"
msgid "Spanish, U.S.A."
msgstr "Испанский, США"
msgid "Spanish, Uruguay"
msgstr "Испанский, Уругвай"
msgid "Spanish, Venezuela"
msgstr "Испанский, Венесуэла"
msgid "Estonian, Estonia"
msgstr "Эстонский, Эстония"
msgid "Finnish, Finland"
msgstr "Финский, Финляндия"
msgid "French, Belgium"
msgstr "Французский, Бельгия"
msgid "French, Canada"
msgstr "Французский, Канада"
msgid "French, Switzerland"
msgstr "Французский, Швейцария"
msgid "French, France"
msgstr "Французский, Франция"
msgid "French, Luxembourg"
msgstr "Французский, Люксембург"
msgid "Gujarati, India"
msgstr "Гуджаратский, Индия"
msgid "Hebrew, Israel"
msgstr "Иврит, Израиль"
msgid "Hindi, India"
msgstr "Хинди, Индия"
msgid "Croatian, Croatia"
msgstr "Хорватский, Хорватия"
msgid "Hungarian, Hungary"
msgstr "Венгерский, Венгрия"
msgid "Armenian, Armenia"
msgstr "Армянский, Армения"
msgid "Indonesian, Indonesia"
msgstr "Индонезийский, Индонезия"
msgid "Icelandic, Iceland"
msgstr "Исландский, Исландия"
msgid "Italian, Switzerla"
msgstr "Итальянский, Швейцария"
msgid "Italian, Italy"
msgstr "Итальянский, Италия"
msgid "Japanese, Japan"
msgstr "Японский, Япония"
msgid "Georgian, Georgia"
msgstr "Грузинский, Грузия"
msgid "Kazakh, Kazakhstan"
msgstr "Казахский, Казахстан"
msgid "Kannada, India"
msgstr "Каннада, Индия"
msgid "Korean, Korea"
msgstr "орейский, Корея"
msgid "Kashmiri, India"
msgstr "Кашмирский, Индия"
msgid "Kurdish, Turkey"
msgstr "Курдский, Турция"
msgid "Kurdish (Sorani), Turkey"
msgstr "Курдский (Сорани), Турция"
msgid "Kirghiz, Kyrgyzstan"
msgstr "Киргизский, Кыргызстан"
msgid "Lithuanian, Lithuania"
msgstr "Литовский, Литва"
msgid "Latvian, Latvia"
msgstr "Латышский, Латвия"
msgid "Macedonian, Macedonia"
msgstr "Македонский, Северная Македония"
msgid "Malayalam, India"
msgstr "Малаялам, Индия"
msgid "Marathi, India"
msgstr "Маратхи, Индия"
msgid "Malay, Malaysia"
msgstr "Малайский, Малайзия"
msgid "Maltese, Malta"
msgstr "Мальтийский, Мальта"
msgid "Bokmal, Norway"
msgstr "Букмол, Норвегия"
msgid "Dutch, Belgium"
msgstr "Нидерландский, Бельгия"
msgid "Dutch, Netherlands"
msgstr "Нидерландский, Нидерланды"
msgid "Nynorsk, Norway"
msgstr "Норвежский, Норвегия"
msgid "Oriya, India"
msgstr "Ория, Индия"
msgid "Punjabi, India"
msgstr "Панджаби"
msgid "Polish, Poland"
msgstr "Польский, Польша"
msgid "Portuguese, Brazil"
msgstr "Португальский, Бразилия"
msgid "Portuguese, Portugal"
msgstr "Португальский, Португалия"
msgid "Romanian, Romania"
msgstr "Румынский, Румыния"
msgid "Russian, Russia"
msgstr "Русский, Россия"
msgid "Russian, Ukraine"
msgstr "Русский, Украина"
msgid "Sanskrit, India"
msgstr "Санскрит, Индия"
msgid "Slovak, Slovakia"
msgstr "Словацкий, Словакия"
msgid "Slovenian, Slovenia"
msgstr "Словенский, Словения"
msgid "Albanian, Albania"
msgstr "Албанский, Албания"
msgid "Serbian, Montenegro"
msgstr "Сербский, Черногория"
msgid "Serbian, Montenegro (Latin)"
msgstr "Сербский, Черногория"
msgid "Serbian, Serbia"
msgstr "Сербский, Сербия"
msgid "Serbian, Serbia (Latin)"
msgstr "Сербский, Сербия"
msgid "Swedish, Sweden"
msgstr "Шведский, Швеция"
msgid "Tamil, India"
msgstr "Тамильский, Индия"
msgid "Telugu, India"
msgstr "Тулугу, Индия"
msgid "Thai, Thailand"
msgstr "Тайский, Тайланд"
msgid "Turkish, Turkey"
msgstr "Турецкий, Турция"
msgid "Ukrainian, Ukraine"
msgstr "Украинский, Украина"
msgid "Vietnamese, Vietnam"
msgstr "Вьетнамский, Вьетнам"
msgid "Simplified Chinese, China"
msgstr "Упрощённый Китайский, Китай"
msgid "Traditional Chinese, Hong Kong SAR China"
msgstr "Традиционный Китайский, Гонконг"
msgid "Chinese, Singapore"
msgstr "Китайский, Сингапур"
msgid "Traditional Chinese, Taiwan"
msgstr "Традиционный Китайский, Тайвань"
Loading…
Cancel
Save