diff --git a/Makefile b/Makefile index 9751fcd..6aa547b 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ DEPENDS = /bin/cmake PREFIX ?= /usr/local PKGNAME = $(MAKEFILE_DIR) FILE_VER = source/CMakeLists.txt -PKGIDENT=$(subst /,-,${PREFIX}) +PKGIDENT=$(subst /,-,/usr) default_target: all @@ -49,14 +49,14 @@ depend: debug: @echo "Debug ..." if [ ! -d ${CMAKE_UI_BUILD_DIR} ]; then \ - $(CMAKE_UI_COMMAND) -S${CMAKE_UI_SOURCE_DIR} -B${CMAKE_UI_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \ + $(CMAKE_UI_COMMAND) -S${CMAKE_UI_SOURCE_DIR} -B${CMAKE_UI_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="/usr"; \ fi; \ echo "Debug: OK" prepare: @echo "Prepare ..."; \ if [ ! -d ${CMAKE_UI_BUILD_DIR} ]; then \ - $(CMAKE_UI_COMMAND) -DCMAKE_INSTALL_PREFIX=/usr -S${CMAKE_UI_SOURCE_DIR} -B${CMAKE_UI_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \ + $(CMAKE_UI_COMMAND) -DCMAKE_INSTALL_PREFIX=/usr -S${CMAKE_UI_SOURCE_DIR} -B${CMAKE_UI_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr"; \ fi; \ echo "Prepare: OK" @@ -79,7 +79,7 @@ build: depend prepare uninstall: @echo "Uninstall ..." @for LANG in $$(find ./ -iname "*.po" -print | sed -En "s/.+_([[:alpha:]]+)\.po/\1/p" | sort -u); do \ -# PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ +# PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/${PKGNAME}.mo"; \ $(RM) "$${PATH_FILE_MO}"; \ done @@ -90,25 +90,25 @@ uninstall: $(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"; \ + $(RM) "${DESTDIR}/usr/share/icons/hicolor/$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ + $(RM) "${DESTDIR}/usr/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}; \ + $(RM) "${DESTDIR}/usr/share/icons/hicolor/$${SIZE}/status/$${FILE_SVG%.*}".{svg,png,jpg}; \ done; \ done @for FILE_ICON in $(wildcard icons/*/*.svg); do \ SUB_NAME=$${FILE_ICON#*/};SUB_NAME=$${FILE_ICON%/*}; \ $(RM) "${DESTDIR}/usr/share/icons/hicolor/scalable/$${SUB_NAME}/$${FILE_ICON##*/}"; \ done - @$(RM) "${DESTDIR}${PREFIX}/lib/${PKGNAME}".so* - @$(RM) "${DESTDIR}${PREFIX}/include/${PKGNAME}".h* + @$(RM) "${DESTDIR}/usr/lib/${PKGNAME}".so* + @$(RM) "${DESTDIR}/usr/include/${PKGNAME}".h* @if [ -z ${DESTDIR} ]; then \ - [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ + [ -d "${DESTDIR}/usr/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}/usr/share/icons/hicolor/" &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \ - [ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ - ldconfig -n ${DESTDIR}${PREFIX}/lib; \ + [ -d "${DESTDIR}/usr/share/applications" ] && touch "${DESTDIR}/usr/share/applications" &>/dev/null || true; \ + ldconfig -n ${DESTDIR}/usr/lib; \ fi @echo "Uninstall: OK" @@ -124,8 +124,8 @@ install: check 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"; \ + 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}.svg" -o "${DESTDIR}/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ done @install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg" @for FILE_ICON in $(wildcard icons/*/*.svg); do \ @@ -136,7 +136,7 @@ install: check [ -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; \ - ldconfig -n ${DESTDIR}${PREFIX}/lib; \ + ldconfig -n ${DESTDIR}/usr/lib; \ fi @echo "Install: OK" diff --git a/libublsettingsui-gtk3-password.glade b/libublsettingsui-gtk3-password.glade index 81710d0..118c6d4 100644 --- a/libublsettingsui-gtk3-password.glade +++ b/libublsettingsui-gtk3-password.glade @@ -145,6 +145,43 @@ 0 + + + True + False + 5 + + + True + False + + + + + + False + True + 0 + + + + + True + False + + + True + True + 1 + + + + + False + True + 1 + + True @@ -185,7 +222,7 @@ True True - 1 + 2 @@ -200,7 +237,7 @@ False True - 2 + 3 @@ -211,7 +248,7 @@ False True - 3 + 4 @@ -264,7 +301,7 @@ False True - 4 + 5 @@ -328,6 +365,7 @@ + diff --git a/libublsettingsui-gtk3-users-window.glade b/libublsettingsui-gtk3-users-window.glade index 8698736..d3580fd 100644 --- a/libublsettingsui-gtk3-users-window.glade +++ b/libublsettingsui-gtk3-users-window.glade @@ -1,7 +1,8 @@ - + + True False diff --git a/libublsettingsui-gtk3.css b/libublsettingsui-gtk3.css index a706226..e0ff429 100644 --- a/libublsettingsui-gtk3.css +++ b/libublsettingsui-gtk3.css @@ -130,4 +130,9 @@ background:transparent; .marginright image{ margin-right: 2px; +} + +.bgimage{ + background-image: url('resource:///com/ublinux/images/libublsettingsui-gtk3-banner.png'); + background-repeat: no-repeat; } \ No newline at end of file diff --git a/libublsettingsui-gtk3.glade b/libublsettingsui-gtk3.glade index 64d838c..cced5de 100644 --- a/libublsettingsui-gtk3.glade +++ b/libublsettingsui-gtk3.glade @@ -1,5 +1,5 @@ - - - True - False - center - - - True - False - 5 - 5 - 5 - 6 - 6 - 64 - com.ublinux.libublsettingsui-gtk3 - - - False - True - 0 - - - - - True - False - - - True - False - - - True - False - center - vertical - - - 255 - True - False - end - TEMPLATE Manager - 0 - - - - - - - - True - True - 0 - - - - - 255 - True - False - start - TEMPLATE management app - True - 0 - - - - - - - - True - True - 1 - - - - - False - True - 0 - - - - - True - True - 0 - - - - - True - True - 1 - - - True False @@ -324,20 +221,112 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. False vertical - - 81 + True False + center + + + True + False + 5 + 5 + 5 + 6 + 6 + 64 + com.ublinux.libublsettingsui-gtk3 + + + False + True + 0 + + - + True False - start + + + True + False + + + True + False + center + vertical + + + 255 + True + False + end + TEMPLATE Manager + 0 + + + + + + + + True + True + 0 + + + + + 255 + True + False + TEMPLATE management app + True + word-char + False + 0 + + + + + + + + True + True + 1 + + + + + False + True + 0 + + + + + True + True + 0 + + - -1 + True + True + 1 + False diff --git a/libublsettingsui-gtk3.pot b/libublsettingsui-gtk3.pot index f87abcf..5551ef1 100644 --- a/libublsettingsui-gtk3.pot +++ b/libublsettingsui-gtk3.pot @@ -17,381 +17,473 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: source/libublsettingsui-gtk3.h:376 +#: source/libublsettingsui-gtk3.h:589 msgid "Version:" msgstr "" -#: source/libublsettingsui-gtk3.h:377 +#: source/libublsettingsui-gtk3.h:590 msgid " version:" msgstr "" -#: source/libublsettingsui-gtk3.h:378 +#: source/libublsettingsui-gtk3.h:591 msgid "Usage:" msgstr "" -#: source/libublsettingsui-gtk3.h:378 +#: source/libublsettingsui-gtk3.h:591 msgid "[OPTIONS]" msgstr "" -#: source/libublsettingsui-gtk3.h:379 +#: source/libublsettingsui-gtk3.h:592 msgid "Options:" msgstr "" -#: source/libublsettingsui-gtk3.h:380 +#: source/libublsettingsui-gtk3.h:593 msgid "Show this help" msgstr "" -#: source/libublsettingsui-gtk3.h:381 +#: source/libublsettingsui-gtk3.h:594 msgid "Show package version" msgstr "" -#: source/libublsettingsui-gtk3.h:382 +#: source/libublsettingsui-gtk3.h:595 msgid "Lock this help menu" msgstr "" -#: source/libublsettingsui-gtk3.h:383 +#: source/libublsettingsui-gtk3.h:596 msgid "Lock configuration saving" msgstr "" -#: source/libublsettingsui-gtk3.h:384 +#: source/libublsettingsui-gtk3.h:597 msgid "Lock local configration saving" msgstr "" -#: source/libublsettingsui-gtk3.h:385 +#: source/libublsettingsui-gtk3.h:598 msgid "Lock global configration saving" msgstr "" -#: source/libublsettingsui-gtk3.h:386 +#: source/libublsettingsui-gtk3.h:599 msgid "Lock global configration loading" msgstr "" -#: source/libublsettingsui-gtk3.h:387 +#: source/libublsettingsui-gtk3.h:600 msgid "Reset application settings" msgstr "" -#: source/libublsettingsui-gtk3.h:393 source/libublsettingsui-gtk3.h:401 +#: source/libublsettingsui-gtk3.h:606 source/libublsettingsui-gtk3.h:614 msgid "About" msgstr "" -#: source/libublsettingsui-gtk3.h:395 +#: source/libublsettingsui-gtk3.h:608 msgid "Operation succeeded" msgstr "" -#: source/libublsettingsui-gtk3.h:396 +#: source/libublsettingsui-gtk3.h:609 msgid "Operation failed" msgstr "" -#: source/libublsettingsui-gtk3.h:397 +#: source/libublsettingsui-gtk3.h:610 msgid "" "Warning! Application was launched without root - root-dependent actions are " "locked" msgstr "" -#: source/libublsettingsui-gtk3.h:399 source/libublsettingsui-gtk3.h:400 +#: source/libublsettingsui-gtk3.h:612 source/libublsettingsui-gtk3.h:613 msgid "Default" msgstr "" -#: source/libublsettingsui-gtk3.h:402 +#: source/libublsettingsui-gtk3.h:615 msgid "Documentation" msgstr "" -#: source/libublsettingsui-gtk3.h:404 +#: source/libublsettingsui-gtk3.h:617 msgid "Save to specific file" msgstr "" -#: source/libublsettingsui-gtk3.h:405 +#: source/libublsettingsui-gtk3.h:618 msgid "Save to local configuration" msgstr "" -#: source/libublsettingsui-gtk3.h:406 +#: source/libublsettingsui-gtk3.h:619 msgid "Save to global configuration" msgstr "" -#: source/libublsettingsui-gtk3.h:407 +#: source/libublsettingsui-gtk3.h:620 msgid "Save configuration" msgstr "" -#: source/libublsettingsui-gtk3.h:408 +#: source/libublsettingsui-gtk3.h:621 msgid "Save" msgstr "" -#: source/libublsettingsui-gtk3.h:409 +#: source/libublsettingsui-gtk3.h:622 msgid "Saving..." msgstr "" -#: source/libublsettingsui-gtk3.h:411 +#: source/libublsettingsui-gtk3.h:624 msgid "Load from specific file" msgstr "" -#: source/libublsettingsui-gtk3.h:412 +#: source/libublsettingsui-gtk3.h:625 msgid "Load local configuration" msgstr "" -#: source/libublsettingsui-gtk3.h:413 +#: source/libublsettingsui-gtk3.h:626 msgid "Load global configuration" msgstr "" -#: source/libublsettingsui-gtk3.h:414 +#: source/libublsettingsui-gtk3.h:627 msgid "Load" msgstr "" -#: source/libublsettingsui-gtk3.h:415 +#: source/libublsettingsui-gtk3.h:628 msgid "Load file" msgstr "" -#: source/libublsettingsui-gtk3.h:417 +#: source/libublsettingsui-gtk3.h:630 msgid "Cancel" msgstr "" -#: source/libublsettingsui-gtk3.h:418 +#: source/libublsettingsui-gtk3.h:631 msgid "Ok" msgstr "" -#: source/libublsettingsui-gtk3.h:419 +#: source/libublsettingsui-gtk3.h:632 msgid "Open" msgstr "" -#: source/libublsettingsui-gtk3.h:420 +#: source/libublsettingsui-gtk3.h:633 msgid "Create directory" msgstr "" -#: source/libublsettingsui-gtk3.h:421 +#: source/libublsettingsui-gtk3.h:634 msgid "Select directory" msgstr "" -#: source/libublsettingsui-gtk3.h:423 +#: source/libublsettingsui-gtk3.h:636 msgid "Would you like to read documentation in the Web?" msgstr "" -#: source/libublsettingsui-gtk3.h:424 +#: source/libublsettingsui-gtk3.h:637 msgid "" "You will be redirected to documentation website where documentation is\n" "translated and supported by community." msgstr "" -#: source/libublsettingsui-gtk3.h:425 +#: source/libublsettingsui-gtk3.h:638 msgid "Always redirect to online documentation" msgstr "" -#: source/libublsettingsui-gtk3.h:426 +#: source/libublsettingsui-gtk3.h:639 msgid "Open documentation" msgstr "" -#: source/libublsettingsui-gtk3.h:427 +#: source/libublsettingsui-gtk3.h:640 msgid "Project Home Page" msgstr "" -#: source/libublsettingsui-gtk3.h:428 +#: source/libublsettingsui-gtk3.h:641 msgid "Nothing were chosen" msgstr "" -#: source/libublsettingsui-gtk3.h:429 +#: source/libublsettingsui-gtk3.h:642 msgid "Copyright © 2022 - 2025, UBSoft LLC" msgstr "" -#: source/libublsettingsui-gtk3.h:432 +#: source/libublsettingsui-gtk3.h:645 msgid "Global configuration loading succeeded." msgstr "" -#: source/libublsettingsui-gtk3.h:433 +#: source/libublsettingsui-gtk3.h:646 msgid "Local configuration loading succeeded." msgstr "" -#: source/libublsettingsui-gtk3.h:434 +#: source/libublsettingsui-gtk3.h:647 msgid "Config loading failed" msgstr "" -#: source/libublsettingsui-gtk3.h:436 +#: source/libublsettingsui-gtk3.h:649 msgid "Local and global configuration saving succeeded." msgstr "" -#: source/libublsettingsui-gtk3.h:437 +#: source/libublsettingsui-gtk3.h:650 msgid "Global configuration saving succeeded." msgstr "" -#: source/libublsettingsui-gtk3.h:438 +#: source/libublsettingsui-gtk3.h:651 msgid "Local configuration saving succeeded." msgstr "" -#: source/libublsettingsui-gtk3.h:439 +#: source/libublsettingsui-gtk3.h:652 msgid "Configuration saving succeeded." msgstr "" -#: source/libublsettingsui-gtk3.h:441 +#: source/libublsettingsui-gtk3.h:654 msgid "Parameter" msgstr "" -#: source/libublsettingsui-gtk3.h:442 +#: source/libublsettingsui-gtk3.h:655 msgid "Old value" msgstr "" -#: source/libublsettingsui-gtk3.h:443 +#: source/libublsettingsui-gtk3.h:656 msgid "New value" msgstr "" -#: source/libublsettingsui-gtk3.h:444 +#: source/libublsettingsui-gtk3.h:657 msgid "" "Value\n" "(Old/New)" msgstr "" -#: source/libublsettingsui-gtk3.h:446 +#: source/libublsettingsui-gtk3.h:659 msgid "Nothing to save" msgstr "" -#: source/libublsettingsui-gtk3.h:447 +#: source/libublsettingsui-gtk3.h:660 msgid "Saving into local configuration" msgstr "" -#: source/libublsettingsui-gtk3.h:448 +#: source/libublsettingsui-gtk3.h:661 msgid "Saving into global configuration" msgstr "" -#: source/libublsettingsui-gtk3.h:449 +#: source/libublsettingsui-gtk3.h:662 msgid "Saving into global and local configuration" msgstr "" -#: source/libublsettingsui-gtk3.h:450 +#: source/libublsettingsui-gtk3.h:663 msgid "Saving into custom configuration at" msgstr "" -#: source/libublsettingsui-gtk3.h:455 +#: source/libublsettingsui-gtk3.h:668 msgid "Full saving mode" msgstr "" -#: source/libublsettingsui-gtk3.h:456 +#: source/libublsettingsui-gtk3.h:669 msgid "Saving into module" msgstr "" -#: source/libublsettingsui-gtk3.h:457 +#: source/libublsettingsui-gtk3.h:670 msgid "Sandbox mode" msgstr "" -#: source/libublsettingsui-gtk3.h:458 +#: source/libublsettingsui-gtk3.h:671 msgid "Sandbox with profile saving" msgstr "" -#: source/libublsettingsui-gtk3.h:459 +#: source/libublsettingsui-gtk3.h:672 msgid "HDD sandbox" msgstr "" -#: source/libublsettingsui-gtk3.h:460 +#: source/libublsettingsui-gtk3.h:673 msgid "HDD sandbox with profile saving" msgstr "" -#: source/libublsettingsui-gtk3.h:461 +#: source/libublsettingsui-gtk3.h:674 msgid "New configuration file creation failed" msgstr "" -#: source/libublsettingsui-gtk3.h:462 +#: source/libublsettingsui-gtk3.h:675 msgid "Grant root access" msgstr "" -#: source/libublsettingsui-gtk3.h:463 +#: source/libublsettingsui-gtk3.h:676 msgid "Settings" msgstr "" -#: source/libublsettingsui-gtk3.h:465 +#: source/libublsettingsui-gtk3.h:678 msgid "Settigs" msgstr "" -#: source/libublsettingsui-gtk3.h:467 +#: source/libublsettingsui-gtk3.h:680 msgid "Invalid email address" msgstr "" -#: source/libublsettingsui-gtk3.h:468 +#: source/libublsettingsui-gtk3.h:681 msgid "Invalid path" msgstr "" -#: source/libublsettingsui-gtk3.h:470 +#: source/libublsettingsui-gtk3.h:683 msgid "Choose path" msgstr "" -#: source/libublsettingsui-gtk3.h:471 +#: source/libublsettingsui-gtk3.h:684 msgid "Choose application" msgstr "" -#: source/libublsettingsui-gtk3.h:474 +#: source/libublsettingsui-gtk3.h:687 msgid "Choose directory instead of file" msgstr "" -#: source/libublsettingsui-gtk3.h:476 +#: source/libublsettingsui-gtk3.h:689 msgid "Enabled" msgstr "" -#: source/libublsettingsui-gtk3.h:477 +#: source/libublsettingsui-gtk3.h:690 msgid "Disabled" msgstr "" -#: source/libublsettingsui-gtk3.h:478 +#: source/libublsettingsui-gtk3.h:691 msgid "Active" msgstr "" -#: source/libublsettingsui-gtk3.h:479 +#: source/libublsettingsui-gtk3.h:692 msgid "Inactive" msgstr "" -#: source/libublsettingsui-gtk3.h:481 +#: source/libublsettingsui-gtk3.h:694 msgid "Active:" msgstr "" -#: source/libublsettingsui-gtk3.h:482 +#: source/libublsettingsui-gtk3.h:695 msgid "Enabled:" msgstr "" -#: source/libublsettingsui-gtk3.h:483 +#: source/libublsettingsui-gtk3.h:696 msgid "Start" msgstr "" -#: source/libublsettingsui-gtk3.h:484 +#: source/libublsettingsui-gtk3.h:697 msgid "Stop" msgstr "" -#: source/libublsettingsui-gtk3.h:485 +#: source/libublsettingsui-gtk3.h:698 msgid "Restart" msgstr "" -#: source/libublsettingsui-gtk3.h:486 +#: source/libublsettingsui-gtk3.h:700 msgid "Enable autolaunch" msgstr "" -#: source/libublsettingsui-gtk3.h:487 +#: source/libublsettingsui-gtk3.h:701 msgid "Disable autolaunch" msgstr "" -#: source/libublsettingsui-gtk3.h:489 +#: source/libublsettingsui-gtk3.h:703 #, c-format msgid "\"%s\" service configuration" msgstr "" -#: source/libublsettingsui-gtk3.h:490 +#: source/libublsettingsui-gtk3.h:704 #, c-format msgid "\"%s\" service:" msgstr "" -#: source/libublsettingsui-gtk3.h:491 +#: source/libublsettingsui-gtk3.h:705 msgid "service is active" msgstr "" -#: source/libublsettingsui-gtk3.h:492 +#: source/libublsettingsui-gtk3.h:706 msgid "service is inactive" msgstr "" -#: source/libublsettingsui-gtk3.h:492 -msgid "The changes were not saved to either the local or global configuration file.\nQuit without saving?" +#: source/libublsettingsui-gtk3.h:708 +msgid "Password" msgstr "" -#: source/libublsettingsui-gtk3.h:492 +#: source/libublsettingsui-gtk3.h:710 +msgid "" +"The changes were not saved to either the local or global configuration " +"file.\n" +"Quit without saving?" +msgstr "" + +#: source/libublsettingsui-gtk3.h:711 msgid "Exit" msgstr "" -#: source/libublsettingsui-gtk3.h:493 +#: source/libublsettingsui-gtk3.h:713 +msgid "Passwords do not match" +msgstr "" + +#: source/libublsettingsui-gtk3.h:714 +msgid "Password contains restricted symbols" +msgstr "" + +#: source/libublsettingsui-gtk3.h:715 +msgid "Empty important field!" +msgstr "" + +#: source/libublsettingsui-gtk3.h:716 +msgid "Invalid hash" +msgstr "" + +#: source/libublsettingsui-gtk3.h:717 +msgid "Default (None)" +msgstr "" + +#: source/libublsettingsui-gtk3.h:718 msgid "Access to file denied" msgstr "" -#: source/libublsettingsui-gtk3.h:493 +#: source/libublsettingsui-gtk3.h:719 msgid "The configuration file contains incorrect parameters." msgstr "" -msgid "Empty important field!" -msgstr "" \ No newline at end of file +#: source/libublsettingsui-gtk3.h:720 +msgid "Date format:" +msgstr "" + +#: source/libublsettingsui-gtk3.h:721 +msgid "YYYY" +msgstr "" + +#: source/libublsettingsui-gtk3.h:722 +msgid "MM" +msgstr "" + +#: source/libublsettingsui-gtk3.h:723 +msgid "DD" +msgstr "" + +#: source/libublsettingsui-gtk3.h:724 +msgid "DD.MM.YYYY" +msgstr "" + +#: source/libublsettingsui-gtk3.h:725 +msgid "DD-MM-YYYY" +msgstr "" + +#: source/libublsettingsui-gtk3.h:726 +msgid "DD/MM/YYYY" +msgstr "" + +#: source/libublsettingsui-gtk3.h:727 +msgid "MM-DD-YYYY" +msgstr "" + +#: source/libublsettingsui-gtk3.h:728 +msgid "The password does not meet the password policy requirements" +msgstr "" + +#: source/libublsettingsui-gtk3.h:728 +msgid "Choose groups" +msgstr "" + +#: source/libublsettingsui-gtk3.h:728 +msgid "Choose group" +msgstr "" + +#: source/libublsettingsui-gtk3.h:728 +msgid "Choose users" +msgstr "" + +#: source/libublsettingsui-gtk3.h:728 +msgid "Choose user" +msgstr "" + +#: source/libublsettingsui-gtk3.h:728 +msgid "Chosen" +msgstr "" + +#: source/libublsettingsui-gtk3.h:728 +msgid "ID" +msgstr "" + +#: source/libublsettingsui-gtk3.h:728 +msgid "Group" +msgstr "" + +#: source/libublsettingsui-gtk3.h:728 +msgid "User" +msgstr "" diff --git a/libublsettingsui-gtk3_ru.po b/libublsettingsui-gtk3_ru.po index d84a9a9..0290bd7 100644 --- a/libublsettingsui-gtk3_ru.po +++ b/libublsettingsui-gtk3_ru.po @@ -17,71 +17,71 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: source/libublsettingsui-gtk3.h:376 +#: source/libublsettingsui-gtk3.h:589 msgid "Version:" msgstr "Версия:" -#: source/libublsettingsui-gtk3.h:377 +#: source/libublsettingsui-gtk3.h:590 msgid " version:" msgstr " версия:" -#: source/libublsettingsui-gtk3.h:378 +#: source/libublsettingsui-gtk3.h:591 msgid "Usage:" msgstr "Использование:" -#: source/libublsettingsui-gtk3.h:378 +#: source/libublsettingsui-gtk3.h:591 msgid "[OPTIONS]" msgstr "[АРГУМЕНТЫ]" -#: source/libublsettingsui-gtk3.h:379 +#: source/libublsettingsui-gtk3.h:592 msgid "Options:" msgstr "Аргументы:" -#: source/libublsettingsui-gtk3.h:380 +#: source/libublsettingsui-gtk3.h:593 msgid "Show this help" msgstr "Показать эту подсказку" -#: source/libublsettingsui-gtk3.h:381 +#: source/libublsettingsui-gtk3.h:594 msgid "Show package version" msgstr "Показать версию пакета" -#: source/libublsettingsui-gtk3.h:382 +#: source/libublsettingsui-gtk3.h:595 msgid "Lock this help menu" msgstr "Заблокировать это меню помощи" -#: source/libublsettingsui-gtk3.h:383 +#: source/libublsettingsui-gtk3.h:596 msgid "Lock configuration saving" msgstr "Успешно записана локальная конфигурация" -#: source/libublsettingsui-gtk3.h:384 +#: source/libublsettingsui-gtk3.h:597 msgid "Lock local configration saving" msgstr "Заблокировать сохранение локальной конфигурации" -#: source/libublsettingsui-gtk3.h:385 +#: source/libublsettingsui-gtk3.h:598 msgid "Lock global configration saving" msgstr "Заблокировать сохранение глобальной конфигурации" -#: source/libublsettingsui-gtk3.h:386 +#: source/libublsettingsui-gtk3.h:599 msgid "Lock global configration loading" msgstr "Заблокировать загрузку глобальную конфигурацию" -#: source/libublsettingsui-gtk3.h:387 +#: source/libublsettingsui-gtk3.h:600 msgid "Reset application settings" msgstr "Сбросить настройки программы" -#: source/libublsettingsui-gtk3.h:393 source/libublsettingsui-gtk3.h:401 +#: source/libublsettingsui-gtk3.h:606 source/libublsettingsui-gtk3.h:614 msgid "About" msgstr "О программе" -#: source/libublsettingsui-gtk3.h:395 +#: source/libublsettingsui-gtk3.h:608 msgid "Operation succeeded" msgstr "Операция завершена" -#: source/libublsettingsui-gtk3.h:396 +#: source/libublsettingsui-gtk3.h:609 msgid "Operation failed" msgstr "Операция завершена с ошибкой" -#: source/libublsettingsui-gtk3.h:397 +#: source/libublsettingsui-gtk3.h:610 msgid "" "Warning! Application was launched without root - root-dependent actions are " "locked" @@ -89,83 +89,83 @@ msgstr "" "Внимание! Приложение было запущено без прав суперпользователя - действия, " "требующие их наличия заблокированы" -#: source/libublsettingsui-gtk3.h:399 source/libublsettingsui-gtk3.h:400 +#: source/libublsettingsui-gtk3.h:612 source/libublsettingsui-gtk3.h:613 msgid "Default" msgstr "По умолчанию" -#: source/libublsettingsui-gtk3.h:402 +#: source/libublsettingsui-gtk3.h:615 msgid "Documentation" msgstr "Справка" -#: source/libublsettingsui-gtk3.h:404 +#: source/libublsettingsui-gtk3.h:617 msgid "Save to specific file" msgstr "Сохранить в файл" -#: source/libublsettingsui-gtk3.h:405 +#: source/libublsettingsui-gtk3.h:618 msgid "Save to local configuration" msgstr "Сохранить в локальную конфигурацию" -#: source/libublsettingsui-gtk3.h:406 +#: source/libublsettingsui-gtk3.h:619 msgid "Save to global configuration" msgstr "Сохранить в глобальную конфигурацию" -#: source/libublsettingsui-gtk3.h:407 +#: source/libublsettingsui-gtk3.h:620 msgid "Save configuration" msgstr "Сохранить конфигурацию" -#: source/libublsettingsui-gtk3.h:408 +#: source/libublsettingsui-gtk3.h:621 msgid "Save" msgstr "Сохранить" -#: source/libublsettingsui-gtk3.h:409 +#: source/libublsettingsui-gtk3.h:622 msgid "Saving..." msgstr "Сохранение..." -#: source/libublsettingsui-gtk3.h:411 +#: source/libublsettingsui-gtk3.h:624 msgid "Load from specific file" msgstr "Загрузить из файла" -#: source/libublsettingsui-gtk3.h:412 +#: source/libublsettingsui-gtk3.h:625 msgid "Load local configuration" msgstr "Загрузить локальную конфигурацию" -#: source/libublsettingsui-gtk3.h:413 +#: source/libublsettingsui-gtk3.h:626 msgid "Load global configuration" msgstr "Загрузить глобальную конфигурацию" -#: source/libublsettingsui-gtk3.h:414 +#: source/libublsettingsui-gtk3.h:627 msgid "Load" msgstr "Загрузить" -#: source/libublsettingsui-gtk3.h:415 +#: source/libublsettingsui-gtk3.h:628 msgid "Load file" msgstr "Загрузить файл" -#: source/libublsettingsui-gtk3.h:417 +#: source/libublsettingsui-gtk3.h:630 msgid "Cancel" msgstr "Отмена" -#: source/libublsettingsui-gtk3.h:418 +#: source/libublsettingsui-gtk3.h:631 msgid "Ok" -msgstr "Принять" +msgstr "Подтвердить" -#: source/libublsettingsui-gtk3.h:419 +#: source/libublsettingsui-gtk3.h:632 msgid "Open" msgstr "Открыть" -#: source/libublsettingsui-gtk3.h:420 +#: source/libublsettingsui-gtk3.h:633 msgid "Create directory" msgstr "Создать папку" -#: source/libublsettingsui-gtk3.h:421 +#: source/libublsettingsui-gtk3.h:634 msgid "Select directory" msgstr "Выбрать папку" -#: source/libublsettingsui-gtk3.h:423 +#: source/libublsettingsui-gtk3.h:636 msgid "Would you like to read documentation in the Web?" msgstr "Вы хотите прочитать справку в Сети?" -#: source/libublsettingsui-gtk3.h:424 +#: source/libublsettingsui-gtk3.h:637 msgid "" "You will be redirected to documentation website where documentation is\n" "translated and supported by community." @@ -173,68 +173,67 @@ msgstr "" "Вы будете перенаправлены на сайт с документацией, где страницы помощи\n" "переводятся и поддерживаются сообществом." -#: source/libublsettingsui-gtk3.h:425 +#: source/libublsettingsui-gtk3.h:638 msgid "Always redirect to online documentation" msgstr "Всегда перенаправлять" -#: source/libublsettingsui-gtk3.h:426 +#: source/libublsettingsui-gtk3.h:639 msgid "Open documentation" msgstr "Прочитать справку" -#: source/libublsettingsui-gtk3.h:427 +#: source/libublsettingsui-gtk3.h:640 msgid "Project Home Page" msgstr "Домашняя страница проекта" -#: source/libublsettingsui-gtk3.h:428 +#: source/libublsettingsui-gtk3.h:641 msgid "Nothing were chosen" msgstr "Ничего не было выбрано" -#: source/libublsettingsui-gtk3.h:429 -#, fuzzy +#: source/libublsettingsui-gtk3.h:642 msgid "Copyright © 2022 - 2025, UBSoft LLC" msgstr "Copyright © 2022 - 2025, ООО «Юбисофт»" -#: source/libublsettingsui-gtk3.h:432 +#: source/libublsettingsui-gtk3.h:645 msgid "Global configuration loading succeeded." msgstr "Успешно загружена глобальная конфигурация" -#: source/libublsettingsui-gtk3.h:433 +#: source/libublsettingsui-gtk3.h:646 msgid "Local configuration loading succeeded." msgstr "Успешно загружена локальная конфигурация" -#: source/libublsettingsui-gtk3.h:434 +#: source/libublsettingsui-gtk3.h:647 msgid "Config loading failed" msgstr "Ошибка загрузки конфига" -#: source/libublsettingsui-gtk3.h:436 +#: source/libublsettingsui-gtk3.h:649 msgid "Local and global configuration saving succeeded." msgstr "Успешно записаны локальная и глобальная конфигурация" -#: source/libublsettingsui-gtk3.h:437 +#: source/libublsettingsui-gtk3.h:650 msgid "Global configuration saving succeeded." msgstr "Успешно записана глобальная конфигурация" -#: source/libublsettingsui-gtk3.h:438 +#: source/libublsettingsui-gtk3.h:651 msgid "Local configuration saving succeeded." msgstr "Успешно записана локальная конфигурация" -#: source/libublsettingsui-gtk3.h:439 +#: source/libublsettingsui-gtk3.h:652 msgid "Configuration saving succeeded." msgstr "Успешно записана конфигурация" -#: source/libublsettingsui-gtk3.h:441 +#: source/libublsettingsui-gtk3.h:654 msgid "Parameter" msgstr "Параметр" -#: source/libublsettingsui-gtk3.h:442 +#: source/libublsettingsui-gtk3.h:655 msgid "Old value" msgstr "Старое значение" -#: source/libublsettingsui-gtk3.h:443 +#: source/libublsettingsui-gtk3.h:656 msgid "New value" msgstr "Новое значение" -#: source/libublsettingsui-gtk3.h:444 +#: source/libublsettingsui-gtk3.h:657 msgid "" "Value\n" "(Old/New)" @@ -242,162 +241,258 @@ msgstr "" "Значение\n" "(Старое/Новое)" -#: source/libublsettingsui-gtk3.h:446 +#: source/libublsettingsui-gtk3.h:659 msgid "Nothing to save" msgstr "Нечего сохранять" -#: source/libublsettingsui-gtk3.h:447 +#: source/libublsettingsui-gtk3.h:660 msgid "Saving into local configuration" msgstr "Сохранение в локальный конфигурационный файл" -#: source/libublsettingsui-gtk3.h:448 +#: source/libublsettingsui-gtk3.h:661 msgid "Saving into global configuration" msgstr "Сохранение в глобальный конфигурационный файл" -#: source/libublsettingsui-gtk3.h:449 +#: source/libublsettingsui-gtk3.h:662 msgid "Saving into global and local configuration" msgstr "Сохранение в глобальный и локальный конфигурационный файл" -#: source/libublsettingsui-gtk3.h:450 +#: source/libublsettingsui-gtk3.h:663 msgid "Saving into custom configuration at" msgstr "Сохранение в конфигурационный файл по пути" -#: source/libublsettingsui-gtk3.h:455 +#: source/libublsettingsui-gtk3.h:668 msgid "Full saving mode" msgstr "Полное сохранение" -#: source/libublsettingsui-gtk3.h:456 +#: source/libublsettingsui-gtk3.h:669 msgid "Saving into module" msgstr "Сохранение в модуль" -#: source/libublsettingsui-gtk3.h:457 +#: source/libublsettingsui-gtk3.h:670 msgid "Sandbox mode" msgstr "Полная песочница в ОЗУ" -#: source/libublsettingsui-gtk3.h:458 +#: source/libublsettingsui-gtk3.h:671 msgid "Sandbox with profile saving" msgstr "Песочница с сохранением профиля пользователя" -#: source/libublsettingsui-gtk3.h:459 +#: source/libublsettingsui-gtk3.h:672 msgid "HDD sandbox" msgstr "Полная песочница на HDD" -#: source/libublsettingsui-gtk3.h:460 +#: source/libublsettingsui-gtk3.h:673 msgid "HDD sandbox with profile saving" msgstr "Полная песочница на HDD с сохранением профиля пользователя" -#: source/libublsettingsui-gtk3.h:461 +#: source/libublsettingsui-gtk3.h:674 msgid "New configuration file creation failed" msgstr "Ошибка создания нового файла конфигурации" -#: source/libublsettingsui-gtk3.h:462 +#: source/libublsettingsui-gtk3.h:675 msgid "Grant root access" msgstr "Предоставить root-доступ" -#: source/libublsettingsui-gtk3.h:463 +#: source/libublsettingsui-gtk3.h:676 msgid "Settings" msgstr "Настройки" -#: source/libublsettingsui-gtk3.h:465 +#: source/libublsettingsui-gtk3.h:678 msgid "Settigs" msgstr "Настройки" -#: source/libublsettingsui-gtk3.h:467 +#: source/libublsettingsui-gtk3.h:680 msgid "Invalid email address" msgstr "Неверный email-адрес" -#: source/libublsettingsui-gtk3.h:468 +#: source/libublsettingsui-gtk3.h:681 msgid "Invalid path" msgstr "Неправильный путь" -#: source/libublsettingsui-gtk3.h:470 +#: source/libublsettingsui-gtk3.h:683 msgid "Choose path" msgstr "Выбор пути" -#: source/libublsettingsui-gtk3.h:471 +#: source/libublsettingsui-gtk3.h:684 msgid "Choose application" msgstr "Выбор приложений" -#: source/libublsettingsui-gtk3.h:474 +#: source/libublsettingsui-gtk3.h:687 msgid "Choose directory instead of file" msgstr "Выбрать папку вместо вайла" -#: source/libublsettingsui-gtk3.h:476 +#: source/libublsettingsui-gtk3.h:689 msgid "Enabled" msgstr "Включен" -#: source/libublsettingsui-gtk3.h:477 +#: source/libublsettingsui-gtk3.h:690 msgid "Disabled" msgstr "Выключен" -#: source/libublsettingsui-gtk3.h:478 +#: source/libublsettingsui-gtk3.h:691 msgid "Active" msgstr "Работает" -#: source/libublsettingsui-gtk3.h:479 +#: source/libublsettingsui-gtk3.h:692 msgid "Inactive" msgstr "Приостановлена" -#: source/libublsettingsui-gtk3.h:481 +#: source/libublsettingsui-gtk3.h:694 msgid "Active:" msgstr "Статус:" -#: source/libublsettingsui-gtk3.h:482 +#: source/libublsettingsui-gtk3.h:695 msgid "Enabled:" msgstr "Автозапуск:" -#: source/libublsettingsui-gtk3.h:483 +#: source/libublsettingsui-gtk3.h:696 msgid "Start" msgstr "Запустить" -#: source/libublsettingsui-gtk3.h:484 +#: source/libublsettingsui-gtk3.h:697 msgid "Stop" msgstr "Остановить" -#: source/libublsettingsui-gtk3.h:485 +#: source/libublsettingsui-gtk3.h:698 msgid "Restart" msgstr "Перезапустить" -#: source/libublsettingsui-gtk3.h:486 +#: source/libublsettingsui-gtk3.h:700 msgid "Enable autolaunch" msgstr "Включить автозапуск" -#: source/libublsettingsui-gtk3.h:487 +#: source/libublsettingsui-gtk3.h:701 msgid "Disable autolaunch" msgstr "Отключить автозапуск" -#: source/libublsettingsui-gtk3.h:489 +#: source/libublsettingsui-gtk3.h:703 #, c-format msgid "\"%s\" service configuration" msgstr "Управление службой \"%s\"" -#: source/libublsettingsui-gtk3.h:490 +#: source/libublsettingsui-gtk3.h:704 #, c-format msgid "\"%s\" service:" msgstr "Cлужба \"%s\":" -#: source/libublsettingsui-gtk3.h:491 +#: source/libublsettingsui-gtk3.h:705 msgid "service is active" msgstr "служба активна" -#: source/libublsettingsui-gtk3.h:492 +#: source/libublsettingsui-gtk3.h:706 msgid "service is inactive" msgstr "служба неактивна" -#: source/libublsettingsui-gtk3.h:492 -msgid "The changes were not saved to either the local or global configuration file.\nQuit without saving?" -msgstr "Изменения не сохранены ни в локальный, ни в глобальный конфигурационный файл.\nВыйти без сохранения?" +#: source/libublsettingsui-gtk3.h:708 +msgid "Password" +msgstr "Пароль" + +#: source/libublsettingsui-gtk3.h:710 +msgid "" +"The changes were not saved to either the local or global configuration " +"file.\n" +"Quit without saving?" +msgstr "" +"Изменения не сохранены ни в локальный, ни в глобальный конфигурационный " +"файл.\n" +"Выйти без сохранения?" -#: source/libublsettingsui-gtk3.h:492 +#: source/libublsettingsui-gtk3.h:711 msgid "Exit" msgstr "Выход" -#: source/libublsettingsui-gtk3.h:493 +#: source/libublsettingsui-gtk3.h:713 +msgid "Passwords do not match" +msgstr "Пароли не совпадают" + +#: source/libublsettingsui-gtk3.h:714 +msgid "Password contains restricted symbols" +msgstr "Пароль содержит запрещённые символы" + +#: source/libublsettingsui-gtk3.h:715 +msgid "Empty important field!" +msgstr "Пустое важное поле!" + +#: source/libublsettingsui-gtk3.h:716 +msgid "Invalid hash" +msgstr "Неправильный хэш" + +#: source/libublsettingsui-gtk3.h:717 +msgid "Default (None)" +msgstr "По умолчанию (Ничего)" + +#: source/libublsettingsui-gtk3.h:718 msgid "Access to file denied" msgstr "Отказано в доступе к файлу" +#: source/libublsettingsui-gtk3.h:719 msgid "The configuration file contains incorrect parameters." msgstr "Файл конфигурации содержит некорректные параметры" -msgid "Empty important field!" -msgstr "Пустое важное поле!" \ No newline at end of file +#: source/libublsettingsui-gtk3.h:720 +msgid "Date format:" +msgstr "Формат даты:" + +#: source/libublsettingsui-gtk3.h:721 +msgid "YYYY" +msgstr "ГГГГ" + +#: source/libublsettingsui-gtk3.h:722 +msgid "MM" +msgstr "ММ" + +#: source/libublsettingsui-gtk3.h:723 +msgid "DD" +msgstr "ДД" + +#: source/libublsettingsui-gtk3.h:724 +msgid "DD.MM.YYYY" +msgstr "ДД.ММ.ГГГГ" + +#: source/libublsettingsui-gtk3.h:725 +msgid "DD-MM-YYYY" +msgstr "ДД-ММ-ГГГГ" + +#: source/libublsettingsui-gtk3.h:726 +msgid "DD/MM/YYYY" +msgstr "ДД/ММ/ГГГГ" + +#: source/libublsettingsui-gtk3.h:727 +msgid "MM-DD-YYYY" +msgstr "ММ-ДД-ГГГГ" + +#: source/libublsettingsui-gtk3.h:728 +msgid "The password does not meet the password policy requirements" +msgstr "Пароль не соответствует требованиям политики паролей" + +#: source/libublsettingsui-gtk3.h:728 +msgid "Choose groups" +msgstr "Выбор групп" + +#: source/libublsettingsui-gtk3.h:728 +msgid "Choose group" +msgstr "Выбор группы" + +#: source/libublsettingsui-gtk3.h:728 +msgid "Choose users" +msgstr "Выбор пользователей" + +#: source/libublsettingsui-gtk3.h:728 +msgid "Choose user" +msgstr "Выбор пользователя" + +#: source/libublsettingsui-gtk3.h:728 +msgid "Chosen" +msgstr "Выбрано" + +#: source/libublsettingsui-gtk3.h:728 +msgid "ID" +msgstr "ID" + +#: source/libublsettingsui-gtk3.h:728 +msgid "Group" +msgstr "Группа" + +#: source/libublsettingsui-gtk3.h:728 +msgid "User" +msgstr "Пользователь" diff --git a/source/libublsettingsui-gtk3-password.c b/source/libublsettingsui-gtk3-password.c index 6b6ce7a..93d1f1b 100644 --- a/source/libublsettingsui-gtk3-password.c +++ b/source/libublsettingsui-gtk3-password.c @@ -1,6 +1,5 @@ #include "libublsettingsui-gtk3.h" - #define sha256_encrypt_command(target) yon_char_unite("echo -n \"",target,"\" | sha256sum | cut -f 1 -d ' '",NULL) #define sha512_encrypt_command(target) yon_char_unite("echo -n \"",target,"\" | sha512sum | cut -f 1 -d ' '",NULL) @@ -112,10 +111,15 @@ void yon_hash_entry_sensitiveness_update(GtkWidget *, yon_password_window *dialo void yon_password_hash_list_set(yon_password_window *window, config_str hashes, config_str get_hash_commands, int size){ gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(window->EncryptionCombo)); - gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(window->EncryptionCombo),_ENCRYPTION_DEFAULT_LABEL,""); + gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(window->EncryptionCombo),"",_ENCRYPTION_DEFAULT_LABEL); + if (!size){ + gtk_widget_hide(gtk_widget_get_parent(window->EncryptionCombo)); + gtk_widget_hide(window->NoEncriptionCheck); + gtk_widget_hide(window->HashBox); + } for (int i=0;iEncryptionCombo),hashes[i],get_hash_commands[i]); + gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(window->EncryptionCombo),get_hash_commands[i],hashes[i]); } } @@ -149,14 +153,26 @@ void on_password_hash_sensitiveness(GtkWidget *,yon_password_window *window){ } } +void yon_password_function_set(yon_password_window *window, double *password_func){ + window->strength_func = password_func; +} + void on_password_accept(GtkWidget *,dictionary *dict){ yon_password_window *window = yon_dictionary_get_data(dict->first,yon_password_window*); GtkWidget *target = yon_dictionary_get_data(dict->first->next,GtkWidget*); int encription_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->EncryptionCombo)); char *final = NULL; - if (encription_active == 0||gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->NoEncriptionCheck))){ + if (encription_active <1||gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->NoEncriptionCheck))){ final = yon_password_unencrypted_password_get(window); + + if (window->strength_func){ + double password_strength = ((double(*)(yon_password_window *,const char*))window->strength_func)(window,final); + if (password_strength<0.3){ + yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),_WEAK_PASSWORD_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); + return; + } + } if (!final) return; } else { final = yon_password_hash_get(window); @@ -166,6 +182,11 @@ void on_password_accept(GtkWidget *,dictionary *dict){ gtk_widget_destroy(window->Window); } +void on_password_changed(GtkWidget *, yon_password_window *window){ + const char *password_str = gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry)); + double strength = ((double(*)(yon_password_window *,const char*))window->strength_func)(window,password_str); +} + yon_password_window *yon_password_window_new(){ GtkBuilder *builder = gtk_builder_new_from_resource(ui_glade_path_password); yon_password_window *window = malloc(sizeof(yon_password_window)); @@ -177,6 +198,7 @@ yon_password_window *yon_password_window_new(){ window->EncryptionCombo = yon_gtk_builder_get_widget(builder,"EncryptionCombo"); window->NoEncriptionCheck = yon_gtk_builder_get_widget(builder,"NoEncriptionCheck"); window->PasswordHashEntry = yon_gtk_builder_get_widget(builder,"PasswordHashEntry"); + window->PasswordStrengthProgress= yon_gtk_builder_get_widget(builder,"PasswordStrengthProgress"); window->UserCancelButton = yon_gtk_builder_get_widget(builder,"UserCancelButton"); window->AcceptButton = yon_gtk_builder_get_widget(builder,"UserOkButton"); window->PasswordBox = yon_gtk_builder_get_widget(builder,"PasswordBox"); @@ -188,6 +210,7 @@ yon_password_window *yon_password_window_new(){ g_signal_connect(G_OBJECT(window->NoEncriptionCheck),"toggled",G_CALLBACK(on_password_hash_sensitiveness),window); g_signal_connect(G_OBJECT(window->PasswordHashEntry),"changed",G_CALLBACK(on_password_hash_sensitiveness),window); g_signal_connect(G_OBJECT(window->PasswordEntry),"changed",G_CALLBACK(on_password_hash_sensitiveness),window); + g_signal_connect(G_OBJECT(window->PasswordEntry),"changed",G_CALLBACK(on_password_changed),window); g_signal_connect(G_OBJECT(window->RepeatPasswordEntry),"changed",G_CALLBACK(on_password_hash_sensitiveness),window); gtk_widget_show(window->Window); return window; @@ -197,6 +220,9 @@ yon_password_window *yon_password_open(GtkEntry *target){ g_return_val_if_fail(GTK_IS_ENTRY(target),NULL); yon_password_window *dialog = yon_password_window_new(); + char *icon_name = yon_char_unite("com.ublinux.",template_app_information.app_tech_name,NULL); + yon_gtk_window_setup(GTK_WINDOW(dialog->Window),GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(target))),_PASSWORD_TITLE_LABEL,icon_name,"password_window"); + free(icon_name); g_signal_connect(G_OBJECT(dialog->NoEncriptionCheck),"toggled",G_CALLBACK(yon_hash_entry_sensitiveness_update),dialog); g_signal_connect(G_OBJECT(dialog->EncryptionCombo),"changed",G_CALLBACK(yon_hash_entry_sensitiveness_update),dialog); diff --git a/source/libublsettingsui-gtk3-save.c b/source/libublsettingsui-gtk3-save.c index f6e56d6..c4ccc36 100644 --- a/source/libublsettingsui-gtk3-save.c +++ b/source/libublsettingsui-gtk3-save.c @@ -124,7 +124,7 @@ config_str yon_loaded_config_convert_to_save_command(struct loaded_config *targe sections = malloc(sizeof(struct yon_temp_command_sections)); sections->data=parameters_for_current_command; sections->first=sections; - sections->key=yon_char_new(current->section); + sections->key=yon_config_get_section_for_key(current->key); sections->next=NULL; sections->prev=NULL; sections->status=0; diff --git a/source/libublsettingsui-gtk3-standard-callbacks.c b/source/libublsettingsui-gtk3-standard-callbacks.c index 41236ed..d0ab683 100644 --- a/source/libublsettingsui-gtk3-standard-callbacks.c +++ b/source/libublsettingsui-gtk3-standard-callbacks.c @@ -1,5 +1,7 @@ #include "libublsettingsui-gtk3.h" +void *__interface_update_function = NULL; +void *__interface_update_data = NULL; char *config_get_default_command = NULL; char *config_get_global_command = NULL; char *config_get_local_command = NULL; @@ -61,17 +63,23 @@ int __yon_load_proceed(YON_CONFIG_TYPE type){ void __on_config_local_load(GtkWidget *){ __yon_load_proceed(YON_CONFIG_LOCAL); template_config->load_mode=1; + if (__interface_update_function) + ((void (*)(void*))__interface_update_function)(__interface_update_data); } void __on_config_global_load(GtkWidget *){ __yon_load_proceed(YON_CONFIG_GLOBAL); template_config->load_mode=0; + if (__interface_update_function) + ((void (*)(void*))__interface_update_function)(__interface_update_data); } void __on_config_custom_load(GtkWidget *){ __yon_load_proceed(YON_CONFIG_CUSTOM); template_config->load_mode=3; + if (__interface_update_function) + ((void (*)(void*))__interface_update_function)(__interface_update_data); } void __on_config_global_local_save(){ @@ -90,6 +98,11 @@ void __on_config_custom_save(){ yon_save_proceed(NULL,YON_CONFIG_CUSTOM,config_get_custom_command,NULL); } +void yon_ubl_settings_set_interface_update_function(void*target_func, gpointer func_data){ + __interface_update_function = target_func; + __interface_update_data = func_data; +} + void yon_ubl_settings_window_set_standard_callbacks(template_main_window *widgets, char *get_global_command, char *get_local_command,char *get_custom_command, char *get_default_command, char *get_global_only_command, char *get_local_only_command){ if (!yon_char_is_empty(get_global_command)){ g_signal_connect(G_OBJECT(widgets->LoadGlobalMenuItem),"activate",G_CALLBACK(__on_config_global_load),NULL); diff --git a/source/libublsettingsui-gtk3-users-window.c b/source/libublsettingsui-gtk3-users-window.c index 134537c..fe80e04 100644 --- a/source/libublsettingsui-gtk3-users-window.c +++ b/source/libublsettingsui-gtk3-users-window.c @@ -73,18 +73,20 @@ yon_user_window *yon_user_window_new(enum YON_USER_WINDOW_MODE_TYPE mode){ window->list = gtk_list_store_new(3,G_TYPE_BOOLEAN,G_TYPE_STRING,G_TYPE_INT); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(window->list),2,GTK_SORT_ASCENDING); - yon_gtk_window_setup(GTK_WINDOW(window->Window),NULL,NULL,NULL,"GroupWindow"); - g_signal_connect(G_OBJECT(window->Window),"destroy",G_CALLBACK(on_user_window_closed),window); g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_users_window_accept),window); g_signal_connect(G_OBJECT(window->StatusCell),"toggled",G_CALLBACK(on_group_clicked),window); GtkTreeIter iter; + int multiple = 0; switch (mode){ case YON_USER_WINDOW_USERS_MULTIPLE: gtk_cell_renderer_toggle_set_radio(GTK_CELL_RENDERER_TOGGLE(window->StatusCell),0); + multiple = 1; [[fallthrough]]; case YON_USER_WINDOW_USERS:{ + yon_gtk_window_setup(GTK_WINDOW(window->Window),NULL,!multiple?_CHOOSE_USER_LABEL:_CHOOSE_USERS_LABEL,yon_dull_icon_path,"GroupWindow"); + gtk_tree_view_column_set_title(gtk_tree_view_get_column(GTK_TREE_VIEW(window->UsersTree),2),_USER_LABEL); int size; config_str system_param = yon_file_open("/etc/passwd",&size); for (int i=0;iStatusCell),0); + multiple = 1; [[fallthrough]]; case YON_USER_WINDOW_GROUPS:{ + yon_gtk_window_setup(GTK_WINDOW(window->Window),NULL,!multiple?_CHOOSE_GROUP_LABEL:_CHOOSE_GROUPS_LABEL, yon_dull_icon_path,"GroupWindow"); + gtk_tree_view_column_set_title(gtk_tree_view_get_column(GTK_TREE_VIEW(window->UsersTree),2),_GROUP_LABEL); int size; config_str system_param = yon_file_open("/etc/group",&size); for (int i=0;iWindow),yon_char_append("com.ublinux.",template_app_information.app_tech_name)); gtk_widget_show_all(window->Window); g_signal_connect(G_OBJECT(window->CloseButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); - g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(yon_open_browser),yon_char_new(link)); + g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(yon_open_browser),yon_char_new(_(link))); g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); - } else { - yon_open_browser(self,link); + yon_open_browser(self,_(link)); } + textdomain(template_app_information.app_locale); } /**on_link(GtkWidget *self, char* uri, gpointer user_data) @@ -390,6 +391,8 @@ template_app_info yon_ubl_get_app_info(){ } int yon_ubl_window_init(char *app_title, char *app_description, char *locale, char *css, char *tech_name, char *version, char *wiki){ + bind_textdomain_codeset (locale,"UTF-8"); + bind_textdomain_codeset (template_ui_LocaleName,"UTF-8"); template_app_information.app_title=app_title; template_app_information.css_path=css; template_app_information.app_tech_name=tech_name; @@ -545,8 +548,8 @@ GtkWidget *yon_root_button_new(config_str args, int args_size){ GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5); GtkWidget *root_label = gtk_label_new(ROOT_CHECK_LABEL); GtkWidget *root_check = gtk_check_button_new(); - gtk_box_pack_start(GTK_BOX(box),root_label,1,1,0); gtk_box_pack_start(GTK_BOX(box),root_check,0,0,0); + gtk_box_pack_start(GTK_BOX(box),root_label,1,1,0); gtk_container_add(GTK_CONTAINER(root_item),box); gtk_widget_show_all(root_item); if (getuid()==0) { @@ -580,9 +583,8 @@ void __yon_config_init(){ template_main_window *yon_ubl_window_setup(){ textdomain (template_ui_LocaleName); - setlocale(LC_ALL,""); + // setlocale(LC_ALL,""); template_main_window *widgets = setup_window(); - yon_ubl_header_setup_resource(widgets->HeadOverlay,widgets->HeadBox,widgets->HeadImage,ui_banner_path); textdomain(template_ui_LocaleName); if (yon_ubl_status_box_setup(widgets->StatusIcon,widgets->StatusBox,widgets->StatusLabel)){ if (getuid()!=0) @@ -600,6 +602,9 @@ template_main_window *yon_ubl_window_setup(){ gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), GTK_STYLE_PROVIDER(css), -1); + GtkCssProvider *css_lib=gtk_css_provider_new(); + gtk_css_provider_load_from_resource(css_lib,"/com/ublinux/css/libublsettingsui-gtk3.css"); + gtk_style_context_add_provider(gtk_widget_get_style_context(widgets->HeadBox),GTK_STYLE_PROVIDER(css_lib),GTK_STYLE_PROVIDER_PRIORITY_USER); return widgets; } diff --git a/source/libublsettingsui-gtk3.h b/source/libublsettingsui-gtk3.h index c40ebec..ee9c0ba 100644 --- a/source/libublsettingsui-gtk3.h +++ b/source/libublsettingsui-gtk3.h @@ -4,7 +4,9 @@ #include #include #include +#ifdef VTE_INCLUDE #include +#endif #include #include #include @@ -282,7 +284,11 @@ void yon_file_chooser_remove_accept_function(filechooser_window *window); dialog_confirmation_data *yon_confirmation_dialog_data_new(); -int yon_confirmation_dialog_call(GtkWidget *self,dialog_confirmation_data *data); +/// @brief Call a confirmation dialog with specific data +/// @param parent_window parent window or any widget contained by parent window. The argument can be NULL. +/// @param data Data structure with label strings and accept function; +/// @return GTK_RESPONCE_ACCEPT, or 0 if canceled +int yon_confirmation_dialog_call(GtkWidget *parent_window,dialog_confirmation_data *data); /**yon_open_browser(GtkWidget *self, char *link) * [EN] @@ -361,6 +367,11 @@ template_app_info yon_ubl_get_app_info(); void yon_ubl_settings_window_set_standard_callbacks(template_main_window *widgets, char *get_global_command, char *get_local_command,char *get_custom_command, char *get_default_command, char *get_global_only_command, char *get_local_only_command); +/// @brief Set an interface update function for common loading callbacks +/// @param target_func function to connect +/// @param func_data data for passing into function +void yon_ubl_settings_set_interface_update_function(void*target_func, gpointer func_data); + void yon_window_remove_exit_config_check(template_main_window *widgets); void yon_window_set_exit_config_check(template_main_window *widgets, GCallback data_callback_function); @@ -556,7 +567,11 @@ typedef struct { GtkWidget *PasswordBox; GtkWidget *HashBox; + GtkWidget *PasswordStrengthProgress; + + void *strength_func; const char *old_password; + } yon_password_window; @@ -570,6 +585,7 @@ GtkWidget *yon_config_save_window_new(); void yon_password_hash_list_set(yon_password_window *window, config_str hashes, config_str get_hash_commands, int size); yon_password_window *yon_password_open(GtkEntry *target); +void yon_password_function_set(yon_password_window *window, double *password_func); typedef struct { GtkWidget *Window; @@ -581,124 +597,124 @@ typedef struct { /// @return A newly allocated empty window; yon_window *yon_window_new(); - #define VERSION_LABEL yon_char_unite(_("Version:")," ",!yon_char_is_empty(template_app_information.app_version)?template_app_information.app_version:"","\n",NULL) - #define HELP_LABEL(rest) yon_char_unite(template_app_information.app_tech_name,_(" version:")," ", !yon_char_is_empty(template_app_information.app_version)?template_app_information.app_version:"","\n",\ - template_app_information.app_title,"\n",_("Usage:"), " ",template_app_information.app_tech_name," ",_("[OPTIONS]"),"\n",\ - _("Options:"),"\n",\ - " --help, -h ",_("Show this help"),"\n",\ - " --version, -V ",_("Show package version"),"\n",\ - " --lock-help ",_("Lock this help menu"),"\n",\ - " --lock-save ",_("Lock configuration saving"),"\n",\ - " --lock-save-local ",_("Lock local configration saving"),"\n",\ - " --lock-save-global ",_("Lock global configration saving"),"\n",\ - " --lock-load-global ",_("Lock global configration loading"),"\n",\ - " --clear-config, -c ",_("Reset application settings"),"\n",\ + #define VERSION_LABEL yon_char_unite(yon_char_get_localised_from_lib("Version:")," ",!yon_char_is_empty(template_app_information.app_version)?template_app_information.app_version:"","\n",NULL) + #define HELP_LABEL(rest) yon_char_unite(template_app_information.app_tech_name,yon_char_get_localised_from_lib(" version:")," ", !yon_char_is_empty(template_app_information.app_version)?template_app_information.app_version:"","\n",\ + template_app_information.app_title,"\n",yon_char_get_localised_from_lib("Usage:"), " ",template_app_information.app_tech_name," ",yon_char_get_localised_from_lib("[OPTIONS]"),"\n",\ + yon_char_get_localised_from_lib("Options:"),"\n",\ + " --help, -h ",yon_char_get_localised_from_lib("Show this help"),"\n",\ + " --version, -V ",yon_char_get_localised_from_lib("Show package version"),"\n",\ + " --lock-help ",yon_char_get_localised_from_lib("Lock this help menu"),"\n",\ + " --lock-save ",yon_char_get_localised_from_lib("Lock configuration saving"),"\n",\ + " --lock-save-local ",yon_char_get_localised_from_lib("Lock local configration saving"),"\n",\ + " --lock-save-global ",yon_char_get_localised_from_lib("Lock global configration saving"),"\n",\ + " --lock-load-global ",yon_char_get_localised_from_lib("Lock global configration loading"),"\n",\ + " --clear-config, -c ",yon_char_get_localised_from_lib("Reset application settings"),"\n",\ !yon_char_is_empty(rest)?rest:NULL,NULL) #define template_ui_LocalePath "/usr/share/locale" #define template_ui_LocaleName "libublsettingsui-gtk3" - #define about_label(target) yon_char_unite(yon_char_get_localised_from_lib(_("About"))," ",target,NULL) + #define about_label(target) yon_char_unite(yon_char_get_localised_from_lib(yon_char_get_localised_from_lib("About"))," ",target,NULL) - #define SUCCESS_LABEL _("Operation succeeded") - #define FAIL_LABEL _("Operation failed") - #define ROOT_WARNING_LABEL _("Warning! Application was launched without root - root-dependent actions are locked") + #define SUCCESS_LABEL yon_char_get_localised_from_lib("Operation succeeded") + #define FAIL_LABEL yon_char_get_localised_from_lib("Operation failed") + #define ROOT_WARNING_LABEL yon_char_get_localised_from_lib("Warning! Application was launched without root - root-dependent actions are locked") - #define DEFAULT_LABEL _("Default") - #define DEFAULT_CUSTOM_LABEL(target) yon_char_unite(_("Default"),!yon_char_is_empty(target)?" (":NULL,target,")",NULL) - #define ABOUT_LABEL _("About") - #define DOCUMENTATION_LABEL _("Documentation") + #define DEFAULT_LABEL yon_char_get_localised_from_lib("Default") + #define DEFAULT_CUSTOM_LABEL(target) yon_char_unite(yon_char_get_localised_from_lib("Default"),!yon_char_is_empty(target)?" (":NULL,target,")",NULL) + #define ABOUT_LABEL yon_char_get_localised_from_lib("About") + #define DOCUMENTATION_LABEL yon_char_get_localised_from_lib("Documentation") - #define SAVE_CUSTOM_LABEL _("Save to specific file") - #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 SAVE_PROCESS_LABEL _("Saving...") + #define SAVE_CUSTOM_LABEL yon_char_get_localised_from_lib("Save to specific file") + #define SAVE_LOCAL_LABEL yon_char_get_localised_from_lib("Save to local configuration") + #define SAVE_GLOBAL_LABEL yon_char_get_localised_from_lib("Save to global configuration") + #define SAVE_CONFIGURATION_LABEL yon_char_get_localised_from_lib("Save configuration") + #define SAVE_LABEL yon_char_get_localised_from_lib("Save") + #define SAVE_PROCESS_LABEL yon_char_get_localised_from_lib("Saving...") - #define LOAD_CUSTOM_LABEL _("Load from specific file") - #define LOAD_LOCAL_LABEL _("Load local configuration") - #define LOAD_GLOBAL_LABEL _("Load global configuration") - #define LOAD_LABEL _("Load") - #define LOAD_CONFIG_LABEL _("Load file") + #define LOAD_CUSTOM_LABEL yon_char_get_localised_from_lib("Load from specific file") + #define LOAD_LOCAL_LABEL yon_char_get_localised_from_lib("Load local configuration") + #define LOAD_GLOBAL_LABEL yon_char_get_localised_from_lib("Load global configuration") + #define LOAD_LABEL yon_char_get_localised_from_lib("Load") + #define LOAD_CONFIG_LABEL yon_char_get_localised_from_lib("Load file") - #define CANCEL_LABEL _("Cancel") + #define CANCEL_LABEL yon_char_get_localised_from_lib("Cancel") #define ACCEPT_LABEL yon_char_get_localised_from_lib("Ok") - #define OPEN_LABEL _("Open") - #define CREATE_FOLDER_LABEL _("Create directory") - #define SELECT_FOLDER_LABEL _("Select directory") - - #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 AUTHORS_LABEL _(L"Copyright © 2022 - 2025, UBSoft LLC") - - - #define GLOBAL_LOAD_SUCCESS_LABEL _("Global configuration loading succeeded.") - #define LOCAL_LOAD_SUCCESS_LABEL _("Local configuration loading succeeded.") - #define LOAD_FAILED_LABEL _("Config loading failed") - - #define GLOBAL_LOCAL_SAVE_SUCCESS_LABEL _("Local and global configuration saving succeeded.") - #define GLOBAL_SAVE_SUCCESS_LABEL _("Global configuration saving succeeded.") - #define LOCAL_SAVE_SUCCESS_LABEL _("Local configuration saving succeeded.") - #define SAVE_SUCCESS_LABEL _("Configuration saving succeeded.") - - #define PARAMETER_LABEL _("Parameter") - #define OLD_VALUE_LABEL _("Old value") - #define NEW_VALUE_LABEL _("New value") - #define COMPARE_VALUE_LABEL _("Value\n(Old/New)") - - #define NOTHING_TO_SAVE_LABEL _("Nothing to save") - #define SAVING_LOCAL_STATE_LABEL _("Saving into local configuration") - #define SAVING_GLOBAL_STATE_LABEL _("Saving into global configuration") - #define SAVING_GLOBAL_LOCAL_STATE_LABEL _("Saving into global and local configuration") - #define SAVING_CUSTOM_STATE_LABEL(target_path) yon_char_unite(_("Saving into custom configuration at")," ",target_path,NULL) + #define OPEN_LABEL yon_char_get_localised_from_lib("Open") + #define CREATE_FOLDER_LABEL yon_char_get_localised_from_lib("Create directory") + #define SELECT_FOLDER_LABEL yon_char_get_localised_from_lib("Select directory") + + #define HELP_TITLE_LABEL yon_char_get_localised_from_lib("Would you like to read documentation in the Web?") + #define HELP_INFO_LABEL yon_char_get_localised_from_lib("You will be redirected to documentation website where documentation is\ntranslated and supported by community.") + #define HELP_ALWAYS_OPEN_LABEL yon_char_get_localised_from_lib("Always redirect to online documentation") + #define OPEN_HELP_LABEL yon_char_get_localised_from_lib("Open documentation") + #define PROJECT_HOME_LABEL yon_char_get_localised_from_lib("Project Home Page") + #define NOTHING_CHOSEN_LABEL yon_char_get_localised_from_lib("Nothing were chosen") + #define AUTHORS_LABEL yon_char_get_localised_from_lib(L"Copyright © 2022 - 2025, UBSoft LLC") + + + #define GLOBAL_LOAD_SUCCESS_LABEL yon_char_get_localised_from_lib("Global configuration loading succeeded.") + #define LOCAL_LOAD_SUCCESS_LABEL yon_char_get_localised_from_lib("Local configuration loading succeeded.") + #define LOAD_FAILED_LABEL yon_char_get_localised_from_lib("Config loading failed") + + #define GLOBAL_LOCAL_SAVE_SUCCESS_LABEL yon_char_get_localised_from_lib("Local and global configuration saving succeeded.") + #define GLOBAL_SAVE_SUCCESS_LABEL yon_char_get_localised_from_lib("Global configuration saving succeeded.") + #define LOCAL_SAVE_SUCCESS_LABEL yon_char_get_localised_from_lib("Local configuration saving succeeded.") + #define SAVE_SUCCESS_LABEL yon_char_get_localised_from_lib("Configuration saving succeeded.") + + #define PARAMETER_LABEL yon_char_get_localised_from_lib("Parameter") + #define OLD_VALUE_LABEL yon_char_get_localised_from_lib("Old value") + #define NEW_VALUE_LABEL yon_char_get_localised_from_lib("New value") + #define COMPARE_VALUE_LABEL yon_char_get_localised_from_lib("Value\n(Old/New)") + + #define NOTHING_TO_SAVE_LABEL yon_char_get_localised_from_lib("Nothing to save") + #define SAVING_LOCAL_STATE_LABEL yon_char_get_localised_from_lib("Saving into local configuration") + #define SAVING_GLOBAL_STATE_LABEL yon_char_get_localised_from_lib("Saving into global configuration") + #define SAVING_GLOBAL_LOCAL_STATE_LABEL yon_char_get_localised_from_lib("Saving into global and local configuration") + #define SAVING_CUSTOM_STATE_LABEL(target_path) yon_char_unite(yon_char_get_localised_from_lib("Saving into custom configuration at")," ",target_path,NULL) #define SYSTEMBOOT_STATEMODE "SYSTEMBOOT_STATEMODE" #define SYSTEMBOOT_STATEMODE_SECTION "[system]" - #define SAVE_MODE_FULL_LABEL _("Full saving mode") - #define SAVE_MODE_MODULE_LABEL _("Saving into module") - #define SAVE_MODE_SANDBOX_LABEL _("Sandbox mode") - #define SAVE_MODE_RAM_HOME_LABEL _("Sandbox with profile saving") - #define SAVE_MODE_HDD_LABEL _("HDD sandbox") - #define SAVE_MODE_HDD_HOME_LABEL _("HDD sandbox with profile saving") - #define CUSTOM_CONFIG_CREATION_ERROR_LABEL _("New configuration file creation failed") - #define ROOT_CHECK_LABEL _("Grant root access") + #define SAVE_MODE_FULL_LABEL yon_char_get_localised_from_lib("Full saving mode") + #define SAVE_MODE_MODULE_LABEL yon_char_get_localised_from_lib("Saving into module") + #define SAVE_MODE_SANDBOX_LABEL yon_char_get_localised_from_lib("Sandbox mode") + #define SAVE_MODE_RAM_HOME_LABEL yon_char_get_localised_from_lib("Sandbox with profile saving") + #define SAVE_MODE_HDD_LABEL yon_char_get_localised_from_lib("HDD sandbox") + #define SAVE_MODE_HDD_HOME_LABEL yon_char_get_localised_from_lib("HDD sandbox with profile saving") + #define CUSTOM_CONFIG_CREATION_ERROR_LABEL yon_char_get_localised_from_lib("New configuration file creation failed") + #define ROOT_CHECK_LABEL yon_char_get_localised_from_lib("Grant root access") #define SETTINGS_TITLE_LABEL yon_char_get_localised_from_lib("Settings") - #define CONFIG_WINDOW_MENU_LABEL _("Settigs") + #define CONFIG_WINDOW_MENU_LABEL yon_char_get_localised_from_lib("Settigs") - #define EMAIL_INVALID_LABEL _("Invalid email address") - #define PATH_INVALID_LABEL _("Invalid path") + #define EMAIL_INVALID_LABEL yon_char_get_localised_from_lib("Invalid email address") + #define PATH_INVALID_LABEL yon_char_get_localised_from_lib("Invalid path") - #define CHOOSE_FILE_LABEL _("Choose path") - #define CHOOSE_APP_LABEL _("Choose application") + #define CHOOSE_FILE_LABEL yon_char_get_localised_from_lib("Choose path") + #define CHOOSE_APP_LABEL yon_char_get_localised_from_lib("Choose application") - #define FILE_CHOOSER_CHOOSE_FILDER_LABEL _("Choose directory instead of file") + #define FILE_CHOOSER_CHOOSE_FILDER_LABEL yon_char_get_localised_from_lib("Choose directory instead of file") - #define _SERVICE_ENABLE_LABEL _("Enabled") - #define _SERVICE_DISABLE_LABEL _("Disabled") - #define _SERVICE_ACTIVE_LABEL _("Active") - #define _SERVICE_INACTIVE_LABEL _("Inactive") + #define _SERVICE_ENABLE_LABEL yon_char_get_localised_from_lib("Enabled") + #define _SERVICE_DISABLE_LABEL yon_char_get_localised_from_lib("Disabled") + #define _SERVICE_ACTIVE_LABEL yon_char_get_localised_from_lib("Active") + #define _SERVICE_INACTIVE_LABEL yon_char_get_localised_from_lib("Inactive") - #define _SERVICE_ACTIVE_TEXT_LABEL _("Active:") - #define _SERVICE_ENABLED_TEXT_LABEL _("Enabled:") - #define _SERVICE_START_BUTTON_LABEL _("Start") - #define _SERVICE_STOP_BUTTON_LABEL _("Stop") - #define _SERVICE_RESTART_BUTTON_LABEL _("Restart") + #define _SERVICE_ACTIVE_TEXT_LABEL yon_char_get_localised_from_lib("Active:") + #define _SERVICE_ENABLED_TEXT_LABEL yon_char_get_localised_from_lib("Enabled:") + #define _SERVICE_START_BUTTON_LABEL yon_char_get_localised_from_lib("Start") + #define _SERVICE_STOP_BUTTON_LABEL yon_char_get_localised_from_lib("Stop") + #define _SERVICE_RESTART_BUTTON_LABEL yon_char_get_localised_from_lib("Restart") - #define _SERVICE_ENABLE_BUTTON_LABEL _("Enable autolaunch") - #define _SERVICE_DISABLE_BUTTON_LABEL _("Disable autolaunch") + #define _SERVICE_ENABLE_BUTTON_LABEL yon_char_get_localised_from_lib("Enable autolaunch") + #define _SERVICE_DISABLE_BUTTON_LABEL yon_char_get_localised_from_lib("Disable autolaunch") - #define _SERVICE_HEAD_LABEL(target) g_strdup_printf(yon_char_get_localised_from_lib(_("\"%s\" service configuration")), target) - #define _SERVICE_TITLE_LABEL(target) g_strdup_printf(yon_char_get_localised_from_lib(_("\"%s\" service:")), target) - #define _SERVICE_ACTIVE_STATUS_LABEL(target) yon_char_unite("\"",target,"\" ", yon_char_get_localised_from_lib(_("service is active")),NULL) - #define _SERVICE_INACTIVE_STATUS_LABEL(target) yon_char_unite("\"",target,"\" ",yon_char_get_localised_from_lib(_("service is inactive")),NULL) + #define _SERVICE_HEAD_LABEL(target) g_strdup_printf(yon_char_get_localised_from_lib(yon_char_get_localised_from_lib("\"%s\" service configuration")), target) + #define _SERVICE_TITLE_LABEL(target) g_strdup_printf(yon_char_get_localised_from_lib(yon_char_get_localised_from_lib("\"%s\" service:")), target) + #define _SERVICE_ACTIVE_STATUS_LABEL(target) yon_char_unite("\"",target,"\" ", yon_char_get_localised_from_lib(yon_char_get_localised_from_lib("service is active")),NULL) + #define _SERVICE_INACTIVE_STATUS_LABEL(target) yon_char_unite("\"",target,"\" ",yon_char_get_localised_from_lib(yon_char_get_localised_from_lib("service is inactive")),NULL) #define _PASSWORD_TITLE_LABEL yon_char_get_localised_from_lib("Password") @@ -712,12 +728,30 @@ yon_window *yon_window_new(); #define _ENCRYPTION_DEFAULT_LABEL yon_char_get_localised_from_lib("Default (None)") #define ACCESS_DENIED_LABEL(target) yon_char_unite(yon_char_get_localised_from_lib("Access to file denied"),": ", target,NULL) #define CONFIG_INVALID_LABEL yon_char_get_localised_from_lib("The configuration file contains incorrect parameters.") - #define DATE_FORMAT_SETTINGS_LABEL _("Date format:") - #define YEAR_FORMAT_LABEL _("YYYY") - #define MONTH_FORMAT_LABEL _("MM") - #define DAY_FORMAT_LABEL _("DD") - #define DMY_FORMAT_LABEL _("DD.MM.YYYY") - #define DMY_MINUS_FORMAT_LABEL _("DD-MM-YYYY") - #define DMY_SLASH_FORMAT_LABEL _("DD/MM/YYYY") - #define MDY_FORMAT_LABEL _("MM-DD-YYYY") + #define DATE_FORMAT_SETTINGS_LABEL yon_char_get_localised_from_lib("Date format:") + #define YEAR_FORMAT_LABEL yon_char_get_localised_from_lib("YYYY") + #define MONTH_FORMAT_LABEL yon_char_get_localised_from_lib("MM") + #define DAY_FORMAT_LABEL yon_char_get_localised_from_lib("DD") + #define DMY_FORMAT_LABEL yon_char_get_localised_from_lib("DD.MM.YYYY") + #define DMY_MINUS_FORMAT_LABEL yon_char_get_localised_from_lib("DD-MM-YYYY") + #define DMY_SLASH_FORMAT_LABEL yon_char_get_localised_from_lib("DD/MM/YYYY") + #define MDY_FORMAT_LABEL yon_char_get_localised_from_lib("MM-DD-YYYY") + #define _WEAK_PASSWORD_LABEL yon_char_get_localised_from_lib("The password does not meet the password policy requirements") + #define _WARNING_LABEL yon_char_get_localised_from_lib("Warning") + #define _CREATE_CONFIG_DIALOG_LABEL yon_char_get_localised_from_lib("Configuration file does not exist. Create new configuration file?") + #define _CREATE_CONFIG_DIALOG_HOMEDIR_LABEL yon_char_get_localised_from_lib("Configuration file does not exist. Create new configuration file? New configuration file will be created at your user's home directory") + + #define _CHOOSEN_LABEL yon_char_get_localised_from_lib("Chosen") + #define _ID_LABEL yon_char_get_localised_from_lib("ID") + #define _GROUP_LABEL yon_char_get_localised_from_lib("Group") + #define _USER_LABEL yon_char_get_localised_from_lib("User") + + #define _CHOOSE_GROUPS_LABEL yon_char_get_localised_from_lib("Choose groups") + #define _CHOOSE_GROUP_LABEL yon_char_get_localised_from_lib("Choose group") + + #define _CHOOSE_USERS_LABEL yon_char_get_localised_from_lib("Choose users") + #define _CHOOSE_USER_LABEL yon_char_get_localised_from_lib("Choose user") + + + #endif \ No newline at end of file