diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ed27715
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+.vscode/
+ubl-settings-TEMPLATE
+*~
+build/
+compile/
+*#
+terminal-commands/
+source/ubl-cmake.h
+vgcore*
\ No newline at end of file
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8ec4457
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,168 @@
+#!/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
+#CMAKE_SOURCE_DIR = ./source
+#CMAKE_BUILD_DIR = ./compile
+DEPENDS = /bin/cmake
+PREFIX ?= /usr
+PKGNAME = $(MAKEFILE_DIR)
+#PKGNAME = ubl-settings-manager
+LATEST_TAG=
+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 --tags | sed 's/^v//'|grep -oE "^[0-9]{1,}.[0-9]{1,}"); \
+ else \
+ LATEST_TAG="0.0"; \
+ fi; \
+ sed -r "s/^(string version_application).*/\1=\"$${LATEST_TAG}\";/" -i source/${PKGNAME}.h; \
+ 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; \
+ echo "Check depends: OK"
+# $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
+
+debug: init build
+ @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 "${CMAKE_BUILD_DIR}/${PKGNAME}"; \
+ cp ${CMAKE_BUILD_DIR}/${PKGNAME} ./; \
+ 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 --directory=${CMAKE_BUILD_DIR}; \
+ 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}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
+ $(RM) "$${PATH_FILE_MO}"; \
+ done
+ @for SIZE in 16x16 32x32 48x48 scalable; do \
+ $(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \
+ $(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/apps/com.ublinux.${PKGNAME}.png"; \
+ done
+ @for FILE_SVG in $(wildcard *.svg); do \
+ for SIZE in 16x16 32x32 48x48 scalable; do \
+ $(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/status/$${FILE_SVG%.*}".{svg,png,jpg}; \
+ done; \
+ done
+ @$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}"
+ @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop"
+ @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg"
+ @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.checked.svg"
+ @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.warning.svg"
+ @$(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}.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 ..."
+#################################################### УДАЛИТЬ ПЕРЕД КОММИТОМ ################################################################################
+ @gcc source/ubl-cmake.h compile/resources.c compile/ubl-cmake.h source/controler.h source/controler.c source/model/philos_utils.h source/model/philos_utils.c source/model/my_device.h source/model/save.h source/model/save.c source/model/my_device.c source/model/model.h source/model/load.h source/model/load.c source/model/model.c source/ubl-settings-diskquota.c source/ubl-settings-diskquota.h source/ubl-strings.h source/model/ubl-utils.c source/model/ubl-utils.h -o ubl-settings-diskquota `pkg-config --cflags --libs gtk+-3.0 vte-2.91 webkit2gtk-4.0 webkit2gtk-web-extension-4.0` -g
+#################################################### УДАЛИТЬ ПЕРЕД КОММИТОМ ################################################################################
+ @for FILE_PO in $(wildcard *.po); do \
+ LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
+ install -dm755 "${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES"; \
+ FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
+ PATH_FILE_MO="${DESTDIR}${PREFIX}/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 -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps"
+ @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg"
+ @install -dm755 "${DESTDIR}${PREFIX}/share/polkit-1/actions"
+ @install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.policy"
+ @install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}"
+ @install -dm755 "${DESTDIR}/etc/xdg"
+ @install -dm755 "${DESTDIR}${PREFIX}/share/applications"
+ @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}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.funnel.svg"
+ @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"
+ @sed -r "s/^(string version_application=\"*\").*/string version_application;/" -i source/${PKGNAME}.h; \
+
+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
+
+up_ver:
+ @CURRENT=$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2); \
+ MAJOR=$$(cut -d. -f1 <<< $${CURRENT}); \
+ MINOR=$$(cut -d. -f2 <<< $${CURRENT}); \
+ VER="$${MAJOR}.$$(($${MINOR}+1))"; \
+ sed "s/VERSION *[[:digit:]]*.*/VERSION $${VER}/" -i ${FILE_VERSION}; \
+ echo "Updated version to VERSION.md: $${CURRENT} to $${VER}"
+
+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"; \
+ echo "... up_ver"
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..85aef32
--- /dev/null
+++ b/README.md
@@ -0,0 +1,29 @@
+# ubl-settings-diskquota
+# Выполнить
+# Build
+In order to build ubl-settings-diskquota 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
+```
+
+
+
diff --git a/com.ublinux.ubl-settings-diskquota.checked.svg b/com.ublinux.ubl-settings-diskquota.checked.svg
new file mode 100644
index 0000000..e3cab42
--- /dev/null
+++ b/com.ublinux.ubl-settings-diskquota.checked.svg
@@ -0,0 +1,327 @@
+
+
diff --git a/com.ublinux.ubl-settings-diskquota.funnel.svg b/com.ublinux.ubl-settings-diskquota.funnel.svg
new file mode 100644
index 0000000..4aec04a
--- /dev/null
+++ b/com.ublinux.ubl-settings-diskquota.funnel.svg
@@ -0,0 +1,45 @@
+
+
+
+
diff --git a/com.ublinux.ubl-settings-diskquota.policy b/com.ublinux.ubl-settings-diskquota.policy
new file mode 100644
index 0000000..de22da1
--- /dev/null
+++ b/com.ublinux.ubl-settings-diskquota.policy
@@ -0,0 +1,24 @@
+
+
+
+
+ UBLinux
+ https://ublinux.ru
+
+
+ Run ubl-settings-diskquota as root
+ Запуск утилиты ubl-settings-diskquota с правами root
+ Authentication is required to run ubl-settings-diskquota
+ Требуется авторизация для запуска утилиты ubl-settings-diskquota с правами root
+
+ auth_admin
+ auth_admin
+ auth_admin
+
+ /usr/bin/ubl-settings-diskquota
+ true
+
+
+
diff --git a/com.ublinux.ubl-settings-diskquota.svg b/com.ublinux.ubl-settings-diskquota.svg
new file mode 100644
index 0000000..708bd05
--- /dev/null
+++ b/com.ublinux.ubl-settings-diskquota.svg
@@ -0,0 +1,5903 @@
+
+
diff --git a/com.ublinux.ubl-settings-diskquota.warning.svg b/com.ublinux.ubl-settings-diskquota.warning.svg
new file mode 100644
index 0000000..9a90dba
--- /dev/null
+++ b/com.ublinux.ubl-settings-diskquota.warning.svg
@@ -0,0 +1,55 @@
+
+
diff --git a/gresource.xml b/gresource.xml
new file mode 100644
index 0000000..c640934
--- /dev/null
+++ b/gresource.xml
@@ -0,0 +1,12 @@
+
+
+
+ ubl-settings-diskquota.glade
+
+
+ ubl-settings-diskquota.css
+
+
+ ubl-settings-diskquota-banner.png
+
+
\ No newline at end of file
diff --git a/screenshot/screenshot.png b/screenshot/screenshot.png
new file mode 100644
index 0000000..51bf4ab
Binary files /dev/null and b/screenshot/screenshot.png differ
diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
new file mode 100644
index 0000000..29c40d8
--- /dev/null
+++ b/source/CMakeLists.txt
@@ -0,0 +1,108 @@
+cmake_minimum_required(VERSION 3.7)
+project(ubl-settings-diskquota)
+
+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-diskquota.glade)
+
+set(DEPENDFILES
+ ../ubl-settings-diskquota.glade
+ ../gresource.xml
+ ../ubl-settings-diskquota-banner.png
+ ../ubl-settings-diskquota.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
+ controler.h
+ controler.c
+ ubl-strings.h
+ model/ubl-utils.h
+ model/ubl-utils.c
+ model/model.h
+ model/model.c
+ model/load.h
+ model/load.c
+ model/my_device.h
+ model/my_device.c
+ model/philos_utils.h
+ model/philos_utils.c
+ model/save.h
+ model/save.c
+ ubl-settings-diskquota.c
+ ubl-settings-diskquota.h
+ ${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)
\ No newline at end of file
diff --git a/source/controler.c b/source/controler.c
new file mode 100644
index 0000000..0e10d91
--- /dev/null
+++ b/source/controler.c
@@ -0,0 +1,174 @@
+#include "controler.h"
+
+void fill_tree_view_u_g_p(custom_window* _config_gui, config_u_g_p* _config, int start, int flag_gui_add) {
+ GtkTreeModel *model = GTK_TREE_MODEL(_config_gui->list);
+ if (flag_gui_add == 0) {
+ g_object_ref(_config_gui->list);
+ gtk_list_store_clear(_config_gui->list);
+ }
+ for (int index = start; index < _config->size; index++) {
+ GtkTreeIter iter;
+ gtk_list_store_append(_config_gui->list,&iter);
+ if (strcmp(_config->type_arr[index], "project") != 0) {
+ gtk_list_store_set(_config_gui->list,&iter,
+ 0,_config->name[index],
+ 1,_config->quota[index],
+ 2,_config->files[index],
+ 3,philos_format_cfg_str_size_memory("", _config->soft_restriction_size[index],_config->soft_restriction_size_pow[index]),
+ 4,philos_format_cfg_str_size_memory("", _config->soft_restriction_file[index],_config->soft_restriction_file_pow[index]),
+ 5,philos_format_cfg_str_size_memory("", _config->severe_limitation_size[index],_config->severe_limitation_size_pow[index]),
+ 6,philos_format_cfg_str_size_memory("", _config->severe_limitation_file[index], _config->severe_limitation_file_pow[index]),
+ 7,philos_format_cfg_str_size_memory("", _config->deferring_size[index], _config->deferring_size_pow[index]),
+ 8,philos_format_cfg_str_size_memory("", _config->deferring_file[index], _config->deferring_file_pow[index]),
+ -1);
+ }
+ else {
+ gtk_list_store_set(_config_gui->list,&iter,
+ 0,_config->id[index],
+ 1,_config->name[index],
+ 2,_config->quota[index],
+ 3,_config->files[index],
+ 4,philos_format_cfg_str_size_memory("", _config->soft_restriction_size[index],_config->soft_restriction_size_pow[index]),
+ 5,philos_format_cfg_str_size_memory("", _config->soft_restriction_file[index],_config->soft_restriction_file_pow[index]),
+ 6,philos_format_cfg_str_size_memory("", _config->severe_limitation_size[index],_config->severe_limitation_size_pow[index]),
+ 7,philos_format_cfg_str_size_memory("", _config->severe_limitation_file[index], _config->severe_limitation_file_pow[index]),
+ 8,philos_format_cfg_str_size_memory("", _config->deferring_size[index], _config->deferring_size_pow[index]),
+ 9,philos_format_cfg_str_size_memory("", _config->deferring_file[index], _config->deferring_file_pow[index]),
+ -1);
+ }
+ }
+ if (flag_gui_add != 0) {
+ gtk_tree_view_set_model(GTK_TREE_VIEW(_config_gui->treeViewMain), model);
+ }
+}
+void fill_tree_view_u_g(custom_window* _config_gui, config_u_g_p* _config, int start,int flag_gui_add) {
+ GtkTreeModel *model = GTK_TREE_MODEL(_config_gui->list);
+ if (flag_gui_add == 0) {
+ g_object_ref(_config_gui->list);
+ gtk_list_store_clear(_config_gui->list);
+ }
+ for (int index = start; index < _config->size; index++) {
+ GtkTreeIter iter;
+ gtk_list_store_append(_config_gui->list,&iter);
+ if (strcmp(_config->type_arr[index], "project") != 0) { // Баг
+ gtk_list_store_set(_config_gui->list,&iter, -1);
+ }
+ }
+ if (flag_gui_add != 0) {
+ gtk_tree_view_set_model(GTK_TREE_VIEW(_config_gui->treeViewMain), model);
+ }
+}
+
+
+void load_system_cfg() {
+ cfg_u_g_p->flag_load = 0;
+ load_template_load_cfg(cfg_u_g_p, CMD_LOAD_SYSTEM);
+ yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL, BACKGROUND_IMAGE_SUCCESS_TYPE);
+}
+
+void load_global_cfg() {
+ cfg_u_g_p->flag_load = 1;
+ load_template_load_cfg(cfg_u_g_p, CMD_LOAD_GLOBAL);
+ yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
+}
+
+void control_event(main_window* _config_main_gui, custom_window* _config_custom_gui) {
+ g_signal_connect(G_OBJECT(_config_main_gui->LoadLocalMenuItem), "activate", G_CALLBACK(load_system_cfg), NULL);
+}
+
+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;iHeadOverlay,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);
+ 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();
+}
\ No newline at end of file
diff --git a/source/controler.h b/source/controler.h
new file mode 100644
index 0000000..ac9f3a8
--- /dev/null
+++ b/source/controler.h
@@ -0,0 +1,8 @@
+#include "ubl-settings-diskquota.h"
+
+
+
+int main(int argc, char *argv[]);
+void load_global_cfg();
+void load_system_cfg();
+void control_event(main_window* _config_main_gui, custom_window* _config_custom_gui);
\ No newline at end of file
diff --git a/source/model/philos_utils.c b/source/model/philos_utils.c
new file mode 100644
index 0000000..3e19790
--- /dev/null
+++ b/source/model/philos_utils.c
@@ -0,0 +1,1169 @@
+#include "philos_utils.h"
+
+void philos_array_string_remove_char(char*** array, char* str_remove, int size) {
+ for (int index = 0; index < size; index++) {
+ (*array)[index] = yon_char_divide_search((*array)[index], str_remove, -1);
+ }
+
+}
+
+void philos_set_pow_size_memory(char* str_find, int** array_size,int index, char** array_size_pow) {
+ char* STR_KB = array_size_pow[0];
+ char* STR_MB = array_size_pow[1];
+ char* STR_GB = array_size_pow[2];
+ char* STR_TB = array_size_pow[3];
+ size_t length = strlen(str_find);
+ if (strstr(str_find,"K") != NULL) {
+ *array_size = philos_int_append(*array_size, &index, 0);
+ str_find = yon_char_divide(str_find, length-1);
+ str_find = yon_char_unite(str_find, " ", STR_KB, NULL);
+ index--;
+ }
+ else if (strstr(str_find,"M") != NULL) {
+ *array_size = philos_int_append(*array_size, &index, 1);
+ str_find = yon_char_divide(str_find, length-1);
+ str_find = yon_char_unite(str_find," ", STR_MB, NULL);
+ index--;
+ }
+ else if (strstr(str_find,"G") != NULL) {
+ *array_size = philos_int_append(*array_size, &index, 2);
+ str_find = yon_char_divide(str_find, length-1);
+ str_find = yon_char_unite(str_find," ", STR_GB, NULL);
+ index--;
+ }
+ else if (strstr(str_find,"T") != NULL) {
+ *array_size = philos_int_append(*array_size, &index, 3);
+ str_find = yon_char_divide(str_find, length-1);
+
+ str_find = yon_char_unite(str_find," ", STR_TB, NULL);
+ index--;
+ }
+ else if (strstr(str_find,"%%") != NULL) {
+ *array_size = philos_int_append(*array_size, &index, -1);
+ str_find = yon_char_divide(str_find, length-1);
+ index--;
+ }
+ else if (strstr(str_find,"-") != NULL) {
+ *array_size = philos_int_append(*array_size, &index, -1);
+ index--;
+ }
+ else {
+ *array_size = philos_int_append(*array_size, &index, 0);
+ index--;
+ }
+
+}
+void philos_set_pow_size_memory_device(char* str_find, int** array_size,int index, char** array_size_pow) {
+ char* STR_KB = array_size_pow[0];
+ char* STR_MB = array_size_pow[1];
+ char* STR_GB = array_size_pow[2];
+ char* STR_TB = array_size_pow[3];
+ size_t length = strlen(str_find);
+ if (strstr(str_find,"K") != NULL) {
+ (*array_size)[index] = 0;
+ str_find = yon_char_divide(str_find, length-1);
+ str_find = yon_char_unite(str_find, " ", STR_KB, NULL);
+ index--;
+ }
+ else if (strstr(str_find,"M") != NULL) {
+ (*array_size)[index] = 1;
+ str_find = yon_char_divide(str_find, length-1);
+ str_find = yon_char_unite(str_find," ", STR_MB, NULL);
+ index--;
+ }
+ else if (strstr(str_find,"G") != NULL) {
+ (*array_size)[index] = 2;
+ str_find = yon_char_divide(str_find, length-1);
+ str_find = yon_char_unite(str_find," ", STR_GB, NULL);
+ index--;
+ }
+ else if (strstr(str_find,"T") != NULL) {
+ (*array_size)[index] = 3;
+ str_find = yon_char_divide(str_find, length-1);
+
+ str_find = yon_char_unite(str_find," ", STR_TB, NULL);
+ index--;
+ }
+ else if (strstr(str_find,"%%") != NULL) {
+ (*array_size)[index] = -1;
+ str_find = yon_char_divide(str_find, length-1);
+ index--;
+ }
+ else if (strstr(str_find,"-") != NULL) {
+ (*array_size)[index] = -1;
+ index--;
+ }
+
+}
+void philos_set_size_memory_integer_char(char* str_find, char*** array_data, int index) {
+ char* simv_del_array[10] = {"K","M","G","T","k","m","g","t"," ","%"};
+ for (size_t i = 0; i < 10; i++) {
+ if (strstr(str_find, simv_del_array[i])) {
+ str_find = yon_char_divide_search(str_find, simv_del_array[i], -1);
+ }
+ }
+ if (strstr(str_find, " ") != NULL) {
+ char* mem_s = yon_char_new(str_find);
+ yon_char_divide_search(mem_s, " ", -1);
+ *array_data = yon_char_parsed_append(*array_data, &index, mem_s);
+ }
+ if (strstr(str_find, "-") != NULL) {
+ *array_data = yon_char_parsed_append(*array_data, &index, "-");
+ }
+ else {
+ if (str_find[0] == '\"') {
+ yon_char_divide(str_find, 0);
+ size_t length = strlen(str_find);
+ str_find = yon_char_divide(str_find, length-2);
+ }
+ if (strstr(str_find, " ") == NULL) {
+ *array_data = yon_char_parsed_append(*array_data, &index, str_find);
+ }
+
+ }
+}
+
+void philos_free_string_array(char ***array, int size) {
+ if ((*array) == NULL) {
+ return;
+ }
+ for (int i = 0; i < size; i++){
+ free((*array)[i]);
+ }
+ if (size!= 0) {
+ free(*array);
+ (*array) = NULL;
+ }
+}
+
+void philos_free_string_array_n3(char ****array, int size) {
+ if ((*array) == NULL || size == 0) {
+ return;
+ }
+ int index_to_l2 = 0;
+ for (int i = 0; i < size; i++){
+ index_to_l2 = 0;
+ if ((*array)[i]!=NULL) {
+ while ((*array)[i][index_to_l2] != NULL) {
+ if ((*array)[i][index_to_l2] != NULL) {
+ free((*array)[i][index_to_l2]);
+ index_to_l2++;
+ }
+
+ }
+ }
+ free((*array)[i]);
+
+ }
+ if (size!= 0) {
+ free(*array);
+ (*array) = NULL;
+ }
+}
+
+void philos_free_int_array(int **array, int size) {
+ if (size!= 0) {
+ free(*array);
+ *array = NULL;
+ }
+}
+void philos_free_int_array_n2(int ***array, int size) {
+ if ((*array) == NULL || size == 0) {
+ return;
+ }
+ for (int i = 0; i < size; i++){
+ free((*array)[i]);
+ }
+ if (size!= 0) {
+ free(*array);
+ (*array) = NULL;
+ }
+}
+
+config_str philos_list_group(int* size) {
+ char* str_uid_min = "UID_MIN";
+ char* str_uid_max = "UID_MAX";
+ unsigned short uid_min = philos_read_uid_min_max(file_source_login_min_max, str_uid_min);
+ unsigned short uid_max = philos_read_uid_min_max(file_source_login_min_max, str_uid_max);
+ config_str str_users = malloc(1);
+ while (1) {
+ errno = 0;
+ struct passwd* entry = getpwent();
+ if (!entry) {
+ if (errno) {
+ return str_users;
+ }
+ break;
+ }
+ if ((entry->pw_uid >= uid_min && entry->pw_uid < uid_max) || entry->pw_uid == 0) {
+ str_users = yon_char_parsed_append(str_users, size, entry->pw_name);
+ }
+ }
+ endpwent();
+ return str_users;
+}
+
+unsigned short philos_read_uid_min_max(char* filename, char* search) {
+ int uid = 0;
+ char* remove_tab = "\t";
+ char* remove_space = " ";
+ char* search_uid_min = "UID_MIN";
+ int buff_size = 255;
+ char* line = g_malloc0(buff_size);
+ char* search_true = yon_char_get_augumented("SYS_", search);
+ FILE *fp = fopen(filename, "r");
+ if(fp) {
+ while((fgets(line, buff_size, fp)) != NULL) {
+ try{
+ if (yon_char_find_count(line, search) != 0 && yon_char_find_count(line, search_true) == 0) {
+ line = philos_str_remove(line, search);
+ line = philos_str_remove(line, remove_space);
+ line = philos_str_remove(line, remove_tab);
+ uid = atoi(line);
+
+ }
+ }
+ catch (...) {
+ if (yon_char_find_count(search, search_uid_min) != 0){
+ uid = 1000;
+ }
+ else{
+ uid = 65534;
+ }
+ }
+ }
+ }
+ else{
+ if (yon_char_find_count(search, search_uid_min) != 0) {
+ uid = 1000;
+ }
+ else{
+ uid = 65534;
+ }
+ }
+ fclose(fp);
+ free(line);
+ free(search_true);
+ return uid;
+
+}
+
+
+config_str philos_list_user(int* size) {
+ char* str_uid_min = "UID_MIN";
+ char* str_uid_max = "UID_MAX";
+ unsigned short uid_min = philos_read_uid_min_max(file_source_login_min_max, str_uid_min);
+ unsigned short uid_max = philos_read_uid_min_max(file_source_login_min_max, str_uid_max);
+ config_str str_users = malloc(1);
+ while (1) {
+ errno = 0;
+ struct passwd* entry = getpwent();
+ if (!entry) {
+ if (errno) {
+ return str_users;
+ }
+ break;
+ }
+ str_users = yon_char_parsed_append(str_users, size, entry->pw_name);
+ }
+ endpwent();
+ return str_users;
+}
+
+char* philos_str_size_pow_byte(GtkWidget *combo_box_text) {
+ int menu_id = gtk_combo_box_get_active(GTK_COMBO_BOX(combo_box_text));
+ if (menu_id == 0) {
+ return "K";
+ }
+ else if (menu_id == 1) {
+ return "M";
+ }
+ else if (menu_id == 2) {
+ return "G";
+ }
+ else if (menu_id == 3) {
+ return "T";
+ }
+ else {
+ return " ";
+ }
+}
+
+char* philos_str_remove(char *str, const char *sub) {
+ size_t len = strlen(sub);
+ if (len > 0) {
+ char *p = str;
+ size_t size = 0;
+ while ((p = strstr(p, sub)) != NULL) {
+ size = (size == 0) ? (p - str) + strlen(p + len) + 1 : size - len;
+ memmove(p, p + len, size - (p - str));
+ }
+ }
+ return str;
+}
+
+
+void philos_split_size_memory(char* str_value, int* size, char* pow_memory) {
+ (*size) = atoi(yon_char_divide_search(pow_memory, " ", -1));
+}
+
+char* philos_format_cfg_str_size_memory(char* str_key, int value, int pow_size_memory) {
+ if (value == -1 || value == -3 || pow_size_memory == -3) {
+ return yon_char_new("-");
+ }
+ char* str_value = yon_char_from_int(value);
+ if (pow_size_memory==0) {
+ return yon_char_unite(str_key, str_value, "K" ,NULL);
+ }
+ else if (pow_size_memory==1) {
+ return yon_char_unite(str_key, str_value, "M" ,NULL);
+ }
+ else if (pow_size_memory==2){
+ return yon_char_unite(str_key, str_value, "G" ,NULL);
+ }
+ else if (pow_size_memory== 3) {
+ return yon_char_unite(str_key, str_value, "T" ,NULL);
+ }
+ else if (pow_size_memory== -1) {
+ return yon_char_unite(str_key, str_value, "%" ,NULL);
+ }
+ else if (pow_size_memory== -3) {
+ return yon_char_new("-");
+ }
+ else {
+ return yon_char_new("-");
+ }
+}
+
+char** philos_str_split(char *parameters, int *size, char *divider) {
+ char** array_split = NULL;
+ char* ch= NULL;
+ ch = strtok(parameters, divider);
+ if (ch != NULL) {
+ array_split = yon_char_parsed_append(array_split, size, ch);
+ while (ch != NULL) {
+ ch = strtok(NULL, divider);
+ array_split = yon_char_parsed_append(array_split, size, ch);
+ }
+ }
+ (*size) -= 1;
+ return array_split;
+}
+
+void philos_array_str_copy(char*** source, char*** copy) {
+ int index = 0;
+ if (copy == NULL || source == NULL) {
+ return;
+ }
+ while (1) {
+ if ((*copy)[index] != NULL) {
+ (*source) = yon_char_parsed_append((*source), &index, yon_char_new((*copy)[index]));
+ }
+ else {
+ break;
+ }
+ }
+}
+void philos_array_int_copy(int** source, int** copy) {
+ int * new_int = g_malloc0(sizeof(int)*2);
+ if ((*copy)[0] != -2) {
+ new_int[0] = (*copy)[0];
+ new_int[1] = -2;
+ int i = 2;
+ for (i=1;(*copy)[i]!=-2;i++) {
+ yon_int_array_append(&new_int,(*copy)[i]);
+ }
+ *source=new_int;
+ }
+ else {
+ new_int[0] = (*copy)[0];
+ *source=new_int;
+ }
+
+}
+char** philos_pars_terminal_systemd_cgls(char* CMD_GET_SLICE_SERVICE, char* str_find, int* size_array_data) {
+ int size = 0;
+ char** terminal_print = yon_config_load(CMD_GET_SLICE_SERVICE, &size);
+ char** array_data = NULL;
+ for (int index = 0; index < size; index++) {
+ if (strstr(terminal_print[index], str_find) != NULL) {
+ yon_char_divide_search(terminal_print[index],"─",-1);
+ terminal_print[index] = yon_char_divide_search(terminal_print[index]," ", -1);
+ yon_char_divide(terminal_print[index],1);
+ array_data = yon_char_parsed_append(array_data, size_array_data, terminal_print[index]);
+
+ }
+ }
+ return array_data;
+}
+char* philos_pard_array_add_cmd(char* cmd, temp_config* _config, char* key, int* array_io, int* array_io_pow_size, char** disk, int size) {
+ char* split_simvol = g_malloc0(sizeof(char)*2);
+ int flag_format = 0;
+ char* cmd_old = yon_char_new(cmd);
+ char* cmd_new = "";
+ if (disk && size && array_io && array_io_pow_size) {
+ int index_find = 0;
+ for (int index = 0; index < size; index++) {
+ if (array_io_pow_size[index] >= 0 && array_io[index]>= 0 && !strstr(disk[index], "-")) {
+ char* num_and_pow_size = philos_format_cfg_str_size_memory(" ", array_io[index], array_io_pow_size[index]);
+ if (!strstr(num_and_pow_size, "-")) {
+ cmd_new = yon_char_unite(cmd_new,
+ split_simvol,
+ disk[index],
+ num_and_pow_size, NULL);
+ split_simvol[0] = ',';
+ split_simvol[1] = '\0';
+ flag_format = 1;
+ }
+ free(num_and_pow_size);
+ }
+ }
+ }
+ free(split_simvol);
+ if (flag_format) {
+ if (strlen(cmd_new)>2) {
+ if (strlen(cmd_old) > 3) {
+ cmd = yon_char_unite(cmd_old, ",", key, cmd_new, NULL);
+ }
+ else {
+ cmd = yon_char_unite(key, cmd_new, NULL);
+ }
+
+ }
+ return cmd;
+ }
+ else {
+ return cmd_old;
+ }
+
+}
+int philos_check_activ_disk(temp_set_window *widgets, temp_config* _config) {
+ char* disk = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widgets->cbtTempDevice));
+ disk = yon_char_divide_search(disk," ", -1);
+ if (disk == NULL) {
+ return 0;
+ }
+ return 1;
+}
+
+void philos_temp_generate_cmd(temp_set_window *widgets, temp_config* _config) {
+ char* str_cmd = "";
+ char* split_simvol = g_malloc0(sizeof(char)*2);
+ int size_bite = 0;
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->chkSoftRestrictionTemp))) {
+ size_bite = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widgets->spiSevereRestrictionTemp));
+ str_cmd = yon_char_unite(str_cmd,
+ "MemoryHigh=",
+ yon_char_from_int(size_bite),
+ philos_str_size_pow_byte(widgets->cmSevereRestrictionTemp), NULL);
+ split_simvol[0] = ',';
+ split_simvol[1] = '\0';
+ }
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->chkSevereRestrictionTemp))) {
+ size_bite = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widgets->spinSevereRestrictionTemp));
+ str_cmd = yon_char_unite(str_cmd, split_simvol,
+ "MemoryMax=",
+ yon_char_from_int(size_bite),
+ philos_str_size_pow_byte(widgets->cmbSevereRestrictionTemp), NULL);
+ split_simvol[0] = ',';
+ split_simvol[1] = '\0';
+ }
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->chkPaddingFLTemp))) {
+ size_bite = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widgets->spinPaddingFLTemp));
+ str_cmd = yon_char_unite(str_cmd, split_simvol,
+ "MemorySwapMax=",
+ yon_char_from_int(size_bite),
+ philos_str_size_pow_byte(widgets->cmbPaddingFLTemp), NULL);
+ split_simvol[0] = ',';
+ split_simvol[1] = '\0';
+ }
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->chkCPULimitTemp))) {
+ size_bite = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widgets->spinCPULimitTemp));
+ str_cmd = yon_char_unite(str_cmd, split_simvol,
+ "CPUQuota=",
+ yon_char_from_int(size_bite),
+ "%", NULL);
+ split_simvol[0] = ',';
+ split_simvol[1] = '\0';
+ }
+ if (gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->cbtTempDevice))!=-1) {
+ if (_config->size_disk!=0) {
+ str_cmd = philos_pard_array_add_cmd(str_cmd, _config, "IOReadBandwidthMax=", _config->i_o_limit_read, _config->i_o_limit_read_size, _config->disk_read, _config->size_disk);
+
+ }
+ if (_config->size_disk!=0) {
+ str_cmd = philos_pard_array_add_cmd(str_cmd, _config, "IOWriteBandwidthMax=", _config->i_o_limit_write, _config->i_o_limit_write_size, _config->disk_write, _config->size_disk);
+ }
+
+ }
+ gtk_entry_set_text(GTK_ENTRY(widgets->entryTempCmd), str_cmd);
+ free(split_simvol);
+}
+// flag_check_array = 0 READ
+// flag_check_array = 1 WRITE
+void philos_temp_del_disk(temp_set_window *widgets, temp_config* _config, int flag_check_array) {
+ char* disk = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widgets->cbtTempDevice));
+ disk = yon_char_divide_search(disk, " ", -1);
+ int bool_read = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->chbTempRead));
+ int bool_write = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->chbTempWrite));
+ char** ptr_disk = NULL;
+ int size = 0;
+
+ if (flag_check_array == 0) {
+ size = _config->size_disk;
+ if (philos_check_activ_disk(widgets, _config) == 0) {
+ return;
+ }
+ ptr_disk = _config->disk_read;
+ }
+ else if (flag_check_array == 1) {
+ size = _config->size_disk;
+ if (philos_check_activ_disk(widgets, _config) == 0) {
+ return;
+ }
+ ptr_disk = _config->disk_write;
+ }
+ int index_find = -1;
+ if (ptr_disk) {
+ for (int index = 0; index < size; index++) {
+ char* disk_cfg = ptr_disk[index];
+ if (disk_cfg) {
+ if (strstr(disk_cfg, disk) != NULL) {
+ index_find = index;
+ break;
+ }
+ }
+ }
+ }
+
+ if ((bool_read == 0 && bool_write == 0 && index_find != -1)) {
+ ptr_disk[index_find] = yon_char_new("-");
+ _config->i_o_limit_read_size[index_find] = -3;
+ _config->i_o_limit_write_size[index_find] = -3;
+ _config->i_o_limit_read[index_find] = -3;
+ _config->i_o_limit_write[index_find] = -3;
+ }
+ if (flag_check_array == 0) {
+ if (ptr_disk) {
+ yon_char_parsed_copy(&_config->disk_read, &ptr_disk);
+ }
+ }
+ else if (flag_check_array == 1) {
+ if (ptr_disk) {
+ yon_char_parsed_copy(&_config->disk_write, &ptr_disk);
+ }
+ }
+}
+
+void philos_temp_config_init(temp_config* _config) {
+ if (_config->size_disk != 0) {
+ philos_free_string_array(&_config->disk_read, _config->size_disk);
+ philos_free_int_array(&_config->i_o_limit_read, _config->size_disk);
+ philos_free_int_array(&_config->i_o_limit_read_size, _config->size_disk);
+ }
+ else if (_config->size_disk != 0) {
+ philos_free_string_array(&_config->disk_write, _config->size_disk);
+ philos_free_int_array(&_config->i_o_limit_write, _config->size_disk);
+ philos_free_int_array(&_config->i_o_limit_write_size, _config->size_disk);
+ }
+ _config->disk_read = NULL;
+ _config->disk_write = NULL;
+ _config->i_o_limit_read = NULL;
+ _config->i_o_limit_write = NULL;
+ _config->i_o_limit_read_size = NULL;
+ _config->i_o_limit_write_size = NULL;
+ _config->size_disk = 0;
+ _config->size_disk = 0;
+}
+
+// flag_check_array = 0 READ
+// flag_check_array = 1 WRITE
+void philos_update_device_to_entry(temp_set_window *widgets, temp_config* _config, int flag_check_array) {
+ int disk_id = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->cbtTempDevice));
+ char* disk = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widgets->cbtTempDevice));
+ disk = yon_char_divide_search(disk, " ", -1);
+ if (disk_id != -1) {
+ int index_find = -1;
+ if (flag_check_array == 0) {
+ if (_config->disk_read) {
+ for (int index = 0; index < _config->size_disk; index++) {
+ char* disk_cfg = _config->disk_read[index];
+ if (disk_cfg) {
+ if (strstr(disk_cfg, disk)) {
+ index_find = index;
+ break;
+ }
+ }
+ }
+ }
+ }
+ else if (flag_check_array == 1) {
+ if (_config->disk_write) {
+ for (int index = 0; index < _config->size_disk; index++) {
+ char* disk_cfg = _config->disk_write[index];
+ if (disk_cfg) {
+ if (strstr(disk_cfg, disk)) {
+ index_find = index;
+ break;
+ }
+ }
+ }
+ }
+ }
+ if (index_find != -1) {
+ if (flag_check_array==0) {
+ if (_config->i_o_limit_read[index_find]<0 || _config->i_o_limit_read_size[index_find]<0) {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->chbTempRead), 0);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->spinTempRead), 0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->cbtTempRead), 0);
+ }
+ else {
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->spinTempRead), _config->i_o_limit_read[index_find]);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->chbTempRead), 1);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->cbtTempRead), _config->i_o_limit_read_size[index_find]);
+
+ }
+ }
+ else if (flag_check_array==1) {
+ if (_config->i_o_limit_write[index_find]<0 || _config->i_o_limit_write_size[index_find]<0) {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->chbTempWrite), 0);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->spinTempWrite), 0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->cbtTempWrite), 0);
+ }
+ else {
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->spinTempWrite), _config->i_o_limit_write[index_find]);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->chbTempWrite), 1);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->cbtTempWrite), _config->i_o_limit_write_size[index_find]);
+ }
+ }
+ else {
+ if (flag_check_array==0) {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->chbTempRead), 0);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->spinTempRead), 0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->cbtTempRead), 0);
+ }
+ else if (flag_check_array==1) {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->chbTempWrite), 0);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->spinTempWrite), 0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->cbtTempWrite), 0);
+ }
+ }
+ }
+ else {
+ if (flag_check_array==0) {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->chbTempRead), 0);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->spinTempRead), 0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->cbtTempRead), 0);
+ }
+ else if (flag_check_array==1) {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->chbTempWrite), 0);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->spinTempWrite), 0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->cbtTempWrite), 0);
+ }
+ }
+ }
+ else {
+ if (flag_check_array==0) {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->chbTempRead), 0);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->spinTempRead), 0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->cbtTempRead), 0);
+ }
+ else if (flag_check_array==1) {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->chbTempWrite), 0);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(widgets->spinTempWrite), 0);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->cbtTempWrite), 0);
+ }
+ }
+}
+// flag_check_array = 0 READ
+// flag_check_array = 1 WRITE
+void philos_temp_add_disk(temp_set_window *widgets, temp_config* _config, int flag_check_array) {
+ char* disk = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(widgets->cbtTempDevice));
+ disk = yon_char_divide_search(disk, " ", -1);
+ int disk_id = gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->cbtTempDevice));
+ int bool_read = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->chbTempRead));
+ int bool_write = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->chbTempWrite));
+ char** ptr_disk = NULL;
+ int size = 0;
+ if (flag_check_array == 0) {
+ ptr_disk = _config->disk_read;
+ size = _config->size_disk;
+ }
+ else if (flag_check_array == 1) {
+ ptr_disk = _config->disk_write;
+ size = _config->size_disk;
+ }
+ if (disk_id >= 0 && size !=0) {
+ int index_find = -1;
+ if (ptr_disk){
+ for (int index = 0; index < size; index++) {
+ char* disk_cfg = ptr_disk[index];
+ if (disk_cfg) {
+ if (strstr(disk_cfg, disk) != NULL) {
+ index_find = index;
+ break;
+ }
+ }
+ }
+ }
+
+ if (index_find == -1 || index_find>=0) {
+ if (index_find == -1) {
+ index_find = find_null_array(_config);
+ }
+ // Редактирование
+ if (flag_check_array == 0) {
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->chbTempRead))) {
+ ptr_disk[index_find] = yon_char_new(disk);
+ _config->i_o_limit_read_size[index_find] = (int)gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->cbtTempRead));
+ _config->i_o_limit_read[index_find] = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widgets->spinTempRead));
+ }
+ else {
+ ptr_disk[index_find] = yon_char_new("-");
+ _config->i_o_limit_read_size[index_find] = -3;
+ _config->i_o_limit_read[index_find] = -3;
+ }
+ }
+ if (flag_check_array == 1) {
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->chbTempWrite))) {
+ ptr_disk[index_find] = yon_char_new(disk);
+ _config->i_o_limit_write_size[index_find] = (int)gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->cbtTempWrite));
+ _config->i_o_limit_write[index_find] = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widgets->spinTempWrite));
+ }
+ else {
+ _config->i_o_limit_write_size[index_find] = -3;
+ _config->i_o_limit_write[index_find] = -3;
+ ptr_disk[index_find] = yon_char_new("-");
+ }
+ }
+ }
+ }
+ else {
+ if (bool_read == 1 || bool_write == 1) {
+ int index_find = find_null_array(_config);
+ if (flag_check_array == 0) {
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->chbTempRead))) {
+ ptr_disk[index_find] = yon_char_new(disk);
+ _config->i_o_limit_read_size[index_find] = (int)gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->cbtTempRead));
+ _config->i_o_limit_read[index_find] = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widgets->spinTempRead));
+
+ }
+ }
+ if (flag_check_array == 1) {
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widgets->chbTempWrite))) {
+ ptr_disk[index_find] = yon_char_new(disk);
+ _config->i_o_limit_write_size[index_find] = (int)gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->cbtTempWrite));
+ _config->i_o_limit_write[index_find] = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(widgets->spinTempWrite));
+ }
+ }
+ }
+ }
+ if (flag_check_array == 0) {
+ if (ptr_disk) {
+ yon_char_parsed_copy(&_config->disk_read, &ptr_disk);
+
+ }
+ }
+ else if (flag_check_array == 1) {
+ if (ptr_disk) {
+ yon_char_parsed_copy(&_config->disk_write, &ptr_disk);
+ }
+ }
+}
+int find_null_array(temp_config* _config) {
+ int index = 0;
+ for (index = 0; (_config->disk_read[index]!=NULL && _config->disk_write[index]!=NULL); index++) {
+ if (strcmp(_config->disk_read[index], "-") == 0 && strcmp(_config->disk_write[index], "-") == 0) {
+ break;
+ }
+ }
+ return index;
+
+
+}
+int* philos_int_append(int* array, int* size, int value) {
+ array = yon_remalloc(array, (*size+1)*sizeof(int));
+ array[(*size)] = value;
+ (*size)++;
+ return array;
+
+}
+
+int* remove_element_int_array(int* array, int* size, int item_to_delete) {
+ int *new_int_parsed=NULL;
+ new_int_parsed=malloc(sizeof(int)*((*size)-1));
+ int flag = 0;
+ for (int i=0;i < (*size);i++){
+ if (i==item_to_delete) {
+ flag = 1;
+ }
+ if (flag == 0) {
+ memcpy(&(new_int_parsed[i]),&(array[i]),sizeof(int));
+ }
+ else if (flag == 1 && i!=item_to_delete) {
+ memcpy(&(new_int_parsed[i-1]),&(array[i]),sizeof(int));
+ }
+ }
+ (*size)=(*size)-1;
+ return new_int_parsed;
+}
+
+int** remove_element_int_array_n3(int** array, int* size, int item_to_delete) {
+ int **new_int_parsed=NULL;
+ new_int_parsed=malloc(sizeof(int*)*((*size)-1));
+ int flag = 0;
+ for (int i=0;i < (*size);i++){
+ if (i==item_to_delete) {
+ flag = 1;
+ }
+ if (flag == 0) {
+ philos_array_int_copy(&new_int_parsed[i],&array[i]);
+ }
+ else if (flag == 1 && i!=item_to_delete) {
+ philos_array_int_copy(&new_int_parsed[i-1],&array[i]);
+ }
+ }
+ (*size)=(*size)-1;
+ return new_int_parsed;
+}
+char* philos_get_size_bite(GtkWidget* chk_button, GtkWidget* spin, GtkWidget* combo_box_text) {
+ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(chk_button))) {
+ char* size_prifics = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(combo_box_text));
+ int size_bite = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin));
+ char* str_size_bute = yon_char_unite(yon_char_from_int(size_bite), " ", size_prifics, NULL);
+ return str_size_bute;
+ }
+ else {
+ char* str = (char*)malloc(sizeof(char*)*2);
+ str[0] = '-';
+ str[1] = '\0';
+ return str;
+ }
+}
+void philos_fill_combo_box_text(GtkWidget *cbt, config_str list_data, int size) {
+ for (int index = 0; index < size; index++) {
+ gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(cbt), list_data[index]);
+ }
+}
+
+void philos_set_spin_adjustment(GtkWidget *check, GtkWidget *spin, GtkWidget *combo, size_t value) {
+ gboolean active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check));
+ guint value_spin = gtk_spin_button_get_digits(GTK_SPIN_BUTTON(spin));
+ if (active != -1) {
+ GtkAdjustment* adjustment = NULL;
+ adjustment = gtk_spin_button_get_adjustment(GTK_SPIN_BUTTON(spin));
+ gtk_adjustment_set_lower(adjustment, 0.0);
+ gtk_adjustment_set_page_increment(adjustment, 1.0);
+ if (combo == NULL) {
+ gtk_adjustment_set_upper(adjustment, (gdouble)(value*100));
+ if ((value*100)0) {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check),1);
+ }
+ else if (active == 0) {
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin), 0);
+ }
+ if (flag_cpu == 0) {
+ philos_set_spin_adjustment(check, spin, combo, resurs);
+ if (value_spin>resurs) {
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin), resurs);
+ }
+ }
+ else {
+ philos_set_spin_adjustment(check, spin, NULL, resurs);
+ }
+
+}
+
+size_t get_resurs_total(char* cmd) {
+ int size = 0;
+ size_t size_memory = 0;
+ char **responce = yon_config_load(cmd, &size);
+ for (int index = 0; index < size; index++ ) {
+ char* mem_size_kb = yon_char_divide_search(responce[index], "\n", -1);
+ size_memory = atoll(mem_size_kb);
+ free(mem_size_kb);
+ }
+ philos_free_string_array(&responce, size);
+ return size_memory;
+}
+
+float get_size_pow_memory(size_t size_memory, int size) {
+ float res = size_memory;
+ for (size_t index = 0; index < size; index++) {
+ res = res/1024;
+ }
+ return res;
+}
+
+void philos_set_active_widgets_device_io(GtkWidget* combo_to_l2,GtkWidget *check, GtkWidget *spin, GtkWidget *combo) {
+ int menu_id = gtk_combo_box_get_active(GTK_COMBO_BOX(combo_to_l2));
+ if (menu_id != -1) {
+ gboolean active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(check));
+ if (active == 0) {
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin), 0);
+ }
+ else if (gtk_spin_button_get_digits(GTK_SPIN_BUTTON(spin))>0) {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check),1);
+ }
+ gtk_widget_set_sensitive(spin, active);
+ gtk_widget_set_sensitive(combo, active);
+ }
+ else {
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(spin), 0);
+ gtk_widget_set_sensitive(spin, 0);
+ gtk_widget_set_sensitive(combo, 0);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(check), 0);
+ }
+ philos_set_spin_adjustment(check, spin, combo, 12582912);
+}
+char *yon_char_get_augumented(char *source, char *append)
+{
+ if (source && append)
+ {
+ int size = strlen(source) + strlen(append) + 1;
+ char *final = malloc(size);
+ memset(final, 0, size);
+ if (strstr(source, "%%"))
+ sprintf(final, source, append);
+ else
+ sprintf(final, "%s%s", source, append);
+ return final;
+ }
+ else
+ return NULL;
+}
+dictionary *yon_dictionary_create_with_data_connected(dictionary *dict, char *key, void *data) {
+ dictionary *dct = yon_dictionary_create_conneced(dict);
+ dct->key = yon_char_new(key);
+ dct->data = data;
+ dct->data_type = DICTIONARY_OTHER_TYPE;
+ return dct;
+}
+char **yon_char_parsed_shrink(char **char_string, int *size, int item_to_delete) {
+ char **new_char_parsed=NULL;
+ new_char_parsed=malloc(sizeof(char*)*((*size)-1));
+ int flag = 0;
+ for (int i=0;i < (*size);i++){
+ if (i==item_to_delete) {
+ flag = 1;
+ }
+ if (flag == 0) {
+ new_char_parsed[i]=yon_char_new(char_string[i]);
+ }
+ else if (flag == 1 && i!=item_to_delete) {
+ new_char_parsed[i-1]=yon_char_new(char_string[i]);
+ }
+ }
+ (*size)=(*size)-1;
+ return new_char_parsed;
+}
+char*** yon_char_parsed_shrink_n3(char ***char_string, int *size, int item_to_delete) {
+ char ***new_char_parsed=NULL;
+ new_char_parsed=malloc(sizeof(char**)*((*size)-1));
+ int flag = 0;
+ for (int i=0;i < (*size);i++){
+ if (i==item_to_delete) {
+ flag = 1;
+ }
+ if (flag == 0) {
+ yon_char_parsed_copy(&new_char_parsed[i],&char_string[i]);
+ }
+ else if (flag == 1 && i!=item_to_delete) {
+ yon_char_parsed_copy(&new_char_parsed[i-1], &char_string[i]);
+ }
+ }
+ (*size)=(*size)-1;
+ return new_char_parsed;
+}
+dictionary *yon_dictionary_create_empty() {
+ dictionary *dict = malloc(sizeof(dictionary));
+ dict->data = NULL;
+ dict->key = NULL;
+ dict->next = NULL;
+ dict->prev = NULL;
+ dict->first = dict;
+ dict->data_type = DICTIONARY_OTHER_TYPE;
+ return dict;
+}
+#ifdef VTE_TERMINAL
+void yon_terminal_integrated_launch(GtkWidget *terminal, char* command, void *endwork_function, void* endwork_function_argument){
+ char **commands=new_arr(char*,2);
+ gchar **envp = g_get_environ();
+ commands[0]=(gchar *)g_strdup(g_environ_getenv(envp, "SHELL"));
+ commands[1]=NULL;
+ char **env=new_arr(char*,2);
+ env[0]="";
+ env[1]=NULL;
+ vte_terminal_set_size(VTE_TERMINAL(terminal),10,15);
+ VtePty *pty = vte_pty_new_sync(VTE_PTY_DEFAULT,NULL,NULL);
+ vte_terminal_set_pty(VTE_TERMINAL(terminal),pty);
+ char *install_command=yon_char_unite("tput cup 0 0 && tput ed; ",command, "; exit 0\n",NULL);
+ if(endwork_function)
+ g_signal_connect(G_OBJECT(terminal), "child-exited", G_CALLBACK(endwork_function), endwork_function_argument);
+ vte_terminal_spawn_async(VTE_TERMINAL(terminal),
+ VTE_PTY_DEFAULT,
+ NULL,
+ commands,
+ NULL,
+ 0,
+ NULL, NULL,
+ NULL,
+ -1,
+ NULL,
+ child_ready,
+ install_command);
+ vte_pty_spawn_async(pty,
+ NULL,
+ commands,
+ NULL,
+ 0,
+ NULL, NULL,
+ NULL,
+ -1,
+ NULL,
+ NULL,
+ NULL);
+ vte_terminal_set_scrollback_lines(VTE_TERMINAL(terminal), -1);
+ vte_terminal_set_scroll_on_output(VTE_TERMINAL(terminal), TRUE);
+ vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(terminal), TRUE);
+ gtk_widget_show_all(terminal);
+}
+static void child_ready(VteTerminal *terminal, GPid pid, GError *error, gpointer user_data)
+{
+ if (!terminal) return;
+ if (pid == -1) printf("Error\n\n\n");
+ else vte_terminal_feed_child(VTE_TERMINAL(terminal),(char*)user_data,strlen((char*)user_data));
+}
+#endif
+dictionary *yon_dictionary_create_conneced(dictionary *targetdict)
+{
+ targetdict = yon_dictionary_get_last(targetdict);
+ targetdict->next = yon_dictionary_create_empty();
+ targetdict->next->prev = targetdict;
+ targetdict->next->first = targetdict->first;
+ targetdict->next->data_type = DICTIONARY_OTHER_TYPE;
+ return targetdict->next;
+}
+void yon_int_array_append(int **source, int append){
+ int size=0;
+ for (size=0;(*source)[size]!=-2;size++);
+ *source = realloc(*source,(size+2)*sizeof(int));
+ (*source)[size] = append;
+ (*source)[size+1] = -2;
+}
+
+/**[EN]
+ * int yon_config_save(char *command)
+ * Saves config with [command]
+ * [RU]
+*/
+int philos_config_save(char *command)
+{
+ FILE *output = popen(command, "r");
+ return 1;
+}
+
+void philos_array_int_pars_to(int** array, int to) {
+ int flag = 0;
+ int i = 0;
+ for (i = 0; (*array)[i] != -2; i++) {
+ if ((*array)[i]==-3) {
+ (*array)[i] = to;
+ flag = 1;
+ break;
+ }
+ }
+}
+
+void philos_array_char_pars_to(char*** array, char* to) {
+ int flag = 0;
+ int i = 0;
+ for (i = 0; (*array)[i] != NULL; i++) {
+ if (strcmp((*array)[i], "-") == 0) {
+ (*array)[i] = yon_char_new(to);
+ flag = 1;
+ break;
+ }
+ }
+}
+void init_device_disk(temp_config* _config) {
+ for (int index = 0;index< (get_device_cfg()->size_disk*2);index++){
+ _config->disk_read = yon_char_parsed_append(_config->disk_read,&_config->size_disk, "-");
+ _config->size_disk--;
+ _config->i_o_limit_write_size = philos_int_append(_config->i_o_limit_write_size, &_config->size_disk, -3);
+ _config->size_disk--;
+ _config->i_o_limit_write = philos_int_append(_config->i_o_limit_write, &_config->size_disk, -3);
+ _config->size_disk--;
+ _config->i_o_limit_read_size = philos_int_append(_config->i_o_limit_read_size, &_config->size_disk, -3);
+ _config->size_disk--;
+ _config->disk_write = yon_char_parsed_append(_config->disk_write,&_config->size_disk, "-");
+ _config->size_disk--;
+ _config->i_o_limit_read = philos_int_append(_config->i_o_limit_read, &_config->size_disk, -3);
+ }
+ _config->i_o_limit_write_size = philos_int_append(_config->i_o_limit_write_size, &_config->size_disk, -2);
+ _config->size_disk--;
+ _config->disk_write = yon_char_parsed_append(_config->disk_write, &_config->size_disk, NULL);
+ _config->size_disk--;
+ _config->disk_read = yon_char_parsed_append(_config->disk_read, &_config->size_disk, NULL);
+ _config->size_disk--;
+ _config->i_o_limit_write = philos_int_append(_config->i_o_limit_write, &_config->size_disk, -2);
+ _config->size_disk--;
+ _config->i_o_limit_read = philos_int_append(_config->i_o_limit_read, &_config->size_disk, -2);
+ _config->size_disk--;
+ _config->i_o_limit_read_size = philos_int_append(_config->i_o_limit_read_size, &_config->size_disk, -2);
+}
+
+char** philos_char_parsed_append(char** parsed, int *size, char *string) {
+ parsed = yon_char_parsed_append(parsed, size, string);
+ (*size)--;
+ return parsed;
+}
+
+void philos_set_size_memory_integer(char* str_find, int** array_data, int index) {
+ if (strstr(str_find, " ")) {
+ yon_char_divide_search(str_find, " ", -1);
+ }
+ char* simv_del_array[9] = {"K","M","G","T","k","m","g","t","%"};
+ for (size_t i = 0; i < 9; i++) {
+ if (strstr(str_find, simv_del_array[i])) {
+ str_find = yon_char_divide_search(str_find, simv_del_array[i], -1);
+ }
+ }
+ if (strstr(str_find, "-")==NULL) {
+ *array_data = philos_int_append(*array_data, &index, atoi(str_find));
+ }
+ else {
+ *array_data = philos_int_append(*array_data, &index, -1);
+ }
+}
\ No newline at end of file
diff --git a/source/model/philos_utils.h b/source/model/philos_utils.h
new file mode 100644
index 0000000..3055bb7
--- /dev/null
+++ b/source/model/philos_utils.h
@@ -0,0 +1,127 @@
+#ifndef PHILOS_UTILS_H
+#define PHILOS_UTILS_H
+#include "ubl-utils.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#ifdef VTE_TERMINAL
+ #include
+#endif
+
+#include
+#include
+#include "my_device.h"
+
+#define catch(x) ExitJmp:if(__HadError)
+#define throw(x) {__HadError=true;goto ExitJmp;}
+#define file_source_login_min_max "/etc/login.defs"
+static char** array_size_pow;
+typedef struct {
+ char** disk_read;
+ char** disk_write;
+ int* i_o_limit_read;
+ int* i_o_limit_write;
+ int* i_o_limit_read_size;
+ int* i_o_limit_write_size;
+ int size;
+ int size_disk;
+} temp_config;
+
+typedef struct {
+
+ GtkWidget* Window;
+ GtkWidget* btnSaveTempSave;
+ GtkWidget* btnTempCancel;
+
+ GtkWidget* entryTempCmd;
+ GtkWidget* chbTempRead;
+ GtkWidget* spinTempRead;
+ GtkWidget* cbtTempRead;
+
+ GtkWidget* chbTempWrite;
+ GtkWidget* spinTempWrite;
+ GtkWidget* cbtTempWrite;
+
+ GtkWidget* chkSoftRestrictionTemp;
+ GtkWidget* spiSevereRestrictionTemp;
+ GtkWidget* cmSevereRestrictionTemp;
+
+ GtkWidget* chkSevereRestrictionTemp;
+ GtkWidget* spinSevereRestrictionTemp;
+ GtkWidget* cmbSevereRestrictionTemp;
+
+ GtkWidget* chkPaddingFLTemp;
+ GtkWidget* spinPaddingFLTemp;
+ GtkWidget* cmbPaddingFLTemp;
+
+ GtkWidget* chkCPULimitTemp;
+ GtkWidget* spinCPULimitTemp;
+ GtkWidget* lblCPULimitTemp;
+
+ GtkWidget* cbtTempDevice;
+ GtkWidget* cbxTempQuotaObj;
+ GtkWidget* cbxTempQuotaLevel2;
+ GtkWidget* boxBlockGui;
+} temp_set_window;
+void philos_array_string_remove_char(char*** array, char* str_remove, int size);
+void philos_set_pow_size_memory(char* str_find, int** array_size,int index, char** array_size_pow);
+void philos_set_size_memory_integer_char(char* str_find, char*** array_data, int index);
+void philos_free_string_array(char ***array, int size);
+void philos_free_string_array_n3(char ****array, int size);
+void philos_free_int_array(int **array, int size);
+void philos_free_int_array_n2(int ***array, int size);
+config_str philos_list_group(int* size);
+unsigned short philos_read_uid_min_max(char* filename, char* search);
+config_str philos_list_user(int* size);
+char* philos_str_size_pow_byte(GtkWidget *combo_box_text);
+char* philos_str_remove(char *str, const char *sub);
+void philos_split_size_memory(char* str_value, int* size, char* pow_memory);
+char* philos_format_cfg_str_size_memory(char* str_key, int value, int pow_size_memory);
+char** philos_str_split(char *parameters, int *size, char *divider);
+void philos_array_str_copy(char*** source, char*** copy);
+void philos_set_pow_size_memory_device(char* str_find, int** array_size,int index, char** array_size_pow);
+void philos_array_int_copy(int** source, int** copy);
+char** philos_pars_terminal_systemd_cgls(char* CMD_GET_SLICE_SERVICE, char* str_find, int* size_array_data);
+char* philos_pard_array_add_cmd(char* cmd, temp_config* _config, char* key, int* array_io, int* array_io_pow_size, char** disk, int size);
+int philos_check_activ_disk(temp_set_window *widgets, temp_config* _config);
+void philos_temp_generate_cmd(temp_set_window *widgets, temp_config* _config);
+void philos_temp_del_disk(temp_set_window *widgets, temp_config* _config, int flag_check_array);
+void philos_temp_config_init(temp_config* _config);
+void philos_update_device_to_entry(temp_set_window *widgets, temp_config* _config, int flag_check_array);
+void philos_temp_add_disk(temp_set_window *widgets, temp_config* _config, int flag_check_array);
+int* philos_int_append(int* array, int* size, int value);
+int* remove_element_int_array(int* array, int* size, int item_to_delete);
+int** remove_element_int_array_n3(int** array, int* size, int item_to_delete);
+char* philos_get_size_bite(GtkWidget* chk_button, GtkWidget* spin, GtkWidget* combo_box_text);
+void philos_fill_combo_box_text(GtkWidget *cbt, config_str list_data, int size);
+void philos_set_spin_adjustment(GtkWidget *check, GtkWidget *spin, GtkWidget *combo, size_t value);
+void philos_set_active_widgets(GtkWidget *check, GtkWidget *spin, GtkWidget *combo, int flag_cpu, char* cmd);
+size_t get_resurs_total(char* cmd);
+float get_size_pow_memory(size_t size_memory, int size);
+void philos_set_active_widgets_device_io(GtkWidget* combo_to_l2,GtkWidget *check, GtkWidget *spin, GtkWidget *combo);
+char *yon_char_get_augumented(char *source, char *append);
+dictionary *yon_dictionary_create_with_data_connected(dictionary *dict, char *key, void *data);
+char **yon_char_parsed_shrink(char **char_string, int *size, int item_to_delete);
+char*** yon_char_parsed_shrink_n3(char ***char_string, int *size, int item_to_delete);
+dictionary *yon_dictionary_create_empty();
+void yon_terminal_integrated_launch(GtkWidget *terminal, char* command, void *endwork_function, void* endwork_function_argument);
+dictionary *yon_dictionary_create_conneced(dictionary *targetdict);
+void yon_int_array_append(int **source, int append);
+#ifdef VTE_TERMINAL
+static void child_ready(VteTerminal *terminal, GPid pid, GError *error, gpointer user_data);
+#endif
+int philos_config_save(char *command);
+void philos_array_int_pars_to(int** array, int to);
+void philos_array_char_pars_to(char*** array, char* to);
+int find_null_array(temp_config* _config);
+void init_device_disk(temp_config* _config);
+char** philos_char_parsed_append(char** parsed, int *size, char *string);
+void philos_set_size_memory_integer(char* str_find, int** array_data, int index);
+#endif
\ No newline at end of file
diff --git a/source/model/ubl-utils.c b/source/model/ubl-utils.c
new file mode 100644
index 0000000..0688bf4
--- /dev/null
+++ b/source/model/ubl-utils.c
@@ -0,0 +1,1759 @@
+#include "ubl-utils.h"
+
+// dictionary functions
+
+/**yon_dictionary_create_empty():
+ * [EN]
+ * Creates and returns empty dictionary
+ * [RU]
+ * Создаёт и возвращает пустой словарь.
+ */
+dictionary *yon_dictionary_new()
+{
+ dictionary *dict = malloc(sizeof(dictionary));
+ dict->data = NULL;
+ dict->key = NULL;
+ dict->next = NULL;
+ dict->prev = NULL;
+ dict->first = dict;
+ dict->data_type = DICTIONARY_OTHER_TYPE;
+ return dict;
+}
+
+/**yon_dictionary_copy(dictionary *dict)
+ * [EN]
+ *
+ * [RU]
+ * Создаёт и возвращает копию элемента словаря [dict]
+*/
+dictionary *yon_dictinoary_copy(dictionary *dict){
+ dictionary *dct = yon_dictionary_new_with_data(dict->key,dict->data);
+ dct->data_type= dict->data_type;
+}
+
+/**yon_dictionary_copy_deep(dictionary *dict)
+ * [EN]
+ *
+ * [RU]
+ * Создаёт полную копию словаря [dict] и возвращает первый элемент
+*/
+dictionary *yon_dictionary_copy_deep(dictionary *dict){
+ dictionary *dct = NULL;
+ dictionary *newone=NULL;
+ for_dictionaries(dct,dict){
+ yon_dictionary_add_or_create_if_exists_with_data(newone,dct->key,dct->data);
+ newone->data_type=dct->data_type;
+ }
+ return newone->first;
+}
+
+/**int yon_dictionary_set_data(dictionary *dict, void *data)
+ * [EN]
+ *
+ * [RU]
+ * Установить элементу словаря [dict] значение [data]
+*/
+int yon_dictionary_set_data(dictionary *dict, void *data){
+ dict->data=data;
+}
+
+/**int yon_dictionary_set_key(dictionary *dict, char *key)
+ * [EN]
+ *
+ * [RU]
+ * Изменяет ключ элемента словаря [dict] на [key]
+*/
+int yon_dictionary_set_key(dictionary *dict, char *key){
+ dict->key=key;
+}
+
+/** int yon_dictionary_set(dictionary *dict, char *key, void *data)
+ * [EN]
+ *
+ * [RU]
+* Устанавливает значение ключа элемента словаря [dict] на [key] и его данные на [data]
+*/
+int yon_dictionary_set(dictionary *dict, char *key, void *data){
+ dict->key=key;
+ dict->data=data;
+}
+
+/**int yon_dictionary_empty(dictionary *dict)
+ * [EN]
+ *
+ * [RU]
+ * Очищает элемент словаря [dict] от данных
+*/
+int yon_dictionary_empty(dictionary *dict){
+ dict->data=NULL;
+ dict->data_type=DICTIONARY_OTHER_TYPE;
+}
+
+/**yon_dictionary_switch_to_last(dictionary **dict)
+ * [EN]
+ *
+ * [RU]
+ * Переключает словарь [dict] на последний элемент.
+*/
+void yon_dictionary_switch_to_last(dictionary **dict)
+{
+ dictionary *dct=NULL, *dact=*dict;
+ for_dictionaries(dct,dact);
+}
+
+/**yon_dictionary_create_conneced(dictionary *targetdict)
+ * [EN]
+ *
+ * [RU]
+ * Создаёт новый элемент словаря [targetdict]
+*/
+dictionary *yon_dictionary_append(dictionary *targetdict)
+{
+ targetdict = yon_dictionary_get_last(targetdict);
+ targetdict->next = yon_dictionary_new();
+ targetdict->next->prev = targetdict;
+ targetdict->next->first = targetdict->first;
+ targetdict->next->data_type = DICTIONARY_OTHER_TYPE;
+ return targetdict->next;
+}
+
+/**yon_dictionary_get_last(dictionary *dict)
+ * [EN]
+ *
+ * [RU]
+ * Возвращает последний элемент словаря [dict].
+ * В отличае от yon_dictionary_switch_to_last()
+ * словарь [dict] остаётся на прежнем элементе.
+*/
+dictionary *yon_dictionary_get_last(dictionary *dict)
+{
+ if (dict->next){
+ dictionary *dct = NULL;
+ for_dictionaries(dct,dict);
+ return dct;
+ } else return dict;
+}
+
+/**yon_dictionary_switch_places(dictionary *dict, int aim)
+ * [EN]
+ *
+ * [RU]
+ * Меняет элемент словаря [dict] местами с другим элементом.
+ * если [aim]<0 элемент меняется местами с левым элементом;
+ * если [aim]>0 элемент меняется местами с правым элементом;
+*/
+dictionary *yon_dictionary_swap(dictionary *dict, int aim)
+{
+ if (aim < 0)
+ {
+ if (dict->prev)
+ {
+ if (dict->prev->prev)
+ {
+ dictionary *next = dict->next, *prev = dict->prev, *preprev = prev->prev;
+ if (next)
+ {
+ preprev->next = dict;
+ dict->prev = preprev;
+ dict->next = prev;
+ prev->prev = dict;
+ prev->next = next;
+ next->prev = prev;
+ }
+ else
+ {
+ preprev->next = dict;
+ dict->prev = preprev;
+ dict->next = prev;
+ prev->prev = dict;
+ prev->next = NULL;
+ }
+ return prev;
+ }
+ else
+ {
+ dictionary *next = dict->next, *prev = dict->prev;
+ if (next)
+ {
+ yon_dictionary_make_first(dict);
+ dict->prev = NULL;
+ dict->next = prev;
+ prev->prev = dict;
+ prev->next = next;
+ next->prev = prev;
+ }
+ else
+ {
+ dict->prev = NULL;
+ dict->next = prev;
+ prev->prev = dict;
+ prev->next = NULL;
+ }
+ return prev;
+ }
+ }
+ }
+ else if (aim > 0)
+ {
+ if (dict->next)
+ {
+ if (dict->next->next)
+ {
+ dictionary *next = dict->next, *prev = dict->prev, *afnext = next->next;
+ if (prev)
+ {
+ prev->next = next;
+ next->prev = prev;
+ next->next = dict;
+ dict->prev = next;
+ dict->next = afnext;
+ afnext->prev = dict;
+ }
+ else
+ {
+ yon_dictionary_make_first(next);
+ next->prev = NULL;
+ next->next = dict;
+ dict->prev = next;
+ dict->next = afnext;
+ afnext->prev = dict;
+ }
+ return next;
+ }
+ else
+ {
+ dictionary *next = dict->next, *prev = dict->prev;
+ if (prev)
+ {
+ prev->next = next;
+ next->prev = prev;
+ next->next = dict;
+ dict->prev = next;
+ dict->next = NULL;
+ }
+ else
+ {
+ next->prev = NULL;
+ next->next = dict;
+ dict->prev = next;
+ dict->next = NULL;
+ }
+ }
+ }
+ }
+}
+
+/**yon_dictionary_make_first(dictionary *dict)
+ * [EN]
+ *
+ * [RU]
+ * Устанавливает указатель первого элемента словаря [dict]
+ * на текущий элемент. Не использовать.
+*/
+void yon_dictionary_make_first(dictionary *dict)
+{
+ for (dictionary *dct = dict->first; dct != NULL; dct = dct->next)
+ {
+ dct->first = dict;
+ }
+}
+
+/**yon_dictionary_make_nth(dictionary *dict, int nth)
+ * [EN]
+ *
+ * [RU]
+ * Перемещает элемент словаря [dict] на позицию [nth].
+*/
+void yon_dictionary_make_nth(dictionary *dict, int nth)
+{
+ dictionary *dct = dict->first;
+ for (int i = 0; i < nth; i++)
+ {
+ if (dct == NULL)
+ return;
+ else
+ dct = dct->next;
+ }
+ yon_dictionary_rip(dict);
+ dictionary *prev = dct->prev;
+ prev->next = dict;
+ dict->prev = prev;
+ dict->next = dct;
+ dct->prev = dict;
+}
+
+/**yon_dictionary_create_with_data(char *key, void *data)
+ * [EN]
+ *
+ * [RU]
+ * Создаёт новый словарь с ключом [key] и указателем на данные [data]
+*/
+dictionary *yon_dictionary_new_with_data(char *key, void *data)
+{
+ dictionary *dct = yon_dictionary_new();
+ dct->key = yon_char_new(key);
+ dct->data = data;
+ dct->data_type = DICTIONARY_OTHER_TYPE;
+ return dct;
+}
+
+/** void *yon_dictionary_free_all(dictionary *dictionary,void *data_manipulation)
+ * [EN]
+ * Frees whole [dictionary] and activates [data_manipulation] function if not NULL with [dictionary]->data argument for each dictionary.
+ * [RU]
+ * Освобождает память для всех элементов словаря [dictionary] и активирует функцию [data_manipulation], если она была передана, с аргументом [dictionary]->data на каждый элемент словаря.
+*/
+void *yon_dictionary_free_all(dictionary *dictionary_to_free,void (*data_manipulation)(void*)){
+ dictionary *dict=NULL;
+ for_dictionaries(dict,dictionary_to_free){
+ if(data_manipulation)
+ data_manipulation(dict->data);
+ if(dict->prev)
+ free(dict->prev);
+ }
+ free(dict);
+ return NULL;
+}
+
+/**yon_dictionary_create_with_data_connected(dictionary *dict, char *key, void *data)
+ * [EN]
+ *
+ * [RU]
+ * Создаёт новый элемент словаря, присоединяемый в конец словаря [dict]
+ * с ключом [key] и указателем на данные [data]
+*/
+dictionary *yon_dictionary_append_with_data(dictionary *dict, char *key, void *data)
+{
+ dictionary *dct = yon_dictionary_append(dict);
+ dct->key = yon_char_new(key);
+ dct->data = data;
+ dct->data_type = DICTIONARY_OTHER_TYPE;
+ return dct;
+}
+
+/**yon_dictionary_connect(dictionary *old, dictionary *toconnect)
+ * [EN]
+ *
+ * [RU]
+ * Присоединяет словарь [toconnect] в конец словаря [old].
+*/
+dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect)
+{
+ dictionary *dict = yon_dictionary_get_last(old);
+ dict->next = toconnect;
+ toconnect->prev = dict;
+ toconnect->first = dict->first;
+ return toconnect;
+}
+
+/**yon_dictionary_get(dictionary **dict, char *key)
+ * [EN]
+ *
+ * [RU]
+ * Возвращает элемент словаря [dict] с ключом [key].
+ * Если такого элемента не было обнаружено, возвращается NULL
+*/
+dictionary *yon_dictionary_get(dictionary **dict, char *key)
+{
+ dictionary *dct = *dict;
+ for (dictionary *pointer = dct->first; pointer != NULL; pointer = pointer->next)
+ {
+ if (strcmp(pointer->key, key) == 0)
+ {
+ *dict = pointer;
+ return pointer;
+ }
+ }
+ return NULL;
+}
+
+/**yon_dictionary_rip(dictionary *dict)
+ * [EN]
+ *
+ * [RU]
+ * Вырезает элемент из словаря и возвращает вырезанный элемент.
+*/
+dictionary *yon_dictionary_rip(dictionary *dict)
+{
+ if (!dict->next&&!dict->prev) return NULL;
+ else if (!dict->next)
+ {
+ dictionary *prev = dict->prev;
+ if (prev)
+ {
+ prev->next = NULL;
+ return prev;
+ }
+ else
+ return dict;
+ }
+ else if (!dict->prev)
+ {
+ dictionary *next = dict->next;
+ if (next)
+ {
+ yon_dictionary_make_first(next);
+ next->prev = NULL;
+ return next;
+ }
+ else
+ return dict;
+ }
+ else
+ {
+ dictionary *next = dict->next, *prev = dict->prev;
+ next->prev = prev;
+ prev->next = next;
+ return next;
+ }
+}
+
+/**yon_dictionary_get_nth(dictionary *dict, int place)
+ * [EN]
+ *
+ * [RU]
+ * Возвращает [place]-й элемент словаря [dict]
+*/
+dictionary *yon_dictionary_get_nth(dictionary *dict, int place)
+{
+ if (dict){
+ dict = dict->first;
+ int i = 0;
+ for (i = 0; i < place; i++)
+ if (dict->next)
+ dict = dict->next;
+ else
+ break;
+ if (i == place)
+ return dict;
+ else
+ return NULL;
+ } else return NULL;
+}
+
+// char functions
+
+/**[EN]
+ *
+ * creates new char string by combining two char strings.
+ */
+char *yon_char_append(char *source, char *append)
+{
+ if (source && append)
+ {
+ int size = strlen(source) + strlen(append) + 1;
+ char *final = malloc(size);
+ memset(final, 0, size);
+ if (strstr(source, "%%"))
+ sprintf(final, source, append);
+ else
+ sprintf(final, "%s%s", source, append);
+ return final;
+ }
+ else
+ return NULL;
+}
+
+/**[EN]
+ *
+ * creates new char string by copying another char.
+ */
+char *yon_char_new(char *chr)
+{
+ if (chr){
+ char *newchar = malloc(strlen(chr) + 1);
+ memset(newchar, 0, strlen(chr) + 1);
+ memcpy(newchar, chr, strlen(chr));
+ return newchar;
+ } else
+ return NULL;
+}
+
+/**yon_char_unite(char *source, ...)
+ * [En]
+ *
+ * [RU]
+ * Объединяет строку [source] со всеми строками, написанными в [...]
+*/
+char *yon_char_unite(char *source, ...){
+ va_list arglist;
+ char *new_char=NULL;
+ char *unite_char=NULL;
+ new_char=yon_char_new(source);
+ va_start(arglist,source);
+ unite_char = va_arg(arglist,char*);
+ while(unite_char){
+ new_char = yon_char_append(new_char,unite_char);
+ unite_char = va_arg(arglist,char*);
+ }
+ va_end(arglist);
+ return new_char;
+}
+
+/**yon_cut(char *source, int size, int startpos)
+ * [EN]
+ * cuts source string by size length from startpos position.
+ */
+char *yon_cut(char *source, int size, int startpos)
+{
+ char *cut = NULL;
+ cut = malloc(size + 1);
+ memset(cut, 0, size + 1);
+ memcpy(cut, source + startpos, size);
+ return cut;
+}
+
+/**yon_char_divide(char *source, int dividepos)
+ * [EN]
+ * divides source string in dividepos position,
+ * returning left part of divided string and
+ * inserting right part to source string.
+ */
+char *yon_char_divide(char *source, int dividepos)
+{
+ char *cut = malloc(dividepos + 1);
+ memset(cut, 0, dividepos + 1);
+ memcpy(cut, source, dividepos);
+ char *left = malloc(strlen(source) - strlen(cut));
+ memset(left, 0, strlen(source) - strlen(cut));
+ memcpy(left, source + dividepos + 1, (strlen(source) - dividepos));
+ memset(source, 0, strlen(source));
+ memcpy(source, left, strlen(left));
+ return cut;
+}
+
+/**yon_char_find_count(char *source, char *find)
+ * [EN]
+ *
+ * [RU]
+ * Считает количество символов [find] в строке [source]
+*/
+int yon_char_find_count(char *source, char *find){
+ char *working_string=yon_char_new(source);
+ int i=0;
+ int size=0;
+ int pos=0;
+ config_str rtn = yon_char_parse(working_string,&size,"\n");
+ for (int j=0;j= 10; i++)
+ {
+ convert_check = convert_check / 10;
+ }
+ char *ch = g_malloc0(i * sizeof(char) + 1);
+ sprintf(ch, "%d", int_to_convert);
+ return ch;
+}
+
+/**yon_char_replace(char *source, char *find, char*replace)
+ * [EN]
+ *
+ * [RU]
+ * Заменяет в строке [source] все вхождения строки [find] на [replace]
+*/
+char *yon_char_replace(char *source, char *find, char*replace){
+ char *final=NULL;
+ char *temp=NULL;
+ if(!strstr(replace,find)){
+ while ((final=strstr(source,find))){
+ temp=malloc(strlen(source)-strlen(final));
+ memset(temp,0,strlen(source)-strlen(final)+strlen(replace));
+ memcpy(temp,source,strlen(source)-strlen(final));
+ temp=yon_char_append(temp,replace);
+ source=yon_char_append(temp,final+1);
+ }
+ return source;
+ }
+}
+
+/**yon_char_parse(char *parameters, int *size, char *divider)
+ * [EN]
+ * Parses string [parameters], divided by [divider],
+ * then returns parsed string array and sets [size] to
+ * size of returned array
+*/
+char **yon_char_parse(char *parameters, int *size, char *divider){
+ char **string=NULL;
+ int i=1;
+ string=malloc(sizeof(char*));
+ char *paramline=yon_char_new(parameters);
+ char *param;
+ while ((param=yon_char_divide_search(paramline,divider,1))){
+ string=realloc(string,sizeof(char*)*i);
+ string[i-1]=yon_char_new(param);
+ i++;
+ if (strcmp(param,paramline)==0) break;
+ }
+ string=realloc(string,sizeof(char*)*i);
+ string[i-1]=yon_char_new(paramline);
+ i++;
+ // printf("%d\n",i);
+ *size=i-1;
+ return string;
+
+}
+
+/**yon_char_parsed_rip(char **char_string, int *size, int item_to_delete)
+ * [EN]
+ *
+ * [RU]
+ * Удаляет элемент [item_to_delete] из массива строк [char_string], размера [size]
+ * Возвращает получившийся массив, в [size] загружается размер нового массива.
+*/
+char **yon_char_parsed_rip(char **char_string, int *size, int item_to_delete){
+ char **new_char_parsed=NULL;
+ new_char_parsed=malloc(sizeof(char*)*((*size)-1));
+ int flag = 0;
+ for (int i=0;i < (*size);i++){
+ if (i==item_to_delete) {
+ flag = 1;
+ }
+ if (flag == 0) {
+ new_char_parsed[i]=yon_char_new(char_string[i]);
+ }
+ else if (flag == 1 && i!=item_to_delete) {
+ new_char_parsed[i-1]=yon_char_new(char_string[i]);
+ }
+ }
+ (*size)=(*size)-1;
+ return new_char_parsed;
+}
+
+/**yon_char_parsed_check_exist(char **parameters, int size, char *param)
+ * [EN]
+ * Checks if [parameters] string array of length [size]
+ * has [param] element;
+ * [RU]
+ * Проверяет есть ли в массиве строк [parameters], размера [size]
+ * элемент [param]
+*/
+int yon_char_parsed_check_exist(char **parameters, int size, char *param){
+
+ for (int i=0;id_name);
+ file = fopen(path, "r");
+ if (strlen(de->d_name) > 9)
+ {
+ char *extension = strstr(path, ".");
+ if (extension != NULL)
+ {
+ if (strcmp(extension, ".desktop") == 0)
+ {
+ apps tempapp;
+ GKeyFile *gfile = g_key_file_new();
+ GError *err = NULL;
+ g_key_file_load_from_file(gfile, path, G_KEY_FILE_KEEP_TRANSLATIONS, NULL);
+ char *Type = g_key_file_get_string(gfile, "Desktop Entry", "Type", &err);
+ if (err)
+ {
+ printf("%s\n", err->message);
+ }
+ if (strcmp(Type, "Application") == 0)
+ tempapp.Type = 1;
+ else if (strcmp(Type, "pyApplication") == 0)
+ tempapp.Type = 2;
+ else
+ continue;
+ tempapp.Name = g_key_file_get_locale_string(gfile, "Desktop Entry", "Name", setlocale(LC_ALL, NULL), NULL);
+ if (tempapp.Name == NULL)
+ continue;
+ tempapp.Categories = g_key_file_get_string(gfile, "Desktop Entry", "Categories", NULL);
+ if (tempapp.Categories == NULL)
+ continue;
+ tempapp.Exec = g_key_file_get_string(gfile, "Desktop Entry", "Exec", NULL);
+ if (tempapp.Exec == NULL)
+ continue;
+ tempapp.Icon = g_key_file_get_string(gfile, "Desktop Entry", "Icon", NULL);
+ if (tempapp.Icon == NULL)
+ continue;
+ tempapp.Pluggable = g_key_file_get_boolean(gfile, "Desktop Entry", "Pluggable", NULL);
+ if (!tempapp.Pluggable)
+ tempapp.Pluggable = g_key_file_get_boolean(gfile, "Desktop Entry", "X-XfcePluggable", NULL);
+ if (tempapp.Pluggable)
+ tempapp.DualPluggable = g_key_file_get_boolean(gfile, "Desktop Entry", "X-UBLPluggable", NULL);
+ if (g_key_file_get_boolean(gfile, "Desktop Entry", "X-UBL-SettingsManager-Hidden", NULL) == 0)
+ if (size == 0)
+ {
+ applist = (apps *)malloc(size + 1 * sizeof(apps));
+ applist[0].Name = yon_char_new(tempapp.Name);
+ applist[0].Categories = yon_char_new(tempapp.Categories);
+ applist[0].Exec = yon_char_new(tempapp.Exec);
+ applist[0].Icon = yon_char_new(tempapp.Icon);
+ applist[0].Type = tempapp.Type;
+ applist[0].Pluggable = tempapp.Pluggable;
+ applist[0].DualPluggable = tempapp.DualPluggable;
+ size++;
+ }
+ else
+ {
+ applist = (apps *)realloc(applist, (size + 1) * sizeof(apps));
+ applist[size].Name = yon_char_new(tempapp.Name);
+ applist[size].Categories = yon_char_new(tempapp.Categories);
+ applist[size].Exec = yon_char_new(tempapp.Exec);
+ applist[size].Icon = yon_char_new(tempapp.Icon);
+ applist[size].Pluggable = tempapp.Pluggable;
+ applist[size].DualPluggable = tempapp.DualPluggable;
+ applist[size].Type = tempapp.Type;
+ size++;
+ }
+ }
+ }
+ }
+ }
+ }
+ *sizef = size;
+ return applist;
+};
+
+void yon_apps_sort(apps *applist, int size)
+{
+ apps tmp;
+ if (size > 2)
+ {
+ for (int i = 1; i < size; i++)
+ {
+ for (int j = 1; j < size; j++)
+ {
+ if (strcmp(applist[j].Name, applist[j - 1].Name) < 0)
+ {
+ tmp = applist[j];
+ applist[j] = applist[j - 1];
+ applist[j - 1] = tmp;
+ };
+ }
+ };
+ }
+};
+
+apps *yon_apps_get_by_name(apps *applist, char *name, int size)
+{
+ for (int i = 0; i < size; i++)
+ {
+ if (strcmp(applist[i].Name, name) == 0)
+ return &applist[i];
+ }
+ return NULL;
+};
+
+//config functions
+
+/**yon_config_load_register(char *command)
+ * [EN]
+ *
+ * [RU]
+ * Выполняет команду [command].
+ * Полученные данные парсятся и регистрируются в конфиг.
+*/
+int yon_config_load_register(char *command){
+ if (__yon__config__strings){
+ __yon__config__strings = yon_dictionary_free_all(__yon__config__strings,NULL);
+ }
+ FILE *output = popen(command, "r");
+ char **output_strings = NULL;
+ output_strings = malloc(sizeof(char));
+ int i = 0;
+ char str[4096];
+ memset(str, 0, 4096);
+ while (fgets(str, 4096, output))
+ {
+ if (strcmp(str, "") != 0&& strcmp(str,"(null)\n")!=0)
+ {
+ char *key = yon_char_divide_search(str,"=",-1);
+ yon_dictionary_add_or_create_if_exists_with_data(__yon__config__strings,key,str);
+ __yon__config__strings->data_type=DICTIONARY_CHAR_TYPE;
+ }
+ }
+ check_config
+ return 0;
+ else return 1;
+}
+
+/**yon_config_remove_by_key(char *key)
+ * [EN]
+ *
+ * [RU]
+ * Удаляет параметр конфига по ключу [key]
+*/
+int yon_config_remove_by_key(char *key){
+ check_config{
+ dictionary *dict = yon_dictionary_get(&__yon__config__strings,key);
+ if (dict){
+ yon_dictionary_rip(dict);
+ return 1;
+ }else return 0;
+ }
+ return 0;
+}
+
+/**yon_config_remove_by_data(void *data)
+ * [EN]
+ *
+ * [RU]
+ * Производит поиск по конфигу на наличие параметра со значением [data] и удаляет найденное значение из конфига.
+*/
+int yon_config_remove_by_data(void *data){
+ check_config{
+ dictionary *dict = NULL;
+ for_dictionaries(dict,__yon__config__strings){
+ if (dict->data==data){
+ yon_dictionary_rip(dict);
+ return 1;
+ }
+ }
+ return 0;
+ }
+ return 0;
+}
+
+/**yon_config_remove_element(char *key, char *deleted)
+ * [EN]
+ *
+ * [RU]
+ * Удаляет элемент [deleted] из массива параметров с ключом [key]
+*/
+int yon_config_remove_element(char *key, char *deleted){
+ check_config{
+ dictionary *dict = yon_dictionary_get(&__yon__config__strings,key);
+ char *data = (char*)dict->data;
+ char *found = strstr(data,deleted);
+ int size=strlen(data)-strlen(found)+1;
+ char *new_data = malloc(size);
+ memset(new_data,0,size);
+ if (strlen(found)!=strlen(deleted)){
+ memcpy(new_data,data,size-1);
+ new_data = yon_char_append(new_data,found+strlen(deleted)+1);
+ } else {
+ memcpy(new_data,data,size-2);
+ new_data = yon_char_append(new_data,found+strlen(deleted));
+ }
+ dict->data=(void*)(new_data);
+ free(data);
+ dict->flag1=1;
+ return 1;
+ } else return 0;
+}
+
+/**yon_config_get_by_key(char *key)
+ * [EN]
+ *
+ * [RU]
+ * Возвращает значение параметра конфига с ключом [key]
+*/
+void *yon_config_get_by_key(char *key){
+ check_config{
+ dictionary *dict = NULL;
+ for_dictionaries(dict, __yon__config__strings){
+ if (strcmp(dict->key,key)==0){
+ return dict->data;
+ }
+ }
+ }
+ return NULL;
+}
+
+/**yon_config_get_key_by_data(char *data)
+ * [EN]
+ *
+ * [RU]
+ * Возвращает ключ параметра конфига со значением [data].
+ * Если параметр с таким значением не найден, возвращается NULL
+*/
+char *yon_config_get_key_by_data(char *data){
+ check_config{
+ dictionary *dict = NULL;
+ for_dictionaries(dict, __yon__config__strings){
+ if (strcmp(((char*)dict->data),data)==0){
+ return dict->key;
+ }
+ }
+ }
+ return NULL;
+}
+
+/**yon_config_set(char *key, void *data)
+ * [EN]
+ *
+ * [RU]
+ * Производит поиск по конфигу и заменяет значение параметра с ключом [key] на новое значение [data];
+*/
+int yon_config_set(char *key, void *data){
+ check_config{
+ dictionary *dict = yon_dictionary_get(&__yon__config__strings,key);
+ dict->data=data;
+ return 1;
+ } else return 0;
+}
+
+/**yon_config_clean()
+ * [EN]
+ * Erase all parameters from config;
+ * [RU]
+ * Удаляет все параметры из конфига;
+*/
+int yon_config_clean(){
+ check_config{
+ __yon__config__strings = yon_dictionary_free_all(__yon__config__strings, NULL);
+ return 1;
+ }
+ else return 0;
+}
+
+/**yon_config_register(char *key, void *data)
+ * [EN]
+ *
+ * [RU]
+ * Регистрирует новый параметр конфига.
+ * [key] - ключ параметра;
+ * [data] - значение параметра;
+*/
+void yon_config_register(char *key, void *data){
+ yon_dictionary_add_or_create_if_exists_with_data(__yon__config__strings,key,data);
+ __yon__config__strings->data_type=DICTIONARY_CHAR_TYPE;
+}
+
+/**yon_config_load(char *command, int *str_len)
+ * [EN]
+ *
+ * [RU]
+ * Выполняет команду [command] и возвращает распаршеный результат выполнения команды.
+ * В [str_len] возвращается длина возвращаемого массива
+*/
+config_str yon_config_load(char *command, int *str_len){
+ FILE *output = popen(command, "r");
+ char **output_strings = NULL;
+ output_strings = malloc(sizeof(char));
+ int i = 0;
+ char str[4096];
+ memset(str, 0, 4096);
+ while (fgets(str, 4096, output))
+ {
+ if (strcmp(str, "") != 0)
+ {
+ output_strings = realloc(output_strings, sizeof(char *) * (i + 1));
+ // printf("%s\n", str);
+ output_strings[i] = NULL;
+ output_strings[i] = yon_char_new(str);
+ memset(str, 0, 4096);
+ i++;
+ }
+ }
+ if (i>0){
+ *str_len = i;
+ return output_strings;
+ } else{
+ *str_len=-1;
+ return NULL;
+ }
+}
+
+/**int yon_config_save(char *command)
+ * [EN]
+ * Saves config with [command]
+ * [RU]
+ * Выполняет команду [command], добавляя в конец все записи конфига в таком виде:
+ * [ПАРАМЕТР1]="[значения1]" [ПАРАМЕТР2]="[значения2]"
+*/
+int yon_config_save_registered(char *command){
+ check_config{
+ dictionary *dict = NULL;
+ for_dictionaries(dict,__yon__config__strings){
+ command = yon_char_unite(command, " ", yon_dictionary_get_data(dict,char*), NULL);
+ }
+ if (popen(command, "r")) return 1;
+ else return 0;
+ } else return 0;
+}
+
+/**yon_config_get_all(int *size)
+ * [EN]
+ *
+ * [RU]
+ * Возвращает массив со всеми параметрами конфига, оканчивающаяся NULL
+ * [size] - указатель, в который выгружается длина массива
+*/
+config_str yon_config_get_all(int *size){
+ check_config{
+ *size = 1;
+ config_str conf = NULL;
+ dictionary *dict = NULL;
+ for_dictionaries(dict,__yon__config__strings){
+ conf = yon_remalloc(conf,sizeof(char*)*(*size));
+ conf[(*size)-1] = yon_char_unite(dict->key,"=",(char*)dict->data,NULL);
+ size++;
+ }
+ conf = yon_remalloc(conf,sizeof(char*)*(*size+1));
+ conf[*size] = NULL;
+ return conf;
+ } else return NULL;
+}
+
+/**char *yon_config_get_parameter(config parameters, int size, char *param)
+ * [EN]
+ * Gets parameter [param] from parameter list [parameters] of size [size];
+ * or NULL if nothing were found
+ * [RU]
+ * Возвращает параметр [param] из массива строк [parameters] размером [size]
+ * или NULL если такой не был найден
+*/
+char *yon_config_get_parameter(config_str parameters, int size, char *param)
+{
+ if (param[0]==' ')
+ yon_char_divide_search(param," ",-1);
+ param=yon_char_divide_search(yon_char_new(param)," ",-1);
+
+ char *str = NULL;
+ for (int j = 0; j < size; j++)
+ {
+ char *name = yon_char_divide_search(yon_char_new(parameters[j]), "=", 1);
+ if (name)
+ {
+ if (strcmp(name, param) == 0)
+ {
+ str = yon_char_divide_search(yon_char_new(parameters[j]), "\n", 1);
+ if (strcmp(str, "") != 0 && strcmp(str, "(null)") != 0)
+ return str;
+ else
+ return NULL;
+ }
+ }
+ }
+ return NULL;
+}
+
+
+
+// terminal-using functions
+
+/**yon_launch_app_with_arguments(char *name, char *args)
+ * [EN]
+ * Execute [command] in separate thread;
+ * [RU]
+ * Выполнить команду [command] в отдельном потоке;
+*/
+int yon_launch_app_with_arguments(char *name, char *args)
+{
+ char *path = yon_char_unite("/usr/bin/", name, " ", args,NULL);
+ pthread_t thread_id;
+ char *command = NULL;
+ command = path;
+ pthread_create(&thread_id, NULL, (void *)yon_launch, command);
+};
+
+/**yon_launch(char *command)
+ * [EN]
+ * Execute command [command]
+ * [RU]
+ * Выполнить команду [command]
+*/
+void yon_launch(char *command)
+{
+ system(command);
+}
+
+// Gtk functions
+
+
+#ifdef __GTK_H__
+
+
+static render_data render;
+
+#ifdef VTE_TERMINAL
+
+static void child_ready(VteTerminal *terminal, GPid pid, GError *error, gpointer user_data)
+{
+ if (!terminal) return;
+ if (pid == -1) printf("Error\n\n\n");
+ else vte_terminal_feed_child(VTE_TERMINAL(terminal),(char*)user_data,strlen((char*)user_data));
+}
+
+/**
+ * void yon_terminal_integrated_launch(GtkWidget *place_to_show, void *endwork_function, void* endwork_function_argument)
+ * [EN]
+ * launches terminal with specific [command],
+ * terminal is shown in [place_to_show] container,
+ * after terminal done its work [endwork_function] is called with [endwork_function_argument] argument.
+ * [RU]
+ * Запускает терминал с командой [command],
+ * терминал добавляется в контейнер [place_to_show] виджета,
+ * после завершения работы терминала вызывается функция [endwork_function] с аргументом [endwork_function_argument].
+*/
+void yon_terminal_integrated_launch(GtkWidget *place_to_show, char* command, void *endwork_function, void* endwork_function_argument){
+ char **commands=new_arr(char*,2);
+ gchar **envp = g_get_environ();
+ commands[0]=(gchar *)g_strdup(g_environ_getenv(envp, "SHELL"));
+ commands[1]=NULL;
+ char **env=new_arr(char*,2);
+ env[0]="";
+ env[1]=NULL;
+ GtkWidget *terminal = vte_terminal_new();
+ vte_terminal_set_size(VTE_TERMINAL(terminal),10,15);
+ VtePty *pty = vte_pty_new_sync(VTE_PTY_DEFAULT,NULL,NULL);
+ vte_terminal_set_pty(VTE_TERMINAL(terminal),pty);
+ gtk_container_add(GTK_CONTAINER(place_to_show),terminal);
+ char *install_command=yon_char_unite("tput cup 0 0 && tput ed; ",command," ; sleep 5;exit 0","\n",NULL);
+ printf("%s\n",install_command);
+ if(endwork_function)
+ g_signal_connect(G_OBJECT(terminal), "child-exited", G_CALLBACK(endwork_function), endwork_function_argument);
+ vte_terminal_spawn_async(VTE_TERMINAL(terminal),
+ VTE_PTY_DEFAULT,
+ NULL,
+ commands,
+ NULL,
+ 0,
+ NULL, NULL,
+ NULL,
+ -1,
+ NULL,
+ child_ready,
+ install_command);
+ vte_pty_spawn_async(pty,
+ NULL,
+ commands,
+ NULL,
+ 0,
+ NULL, NULL,
+ NULL,
+ -1,
+ NULL,
+ NULL,
+ NULL);
+ vte_terminal_set_scrollback_lines(VTE_TERMINAL(terminal), -1);
+ vte_terminal_set_scroll_on_output(VTE_TERMINAL(terminal), TRUE);
+ vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(terminal), TRUE);
+ gtk_widget_show_all(terminal);
+ }
+
+/**yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *endwork_function, void* endwork_function_argument)
+ * [EN]
+ * launches terminal with specific [command],
+ * terminal is shown in [place_to_show] container,
+ * after terminal done its work [endwork_function] is called with [endwork_function_argument] argument.
+ * [RU]
+ * Запускает терминал с командой [command],
+ * терминал добавляется в контейнер [place_to_show] виджета,
+ * после завершения работы терминала вызывается функция [endwork_function] с аргументом [endwork_function_argument].
+*/
+void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *endwork_function, void* endwork_function_argument){
+ char **commands=new_arr(char*,2);
+ gchar **envp = g_get_environ();
+ commands[0]=(gchar *)g_strdup(g_environ_getenv(envp, "SHELL"));
+ commands[1]=NULL;
+ char **env=new_arr(char*,2);
+ env[0]="";
+ env[1]=NULL;
+ vte_terminal_set_size(VTE_TERMINAL(terminal),10,15);
+ VtePty *pty = vte_pty_new_sync(VTE_PTY_DEFAULT,NULL,NULL);
+ vte_terminal_set_pty(VTE_TERMINAL(terminal),pty);
+ char *install_command=yon_char_unite("tput cup 0 0 && tput ed; ",command," ; sleep 5;exit 0","\n",NULL);
+ if(endwork_function)
+ g_signal_connect(G_OBJECT(terminal), "child-exited", G_CALLBACK(endwork_function), endwork_function_argument);
+ vte_terminal_spawn_async(VTE_TERMINAL(terminal),
+ VTE_PTY_DEFAULT,
+ NULL,
+ commands,
+ NULL,
+ 0,
+ NULL, NULL,
+ NULL,
+ -1,
+ NULL,
+ child_ready,
+ install_command);
+ vte_pty_spawn_async(pty,
+ NULL,
+ commands,
+ NULL,
+ 0,
+ NULL, NULL,
+ NULL,
+ -1,
+ NULL,
+ NULL,
+ NULL);
+ vte_terminal_set_scrollback_lines(VTE_TERMINAL(terminal), 100);
+ vte_terminal_set_scroll_on_output(VTE_TERMINAL(terminal), TRUE);
+ vte_terminal_set_scroll_on_keystroke(VTE_TERMINAL(terminal), TRUE);
+ gtk_widget_show_all(terminal);
+ }
+#endif
+
+ // Window config functions
+
+ #define check_window_config_setup if(__yon_window_config_target_window)
+
+ struct {
+ int x;
+ int y;
+ int width;
+ int height;
+ int fullscreen;
+ } __yon_main_window_config;
+
+ static GtkWindow *__yon_window_config_target_window = NULL;
+ static GKeyFile *__yon_window_config_file = NULL;
+ static char *__yon_window_config_path = NULL;
+
+ void yon_window_config_save(){
+ g_key_file_set_integer(__yon_window_config_file,"window","WindowPosX",__yon_main_window_config.x);
+ g_key_file_set_integer(__yon_window_config_file,"window","WindowPosY",__yon_main_window_config.y);
+ g_key_file_set_integer(__yon_window_config_file,"window","WindowWidth",__yon_main_window_config.width);
+ g_key_file_set_integer(__yon_window_config_file,"window","WindowHeight",__yon_main_window_config.height);
+ g_key_file_set_integer(__yon_window_config_file,"window","fullscreen",__yon_main_window_config.fullscreen);
+ g_key_file_save_to_file(__yon_window_config_file,__yon_window_config_path,NULL);
+ }
+
+ void yon_get_is_fullscreen(){
+ gtk_window_is_maximized(__yon_window_config_target_window);
+ __yon_main_window_config.fullscreen = gtk_window_is_maximized(__yon_window_config_target_window);
+ }
+
+ /**yon_on_configured_window_destroy(GtkWidget* self,GdkEvent* event)
+ * [EN]
+ *
+ * [RU]
+ * Сохраняет настройки основного окна. Вызывается когда основное окно уничтожается.
+ */
+ void yon_on_configured_window_destroy(GtkWidget* self,GdkEvent* event){
+ check_window_config_setup{
+ yon_get_is_fullscreen();
+ yon_window_config_save();
+ }
+ gtk_main_quit();
+ }
+
+ void __yon_window_config_on_resize(){
+ int max=0;
+ max=gtk_window_is_maximized(__yon_window_config_target_window);
+ if(max==0){
+ gtk_window_get_size(__yon_window_config_target_window,&__yon_main_window_config.width,&__yon_main_window_config.height);
+ gtk_window_get_position(__yon_window_config_target_window,&__yon_main_window_config.x,&__yon_main_window_config.y);
+ }
+ }
+
+ /**yon_window_config_setup(GtkWindow *window)
+ * [EN]
+ *
+ * [RU]
+ * Устанавливает указатель на окно для отслеживания его положения и размера
+ */
+ void yon_window_config_setup(GtkWindow *window){
+ __yon_window_config_target_window = window;
+ g_signal_connect(G_OBJECT(window),"delete-event",G_CALLBACK(yon_on_configured_window_destroy),NULL);
+ g_signal_connect(G_OBJECT(window),"check-resize"/*"configure-event"*/,G_CALLBACK(__yon_window_config_on_resize),NULL);
+ }
+
+ void _yon_maximize(void *data){
+ g_usleep(G_USEC_PER_SEC/10);
+ if(__yon_main_window_config.fullscreen ==1) gtk_window_maximize(__yon_window_config_target_window);
+ }
+
+ /**yon_window_config_load(char *path)
+ * [EN]
+ *
+ * [RU]
+ * Загружает конфиг окна и инициализирует отслеживание его параметров
+ */
+ int yon_window_config_load(char *path){
+ __yon_window_config_file = g_key_file_new();
+ __yon_window_config_path=yon_char_new(path);
+ if (!g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL)){
+ struct stat st;
+ int size;
+ config_str conf = yon_char_parse(yon_char_new(__yon_window_config_path),&size,"/");
+ char *path = yon_char_unite(conf[0],"/",conf[1],"/",conf[2],"/",conf[3],"/",conf[4],"/",NULL);
+ if (stat(path, &st) == -1) {
+ mkdir(path, 0777);
+ }
+ FILE *fp;
+ fp=fopen(__yon_window_config_path,"w");
+ fclose(fp);
+ g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL);
+ }
+ __yon_main_window_config.x = g_key_file_get_integer(__yon_window_config_file,"window","WindowPosX",NULL);
+ __yon_main_window_config.y = g_key_file_get_integer(__yon_window_config_file,"window","WindowPosY",NULL);
+ __yon_main_window_config.width = g_key_file_get_integer(__yon_window_config_file,"window","WindowWidth",NULL);
+ __yon_main_window_config.height = g_key_file_get_integer(__yon_window_config_file,"window","WindowHeight",NULL);
+ __yon_main_window_config.fullscreen = g_key_file_get_integer(__yon_window_config_file,"window","fullscreen",NULL);
+ if (__yon_main_window_config.width==0) __yon_main_window_config.width=800;
+ if (__yon_main_window_config.height==0) __yon_main_window_config.height=600;
+ gtk_window_resize(__yon_window_config_target_window,__yon_main_window_config.width,__yon_main_window_config.height);
+ gtk_window_move(__yon_window_config_target_window,__yon_main_window_config.x,__yon_main_window_config.y);
+ pthread_t tid;
+ pthread_create(&tid,NULL,(void *)_yon_maximize,NULL);
+ return 1;
+ }
+
+ void yon_window_config_apply(){
+ dictionary *dict=NULL;
+ gtk_window_move(__yon_window_config_target_window,__yon_main_window_config.x,__yon_main_window_config.y);
+ gtk_window_resize(__yon_window_config_target_window,__yon_main_window_config.width,__yon_main_window_config.height);
+ }
+
+GtkWidget *yon_ubl_menu_item_about_new(char *buttonname){
+ GtkWidget *menu_item = gtk_menu_item_new();
+ gtk_style_context_add_class(gtk_widget_get_style_context(menu_item),"menuitembottom");
+ GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0);
+ GtkWidget *label = gtk_label_new(buttonname);
+ GtkWidget *image = gtk_image_new_from_icon_name("dialog-information-symbolic",GTK_ICON_SIZE_BUTTON);
+ gtk_label_set_xalign(GTK_LABEL(label),0.0);
+ gtk_box_pack_start(GTK_BOX(box),image,0,0,5);
+ gtk_box_pack_start(GTK_BOX(box),label,0,0,5);
+ gtk_container_add(GTK_CONTAINER(menu_item),box);
+ gtk_widget_show_all(menu_item);
+ return menu_item;
+}
+
+GtkWidget *yon_ubl_menu_item_documentation_new(char *buttonname){
+ GtkWidget *menu_item = gtk_menu_item_new();
+ gtk_style_context_add_class(gtk_widget_get_style_context(menu_item),"menuitemtop");
+ GtkWidget *box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0);
+ GtkWidget *label = gtk_label_new(buttonname);
+ GtkWidget *image = gtk_image_new_from_icon_name("dialog-question-symbolic",GTK_ICON_SIZE_BUTTON);
+ gtk_label_set_xalign(GTK_LABEL(label),0.0);
+ gtk_box_pack_start(GTK_BOX(box),image,0,0,5);
+ gtk_box_pack_start(GTK_BOX(box),label,0,0,5);
+ gtk_container_add(GTK_CONTAINER(menu_item),box);
+ gtk_widget_show_all(menu_item);
+ return menu_item;
+}
+
+
+// other Gtk functions
+
+/**yon_gtk_combo_box_text_fill(GtkWidget *combo, config_str parameters,int size)
+ * [EN]
+ *
+ * [RU]
+ * Добавляет в Комбобокс [combo] все строки из массива строк [parameters] размера [size]
+*/
+int yon_gtk_combo_box_text_fill(GtkWidget *combo, config_str parameters,int size){
+ if (combo&¶meters){
+ for (int i=0;imessage);
+ g_error_free(err);
+ }
+ if (type == BACKGROUND_IMAGE_SUCCESS_TYPE||! type)
+ {
+ gtk_style_context_remove_class(gtk_widget_get_style_context(data.box), "boxInfoMessError");
+ gtk_style_context_add_class(gtk_widget_get_style_context(data.box), "boxInfoMessOK");
+ gtk_image_set_from_pixbuf(GTK_IMAGE(data.icon), gtk_icon_theme_load_icon_for_scale(ictheme, "com.ublinux.ubl-settings-video.checked", 25, 1, GTK_ICON_LOOKUP_FORCE_SIZE, &err));
+ }
+ else if (type == BACKGROUND_IMAGE_FAIL_TYPE)
+ {
+ gtk_style_context_remove_class(gtk_widget_get_style_context(data.box), "boxInfoMessOK");
+ gtk_style_context_add_class(gtk_widget_get_style_context(data.box), "boxInfoMessError");
+ gtk_image_set_from_pixbuf(GTK_IMAGE(data.icon), gtk_icon_theme_load_icon_for_scale(ictheme, "com.ublinux.ubl-settings-video.warning", 25, 1, GTK_ICON_LOOKUP_FORCE_SIZE, &err));
+ }
+ if (text)
+ gtk_label_set_text(GTK_LABEL(data.label), text);
+}
+
+void yon_ubl_status_box_render(char *text, BACKGROUND_IMAGE_TYPE type){
+ _yon_ubl_status_box_render(text,type);
+}
+
+/**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)
+ * [EN]
+ * Set up plugs for using with GtkSockets insine ubl-settings-manager.
+ * [main_window] is container widget, which holds main application functionality.
+ * [left_window] is container widget, which holds widgets, have to be shown at left part of ubl-settings-manager header.
+ * [right_window] is container widget, which holds widgets, have to be shown at right part of ubl-settings-manager header.
+ * [socket_main_id] is id of socket for [main_window].
+ * [socket_left_id] is id of socket for [left_window].
+ * [socket_right_id] is id of socket for [right_window].
+ * [RU]
+ * Настраивает плаги для работы с сокетами в утилите ubl-settings-manager.
+ * [main_window] - контейнер основного интерфейса приложения.
+ * [left_window] - контейнер для виджетов которые должны отображаться в левой части шапки ubl-settings-manager.
+ * [right_window] - контейнер для виджетов которые должны отображаться в правой части шапки ubl-settings-manager.
+ * [socket_main_id] - id сокета для [main_window].
+ * [socket_left_id] - id сокета для [left_window].
+ * [socket_right_id] - id сокета для [right_window].
+*/
+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){
+ if (main_window&&socket_main_id>-1){
+ gtk_widget_hide(gtk_widget_get_toplevel(main_window));
+ GtkWidget *plug_main=gtk_plug_new(socket_main_id);
+ GtkWidget *plug_left=NULL;
+ GtkWidget *plug_right=NULL;
+ GtkWidget *box=NULL;
+ g_signal_connect(G_OBJECT(plug_main), "destroy", G_CALLBACK(gtk_main_quit),NULL);
+ if (socket_left_id>-1&&left_window){
+ plug_left=gtk_plug_new(socket_left_id);
+ g_object_ref(left_window);
+ gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(left_window)),left_window);
+ gtk_container_add(GTK_CONTAINER(plug_left),left_window);
+ gtk_style_context_add_class(gtk_widget_get_style_context(plug_left),"primary-toolbar");
+ gtk_style_context_add_class(gtk_widget_get_style_context(left_window),"button");
+ gtk_style_context_add_class(gtk_widget_get_style_context(left_window),"opacited");
+ gtk_style_context_add_class(gtk_widget_get_style_context(left_window),"color");
+ gtk_style_context_add_class(gtk_widget_get_style_context(plug_left),"noborder");
+ gtk_widget_show(plug_left);
+ }
+ else if (left_window){
+ if (box==NULL){
+ box=gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
+ gtk_box_pack_start(GTK_BOX(main_window),box,0,0,5);
+ gtk_box_reorder_child(GTK_BOX(main_window),box,0);
+ gtk_widget_show(box);
+ }
+ gtk_style_context_add_class(gtk_widget_get_style_context(left_window),"inherited");
+ gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(left_window)),left_window);
+ gtk_box_pack_end(GTK_BOX(box),left_window,0,0,5);
+ }
+ if (socket_right_id>-1&&right_window){
+ plug_right=gtk_plug_new(socket_right_id);
+ g_object_ref(right_window);
+ gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(right_window)),right_window);
+ gtk_container_add(GTK_CONTAINER(plug_right),right_window);
+ gtk_style_context_add_class(gtk_widget_get_style_context(plug_right),"primary-toolbar");
+ gtk_style_context_add_class(gtk_widget_get_style_context(right_window),"button");
+ gtk_style_context_add_class(gtk_widget_get_style_context(right_window),"opacited");
+ gtk_style_context_add_class(gtk_widget_get_style_context(right_window),"color");
+ gtk_style_context_add_class(gtk_widget_get_style_context(plug_right),"noborder");
+ gtk_widget_show(plug_right);
+ }
+ else if (right_window){
+ if (box==NULL){
+ box=gtk_box_new(GTK_ORIENTATION_HORIZONTAL,5);
+ gtk_box_pack_start(GTK_BOX(main_window),box,0,0,5);
+ gtk_box_reorder_child(GTK_BOX(main_window),box,0);
+ gtk_widget_show(box);
+ }
+ gtk_style_context_add_class(gtk_widget_get_style_context(right_window),"inherited");
+ gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(right_window)),right_window);
+ gtk_box_pack_start(GTK_BOX(box),right_window,0,0,5);
+ }
+ g_object_ref(main_window);
+ gtk_container_remove(GTK_CONTAINER(gtk_widget_get_parent(main_window)),main_window);
+ gtk_container_add(GTK_CONTAINER(plug_main),main_window);
+ gtk_widget_show(plug_main);
+ }
+}
+
+#ifdef WEBKIT_FOUND
+
+/**yon_ubl_browser_window_open(char *link, char *browser_window_name)
+ * [EN]
+ * Launches integrated browser window, named [browser_window_name] at header with [link].
+ * [RU]
+ * Открывает встроенный браузер с именем [browser_window_name] и показываемой страницей по ссылке [link]
+*/
+void yon_ubl_browser_window_open(char *link, char *browser_window_name){
+ GtkWidget *browser=gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ GtkWidget *web_place=gtk_box_new(GTK_ORIENTATION_VERTICAL,0);
+ GtkWidget *header=gtk_header_bar_new();
+ GtkWidget *header_label=gtk_label_new(browser_window_name);
+ GtkWidget *WebView=webkit_web_view_new();
+ gtk_container_add(GTK_CONTAINER(browser),web_place);
+ gtk_window_set_titlebar(GTK_WINDOW(browser),header);
+ gtk_window_set_title(GTK_WINDOW(browser),browser_window_name);
+ gtk_widget_set_size_request(browser,800,600);
+ gtk_header_bar_set_custom_title(GTK_HEADER_BAR(header),header_label);
+ gtk_header_bar_set_show_close_button(GTK_HEADER_BAR(header),1);
+ webkit_web_view_load_uri(WEBKIT_WEB_VIEW(WebView),link);
+ gtk_box_pack_start(GTK_BOX(web_place),WebView,1,1,0);
+ gtk_widget_show_all(browser);
+}
+#else
+
+/**yon_ubl_browser_window_open(char *link, char *browser_window_name)
+ * [EN]
+ * Launches browser with [link].
+ * [browser_window_name] is't used. It's needed for compatibility with webkit version of that function.
+ * [RU]
+ * Открывает браузер со страницей по ссылке [link]
+ * [browser_window_name] не используется. Нужна для совместимости с webkit версией этой функции.
+*/
+void yon_ubl_browser_window_open(char *link, char *browser_window_name){
+ char *user=getenv("SUDO_USER");
+ if (!user)
+ user=getlogin();
+ char *command=yon_char_unite("sudo -u ",user," xdg-open ", link,NULL);
+ yon_launch_app(command);
+}
+#endif
+
+#endif
\ No newline at end of file
diff --git a/source/model/ubl-utils.h b/source/model/ubl-utils.h
new file mode 100644
index 0000000..99d34cc
--- /dev/null
+++ b/source/model/ubl-utils.h
@@ -0,0 +1,345 @@
+#ifndef UBL_UTILS
+#define UBL_UTILS
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#define try bool __HadError=false;
+#define catch(x) ExitJmp:if(__HadError)
+#define throw(x) {__HadError=true;goto ExitJmp;}
+
+#include "../ubl-cmake.h"
+#ifdef WEBKIT_FOUND
+ #include
+#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)
+
+
+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;
+ int flag1;
+} dictionary;
+
+typedef struct apps
+{
+ char *Name;
+ int Type;
+ char *Categories;
+ char *Exec;
+ char *Icon;
+ int Pluggable;
+ int DualPluggable;
+} apps;
+
+typedef char** config_str;
+
+static dictionary *__yon__config__strings = NULL;
+#define check_config if(__yon__config__strings&&__yon__config__strings->data_type==DICTIONARY_CHAR_TYPE)
+
+#define config(key) yon_config_get_by_key(key)
+
+#define for_config dictionary temp = NULL; for_dictionary(temp,__yon__config__strings)
+
+#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
+
+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();
+
+// 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_str yon_config_load(char *command, int *str_len);
+
+int yon_config_save_registered(char *command);
+
+char *yon_config_get_parameter(config_str parameters, int size, char *param);
+
+int yon_config_load_register(char *command);
+
+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, 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
+
+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);
+
+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, ...);
+
+
+
+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
\ No newline at end of file
diff --git a/source/ubl-cmake.in b/source/ubl-cmake.in
new file mode 100644
index 0000000..d4623a7
--- /dev/null
+++ b/source/ubl-cmake.in
@@ -0,0 +1 @@
+#cmakedefine WEBKIT_FOUND
diff --git a/source/ubl-settings-diskquota.c b/source/ubl-settings-diskquota.c
new file mode 100644
index 0000000..0cd85d8
--- /dev/null
+++ b/source/ubl-settings-diskquota.c
@@ -0,0 +1,188 @@
+#include "ubl-settings-diskquota.h"
+
+
+
+//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(char *command){
+ if (yon_config_load_register(command))
+ yon_ubl_status_box_render(LOCAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
+ else
+ yon_ubl_status_box_render(LOAD_FAILED_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
+
+}
+
+// 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(main_window* widgets){
+ /* Widgets getting | Получение виджетов */
+ 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->DocumentationMenuItem = yon_ubl_menu_item_documentation_new(DOCUMENTATION_LABEL); // yon_gtk_builder_get_widget(builder,"DocumentationMenuItem");
+ widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL); // yon_gtk_builder_get_widget(builder,"AboutMenuItem");
+
+ 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);
+ }
+
+ /* Signal connection | Присоединение сигналов */
+ g_signal_connect(G_OBJECT(widgets->Window), "destroy", G_CALLBACK(gtk_main_quit), NULL);
+ 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),NULL);
+
+
+ gtk_widget_show(widgets->Window);
+ return widgets;
+}
+
diff --git a/source/ubl-settings-diskquota.h b/source/ubl-settings-diskquota.h
new file mode 100644
index 0000000..bfe4c6b
--- /dev/null
+++ b/source/ubl-settings-diskquota.h
@@ -0,0 +1,123 @@
+#ifndef UBL_SETTINGS_DISKQUOTA_H
+#define UBL_SETTINGS_DISKQUOTA_H
+#include
+#include
+#include "model/ubl-utils.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "ubl-cmake.h"
+#include "model/model.h"
+#include "model/load.h"
+#include "ubl-strings.h"
+#ifdef WEBKIT_FOUND
+ #include
+#endif
+#include "ubl-strings.h"
+
+#define WIKI_LINK "https://wiki.ublinux.ru/ru/Программное_обеспечение/Программы_и_утилиты/Все/ubl-settings-diskquota"
+
+
+#define VERSION_LABEL yon_char_unite(_("Version:")," ",version_application,"\n",NULL)
+#define glade_path "/com/ublinux/ui/ubl-settings-diskquota.glade"
+#define banner_path "/com/ublinux/images/ubl-settings-diskquota-banner.png"
+#define CssPath "/com/ublinux/css/ubl-settings-diskquota.css"
+#define config_path yon_char_unite("/home/",yon_ubl_root_user_get(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL)
+
+#define LocalePath "/usr/share/locale"
+#define LocaleName "ubl-settings-diskquota"
+
+static 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_settings_gui;
+
+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
+} main_window;
+
+typedef struct {
+ GtkWidget *treeViewMain;
+ GtkListStore *list;
+}
+custom_window;
+
+
+typedef struct {
+ GtkWidget *Window;
+
+ GtkWidget *HatText;
+ GtkWidget *HeaderText;
+ GtkWidget *InfoText;
+ GtkWidget *AlwaysOpenCheck;
+
+ GtkWidget *CloseButton;
+ GtkWidget *AcceptButton;
+} documentation_confirmation_window;
+
+typedef char* string;
+static string version_application="";
+static config_u_g_p* cfg_u_g_p = NULL;
+static config_general* cfg_general = NULL;
+static main_window* cfg_main_gui = NULL;
+static custom_window* cfg_custom_gui = NULL;
+static config_settings_gui main_config;
+
+main_window *setup_window(main_window* widgets);
+void on_about();
+void yon_open_browser(GtkWidget *self, char *link);
+void on_close_subwindow(GtkWidget *self);
+void on_link(GtkWidget *self, char* uri, gpointer user_data);
+void on_open_documentation_confirmation(GtkWidget *self, char *link);
+void yon_load_proceed(char *command);
+void event(main_window *widgets);
+
+void on_link(GtkWidget *self, char* uri, gpointer user_data);
+void config_init();
+#endif
diff --git a/source/ubl-strings.h b/source/ubl-strings.h
new file mode 100644
index 0000000..9bedb83
--- /dev/null
+++ b/source/ubl-strings.h
@@ -0,0 +1,62 @@
+#include
+#include
+#include
+#include
+#include
+#include
+#define _(String) gettext(String)
+
+
+#define HELP_LABEL yon_char_unite(_("ubl-settings-diskquota version:")," ", version_application,"\n",_(""),"\n",_("Usage:"), " ubl-settings-diskquota ",_("[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 _("")
+#define TITLE_INFO_LABEL _("")
+
+#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 SAVE_FAILED_LABEL
+
+#define STR_KB _("Kb")
+#define STR_MB _("Mb")
+#define STR_GB _("Gb")
+#define STR_TB _("Tb")
+
+
+#define CMD_LOAD_GLOBAL "ubconfig --default --source global get security DISK_QUOTA[*]"
+#define CMD_LOAD_SYSTEM "ubconfig --default --source system get security DISK_QUOTA[*]"
+#define CMD_SAVE_GLOBAL "ubconfig --default --target global set security"
+#define CMD_SAVE_SYSTEM "ubconfig --default --target system set security"
+#define CMD_ALL_SAVE "ubconfig set security "
+#define CMD_ALL_REMOVE "ubconfig remove security "
+#define CMD_REMOVE_GLOBAL "ubconfig --target global --noexecute remove security "
+#define CMD_REMOVE_SYSTEM "ubconfig --target system remove security "
\ No newline at end of file
diff --git a/source/view_add_p.c b/source/view_add_p.c
new file mode 100644
index 0000000..e69de29
diff --git a/source/view_add_p.h b/source/view_add_p.h
new file mode 100644
index 0000000..e69de29
diff --git a/source/view_add_u_g.c b/source/view_add_u_g.c
new file mode 100644
index 0000000..e69de29
diff --git a/source/view_add_u_g.h b/source/view_add_u_g.h
new file mode 100644
index 0000000..e69de29
diff --git a/source/view_check_user_table.c b/source/view_check_user_table.c
new file mode 100644
index 0000000..e69de29
diff --git a/source/view_check_user_table.h b/source/view_check_user_table.h
new file mode 100644
index 0000000..e69de29
diff --git a/source/view_edit_p.c b/source/view_edit_p.c
new file mode 100644
index 0000000..e69de29
diff --git a/source/view_edit_p.h b/source/view_edit_p.h
new file mode 100644
index 0000000..e69de29
diff --git a/source/view_edit_u_g.c b/source/view_edit_u_g.c
new file mode 100644
index 0000000..e69de29
diff --git a/source/view_edit_u_g.h b/source/view_edit_u_g.h
new file mode 100644
index 0000000..e69de29
diff --git a/source/view_filters.c b/source/view_filters.c
new file mode 100644
index 0000000..12ac641
--- /dev/null
+++ b/source/view_filters.c
@@ -0,0 +1,109 @@
+#include "filters.h"
+
+filters_window *filters_widgets = NULL;
+gboolean flag_filters[8];
+filters_window *filters_setup_window(char* glade_path){
+ if (filters_widgets == NULL) {
+ filters_widgets = malloc(sizeof(filters_window));
+ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path);
+ filters_widgets->Window = yon_gtk_builder_get_widget(builder,"wndFilters");
+ filters_widgets->chbFilterName = yon_gtk_builder_get_widget(builder,"chbFilterName");
+ filters_widgets->chbFilterSoftLimitFile = yon_gtk_builder_get_widget(builder,"chbFilterSoftLimitFile");
+ filters_widgets->chbFilterFiles = yon_gtk_builder_get_widget(builder,"chbFilterFiles");
+ filters_widgets->chbFilterHardLimitSizeDelay = yon_gtk_builder_get_widget(builder,"chbFilterHardLimitSizeDelay");
+ filters_widgets->chbFilterHardLimitSize = yon_gtk_builder_get_widget(builder,"chbFilterHardLimitSize");
+ filters_widgets->chbFilterSoftLimitSize = yon_gtk_builder_get_widget(builder,"chbFilterSoftLimitSize");
+ filters_widgets->chbFilterQuotas = yon_gtk_builder_get_widget(builder,"chbFilterQuotas");
+ filters_widgets->chbFilterSize = yon_gtk_builder_get_widget(builder,"chbFilterSize");
+ filters_widgets->btnFiltersCancel = yon_gtk_builder_get_widget(builder,"btnFiltersCancel");
+ filters_widgets->btnFiltersSave = yon_gtk_builder_get_widget(builder,"btnFiltersSave");
+ filters_widgets->chbFilterHardLimitFile = yon_gtk_builder_get_widget(builder,"chbFilterHardLimitFile");
+ filters_widgets->chbFilterHardLimitFileDelay = yon_gtk_builder_get_widget(builder,"chbFilterHardLimitFileDelay");
+ filters_widgets->chbTemplate = yon_gtk_builder_get_widget(builder,"chbTemplate");
+ if (filters_widgets->name == "Project") {
+
+ }
+
+ filters_event(filters_widgets);
+ }
+ filters_set_flag();
+ return filters_widgets;
+}
+void filters_set_name(string name) {
+ if (name == "Project") {
+ filters_widgets->name = name;
+ }
+
+}
+
+void filters_event(filters_window *widgets) {
+ g_signal_connect(G_OBJECT(widgets->btnFiltersCancel), "clicked",G_CALLBACK(filters_on_hide_subwindow),NULL);
+ g_signal_connect(G_OBJECT(widgets->Window), "destroy", G_CALLBACK(filters_destroy), NULL);
+}
+
+void filters_destroy(GtkWidget *self) {
+ filters_widgets = NULL;
+}
+
+void filters_localization(filters_window *widgets) {
+
+}
+
+void filters_on_hide_subwindow(GtkWidget *self) {
+ gtk_widget_destroy(gtk_widget_get_toplevel(self));
+ filters_widgets = NULL;
+}
+
+filters_window *get_widget_filters() {
+ return filters_widgets;
+}
+
+void filters_show(GtkWidget *self, char* glade_path) {
+ if (filters_widgets != NULL) {
+ gtk_widget_show_all(filters_widgets->Window);
+ }
+ else {
+ filters_setup_window(glade_path);
+ gtk_widget_show_all(filters_widgets->Window);
+ }
+}
+
+gboolean* filters_get_flag() {
+ flag_filters[0] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterName));
+ flag_filters[1] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterSoftLimitFile));
+ flag_filters[2] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterFiles));
+ flag_filters[3] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitSizeDelay));
+ flag_filters[4] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitSize));
+ flag_filters[5] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterQuotas));
+ flag_filters[6] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterSoftLimitSize));
+ flag_filters[7] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterSize));
+ flag_filters[8] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitFile));
+ flag_filters[9] = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitFileDelay));
+ return flag_filters;
+}
+
+void filters_init_flag() {
+ flag_filters[0] = 1;
+ flag_filters[1] = 1;
+ flag_filters[2] = 1;
+ flag_filters[3] = 1;
+ flag_filters[4] = 1;
+ flag_filters[5] = 1;
+ flag_filters[6] = 1;
+ flag_filters[7] = 1;
+ flag_filters[8] = 1;
+ flag_filters[9] = 1;
+}
+
+void filters_set_flag() {
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterName),flag_filters[0] );
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterSoftLimitFile), flag_filters[1]);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterFiles), flag_filters[2]);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitSizeDelay), flag_filters[3]);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitSize), flag_filters[4]);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterQuotas), flag_filters[5]);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterSoftLimitSize), flag_filters[6]);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterSize), flag_filters[7]);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitFile), flag_filters[8]);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(filters_widgets->chbFilterHardLimitFileDelay), flag_filters[9]);
+}
\ No newline at end of file
diff --git a/source/view_filters.h b/source/view_filters.h
new file mode 100644
index 0000000..d8e6761
--- /dev/null
+++ b/source/view_filters.h
@@ -0,0 +1,48 @@
+#ifndef FILTERS_H
+#define FILTERS_H
+#include
+#include
+#include "ubl-utils.h"
+#include "ubl-strings.h"
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include "philos_utils.h"
+#include
+
+// Переменные
+typedef struct {
+ GtkWidget* Window;
+ GtkWidget* btnFiltersSave;
+ GtkWidget* btnFiltersCancel;
+ GtkWidget* chbFilterName;
+ GtkWidget* chbFilterQuotas;
+ GtkWidget* chbFilterSize;
+ GtkWidget* chbFilterSoftLimitSize;
+ GtkWidget* chbFilterHardLimitSize;
+ GtkWidget* chbFilterHardLimitSizeDelay;
+ GtkWidget* chbFilterFiles;
+ GtkWidget* chbFilterSoftLimitFile;
+ GtkWidget* chbFilterHardLimitFile;
+ GtkWidget* chbFilterHardLimitFileDelay;
+ GtkWidget* chbTemplate;
+ string *name;
+} filters_window;
+
+// Функции
+filters_window *filters_setup_window(char* glade_path);
+void filters_event(filters_window *widgets);
+void filters_localization(filters_window *widgets);
+void filters_on_hide_subwindow(GtkWidget *self);
+filters_window *get_widget_filters();
+void filters_show(GtkWidget *self, char* glade_path);
+void filters_destroy(GtkWidget *self);
+int* filters_get_flag();
+void filters_init_flag();
+void filters_set_flag();
+void filters_set_name(char *name)
+#endif
\ No newline at end of file
diff --git a/ubl-settings-diskquota b/ubl-settings-diskquota
new file mode 100755
index 0000000..e71a301
Binary files /dev/null and b/ubl-settings-diskquota differ
diff --git a/ubl-settings-diskquota-banner.png b/ubl-settings-diskquota-banner.png
new file mode 100644
index 0000000..8eb67cb
Binary files /dev/null and b/ubl-settings-diskquota-banner.png differ
diff --git a/ubl-settings-diskquota.css b/ubl-settings-diskquota.css
new file mode 100644
index 0000000..8687d4a
--- /dev/null
+++ b/ubl-settings-diskquota.css
@@ -0,0 +1,108 @@
+
+.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: 5px 10px 3px 5px;
+ border:transparent;
+ }
+ .menuitemmiddle *{
+ margin:0 2px 0 2px;
+ padding: 3px 10px 3px 5px;
+ border:transparent;
+ }
+ .menuitembottom *{
+ margin:0 2px 2px 2px;
+ padding: 3px 10px 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: 5px 10px 3px 5px;
+ background:@theme_selected_bg_color;
+ border-radius:2px;
+ }
+ .menuitemmiddle:hover* {
+ margin:0 2px 0 2px;
+ padding: 3px 10px 3px 5px;
+ background:@theme_selected_bg_color;
+ border-radius:2px;
+ }
+ .menuitembottom:hover* {
+ margin:0 2px 2px 2px;
+ padding: 3px 10px 5px 5px;
+ background:@theme_selected_bg_color;
+ border-radius:2px;
+ }
+ .boxInfoMessError{
+ background-color: #ea9999;
+}
+
+.boxInfoMessOK{
+ background-color: #f3f0ac;
+}
\ No newline at end of file
diff --git a/ubl-settings-diskquota.desktop b/ubl-settings-diskquota.desktop
new file mode 100644
index 0000000..3343192
--- /dev/null
+++ b/ubl-settings-diskquota.desktop
@@ -0,0 +1,15 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=ubl-settings-diskquota
+Name[ru]=TEMPLATE
+GenericName=ubl-settings-diskquota
+GenericName[ru]=TEMPLATE
+Comment=ubl-settings-diskquota
+Comment[ru]=Приложение для TEMPLATE
+Type=Application
+Exec=pkexec ubl-settings-diskquota
+Icon=com.ublinux.ubl-settings-diskquota
+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;
diff --git a/ubl-settings-diskquota.glade b/ubl-settings-diskquota.glade
new file mode 100644
index 0000000..533cf49
--- /dev/null
+++ b/ubl-settings-diskquota.glade
@@ -0,0 +1,6508 @@
+
+
+
+
+
+
+
+
+
+
+
+ 100
+ 1
+ 10
+
+
+ 100
+ 1
+ 10
+
+
+ 100
+ 1
+ 10
+
+
+ 100
+ 1
+ 10
+
+
+ False
+ start
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ vertical
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Device:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ Quota use status:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 0
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ UserGropProject:
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ True
+
+
+ True
+ False
+ center
+
+
+ True
+ False
+ edit-find-symbolic
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ User-Group
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ True
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Currently using:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Soft limit
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ right
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 7
+ 0
+ adjustment1
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+ - KB
+ - MB
+ - GB
+ - TB
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Hard limit
+ 0
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ False
+ 5
+
+
+ True
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ right
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 7
+ 0
+ adjustment2
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+ - KB
+ - MB
+ - GB
+ - TB
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 4
+
+
+
+
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Size
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Currently using:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Soft limit
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+ False
+ right
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 7
+ 0
+ adjustment3
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ files
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Hard limit
+ 0
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+ False
+ right
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 7
+ 0
+ adjustment4
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ files
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 4
+
+
+
+
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Files
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+ True
+
+
+ True
+ False
+ end
+ 5
+ True
+
+
+ gtk-cancel
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ gtk-save
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+ start
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ vertical
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Device:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Quota use status:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Catalog
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ entrycompletion1
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+
+
+ True
+ False
+ gtk-zoom-fit
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ Review
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Project ID
+ 0
+
+
+ False
+ True
+ 0
+
+
+
+
+ Auto
+ True
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ entrycompletion2
+
+
+ True
+ True
+ 2
+
+
+
+
+ Generate
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+
+
+ False
+ True
+ 3
+
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Project Name
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ entrycompletion3
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 4
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ True
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Currently using:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Soft limit
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ right
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 7
+ 0
+ adjustment1
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+ - KB
+ - MB
+ - GB
+ - TB
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Hard limit
+ 0
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ False
+ 5
+
+
+ True
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ right
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 7
+ 0
+ adjustment2
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+ - KB
+ - MB
+ - GB
+ - TB
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 4
+
+
+
+
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Size
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Currently using:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Soft limit
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ right
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 7
+ 0
+ adjustment3
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ files
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Hard limit
+ 0
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ right
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 7
+ 0
+ adjustment4
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ files
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 4
+
+
+
+
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Files
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+ True
+
+
+ True
+ False
+ end
+ 5
+ True
+
+
+ gtk-cancel
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ gtk-save
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+
+
+
+
+
+
+ False
+ start
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ vertical
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Device:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Quota use status:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Catalog
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Project ID
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Project Name
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ entrycompletion4
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 4
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ True
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Currently using:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Soft limit
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ right
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 7
+ 0
+ adjustment1
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+ - KB
+ - MB
+ - GB
+ - TB
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Hard limit
+ 0
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ False
+ 5
+
+
+ True
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ right
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 7
+ 0
+ adjustment2
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+ - KB
+ - MB
+ - GB
+ - TB
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 4
+
+
+
+
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Size
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 0.019999999552965164
+ in
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Currently using:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Soft limit
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ right
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 7
+ 0
+ adjustment3
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ files
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Hard limit
+ 0
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ 5
+
+
+ True
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ right
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ 7
+ 0
+ adjustment4
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ files
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 4
+
+
+
+
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Files
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+ True
+
+
+ True
+ False
+ end
+ 5
+ True
+
+
+ gtk-cancel
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ gtk-save
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+
+
+
+
+
+ True
+ False
+ process-stop-symbolic
+
+
+ True
+ False
+ emblem-ok-symbolic
+
+
+ False
+ False
+ 450
+ dialog-question-symbolic
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ vertical
+ 10
+
+
+ True
+ False
+
+
+ True
+ False
+ start
+ 20
+ 20
+ dialog-question-symbolic
+ 6
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ start
+ start
+ 10
+ 10
+ You will be redirected to documentation website where documentation is
+translated and supported by community.
+ True
+ 0
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ Always redirect to online documentation
+ True
+ True
+ False
+ end
+ True
+
+
+
+ False
+ True
+ end
+ 2
+
+
+
+
+
+ True
+ True
+ 1
+
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ True
+ False
+ 30
+ True
+
+
+ Cancel
+ True
+ True
+ True
+ image8
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ Open documentation
+ True
+ True
+ True
+ image9
+
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+
+
+
+
+ False
+ start
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ vertical
+
+
+ True
+ True
+ in
+
+
+ True
+ False
+
+
+ True
+ True
+ liststore1
+
+
+
+
+
+
+
+
+
+
+
+
+ User
+
+
+
+
+
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+ True
+
+
+ True
+ False
+ end
+ 5
+ True
+
+
+ gtk-cancel
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ gtk-save
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 800
+ 600
+ False
+ 800
+ 600
+ com.ublinux.ubl-settings-diskquota
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 25
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ start
+ 5
+ 5
+ 5
+ 5
+ 6
+ 6
+ True
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+
+
+ 81
+ True
+ False
+
+
+ True
+ False
+ start
+
+
+ -1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+ True
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+ True
+ vertical
+
+
+ True
+ True
+
+
+ True
+ False
+ vertical
+
+
+ 300
+ True
+ True
+ in
+
+
+ True
+ False
+
+
+ True
+ True
+ liststore2
+ 0
+
+
+
+
+
+ Status
+ True
+
+
+
+
+
+
+
+ Quota type
+ True
+
+
+
+
+
+
+
+ Device
+Project
+ True
+
+
+
+
+
+
+
+ User
+ True
+
+
+
+
+
+
+
+ Group
+ True
+
+
+
+
+
+
+
+ Projects
+ True
+
+
+
+
+
+
+
+ Soft
+Restriction
+(size)
+ True
+
+
+
+
+
+
+
+ Severe
+limitation
+(size)
+ True
+
+
+
+
+
+
+
+ Soft
+Restriction
+(files)
+ True
+
+
+
+
+
+
+
+ Severe
+limitation
+(files)
+ True
+
+
+
+
+
+
+
+ Deferring
+(size)
+ True
+
+
+
+
+
+
+
+ Deferring
+(files)
+ True
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+
+
+ True
+ False
+ General statistics
+
+
+ False
+
+
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Device:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+ - Off
+ - Not set
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ vertical
+ 5
+ True
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Excess files delay period
+
+
+ False
+ True
+ end
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+
+ False
+ True
+ 0
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ weeks
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+
+ False
+ True
+ 0
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ days
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+
+ False
+ True
+ 0
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ hours
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+
+ False
+ True
+ 0
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ minutes
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 4
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ 100
+ True
+ True
+ in
+
+
+ True
+ False
+
+
+ True
+ True
+ liststore2
+ 0
+
+
+
+
+
+ Name
+ True
+
+
+
+
+
+
+
+ Quota
+ True
+
+
+
+
+
+
+
+ Size
+ True
+
+
+
+
+
+
+
+ Soft
+Restriction
+(size)
+ True
+
+
+
+
+
+
+
+ Severe
+limitation
+(size)
+ True
+
+
+
+
+
+
+
+ Soft
+Restriction
+(files)
+ True
+
+
+
+
+
+
+
+ Files
+
+
+
+
+
+
+
+ Severe
+limitation
+(files)
+ True
+
+
+
+
+
+
+
+ Deferring
+(size)
+ True
+
+
+
+
+
+
+
+ Deferring
+(files)
+ True
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+
+
+ True
+ False
+ com.ublinux.ubl-settings-diskquota.funnel
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ Filters
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ gtk-delete
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ gtk-edit
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ Edit
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ gtk-add
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ end
+ 1
+
+
+
+
+ False
+ True
+ end
+ 3
+
+
+
+
+ 1
+
+
+
+
+ True
+ False
+ Users
+
+
+ 1
+ False
+
+
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Device:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+ - Off
+ - Not set
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ vertical
+ 5
+ True
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Excess size delay period
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Excess files delay period
+
+
+ False
+ True
+ end
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ weeks
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ weeks
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ days
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ days
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ hours
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ hours
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ minutes
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ minutes
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 4
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ 100
+ True
+ True
+ in
+
+
+ True
+ False
+
+
+ True
+ True
+ liststore3
+ 0
+
+
+
+
+
+ Name
+ True
+
+
+
+
+
+
+
+ Quota
+ True
+
+
+
+
+
+
+
+ Size
+ True
+
+
+
+
+
+
+
+ Soft
+Restriction
+(size)
+ True
+
+
+
+
+
+
+
+ Severe
+limitation
+(size)
+ True
+
+
+
+
+
+
+
+ Soft
+Restriction
+(files)
+ True
+
+
+
+
+
+
+
+ Files
+
+
+
+
+
+
+
+ Severe
+limitation
+(files)
+ True
+
+
+
+
+
+
+
+ Deferring
+(size)
+ True
+
+
+
+
+
+
+
+ Deferring
+(files)
+ True
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+
+
+ True
+ False
+ com.ublinux.ubl-settings-diskquota.funnel
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ Filters
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ gtk-delete
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ gtk-edit
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ Edit
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ gtk-add
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ end
+ 1
+
+
+
+
+ False
+ True
+ end
+ 3
+
+
+
+
+ 2
+
+
+
+
+ True
+ False
+ Groups
+
+
+ 2
+ False
+
+
+
+
+ True
+ False
+ vertical
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Device:
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ 1
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+
+ - Off
+ - Not set
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ False
+ vertical
+ 5
+ True
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Excess size delay period
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ Excess files delay period
+
+
+ False
+ True
+ end
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ weeks
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ weeks
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ days
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ hours
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ hours
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 3
+
+
+
+
+ True
+ False
+ vertical
+ 5
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ minutes
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ 4
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ minutes
+ 0
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ 4
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ 100
+ True
+ True
+ in
+
+
+ True
+ False
+
+
+ True
+ True
+ liststore4
+ 0
+
+
+
+
+
+ ID
+ True
+
+
+
+
+
+
+
+ Project Name
+ True
+
+
+
+
+
+
+
+ Quota
+ True
+
+
+
+
+
+
+
+ Size
+ True
+
+
+
+
+
+
+
+ Soft
+Restriction
+(size)
+ True
+
+
+
+
+
+
+
+ Severe
+limitation
+(size)
+ True
+
+
+
+
+
+
+
+ Soft
+Restriction
+(files)
+ True
+
+
+
+
+
+
+
+ Files
+
+
+
+
+
+
+
+ Severe
+limitation
+(files)
+ True
+
+
+
+
+
+
+
+ Deferring
+(size)
+ True
+
+
+
+
+
+
+
+ Deferring
+(files)
+ True
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ 2
+
+
+
+
+ True
+ False
+
+
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+
+
+ True
+ False
+ com.ublinux.ubl-settings-diskquota.funnel
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ Filters
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+
+
+ gtk-delete
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+
+
+ True
+ False
+
+
+ True
+ False
+ 5
+ 5
+ gtk-edit
+
+
+ False
+ True
+ 0
+
+
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ Edit
+
+
+ False
+ True
+ 1
+
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ gtk-add
+ True
+ True
+ True
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ True
+
+
+ False
+ True
+ 2
+
+
+
+
+ False
+ True
+ end
+ 1
+
+
+
+
+ False
+ True
+ end
+ 3
+
+
+
+
+ 3
+
+
+
+
+ True
+ False
+ Project
+
+
+ 3
+ False
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+ False
+ True
+ 0
+
+
+
+
+ False
+ True
+ 2
+
+
+
+
+ True
+ True
+ 0
+
+
+
+
+
+
+
+
+
+ False
+ start
+ False
+
+
+ True
+ False
+ 5
+ 5
+ 5
+ 5
+ 5
+ 5
+ vertical
+
+
+ Name
+ True
+ True
+ False
+ start
+ 5
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+ Quotas
+ True
+ True
+ False
+ start
+ True
+
+
+ False
+ True
+ 1
+
+
+
+
+ Size
+ True
+ True
+ False
+ start
+ True
+
+
+ False
+ True
+ 2
+
+
+
+
+ Soft limit (size)
+ True
+ True
+ False
+ start
+ True
+
+
+ False
+ True
+ 3
+
+
+
+
+ Hard limit (size)
+ True
+ True
+ False
+ start
+ True
+
+
+ False
+ True
+ 4
+
+
+
+
+ True
+ False
+ end
+ 5
+ 5
+ True
+
+
+ gtk-cancel
+ True
+ True
+ True
+ center
+ True
+
+
+ False
+ True
+ 0
+
+
+
+
+
+ False
+ True
+ 1
+
+
+
+
+ False
+ True
+ end
+ 5
+
+
+
+
+ Hard limit (size) delay
+ True
+ True
+ False
+ start
+ True
+
+
+ False
+ True
+ 5
+
+
+
+
+ Files
+ True
+ True
+ False
+ start
+ True
+
+
+ False
+ True
+ 6
+
+
+
+
+ Soft limit (files)
+ True
+ True
+ False
+ start
+ True
+
+
+ False
+ True
+ 8
+
+
+
+
+ Hard limit (files)
+ True
+ True
+ False
+ start
+ True
+
+
+ False
+ True
+ 9
+
+
+
+
+ Hard limit (files) delay
+ True
+ True
+ False
+ start
+ True
+
+
+ False
+ True
+ 10
+
+
+
+
+ True
+ True
+ False
+ start
+ True
+
+
+ False
+ True
+ 11
+
+
+
+
+
+
+
+
+
diff --git a/ubl-settings-diskquota.pot b/ubl-settings-diskquota.pot
new file mode 100644
index 0000000..de55d1c
--- /dev/null
+++ b/ubl-settings-diskquota.pot
@@ -0,0 +1,724 @@
+# Language translations for ubl-settings-diskquota package.
+# Copyright (C) 2022, UBTech LLC
+# This file is distributed under the same license as the ubl-settings-diskquota package.
+# UBLinux Team , 2022
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2023-04-10 16:09+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid ""
+"You will be redirected to documentation website where documentation is\n"
+"translated and supported by community."
+msgstr ""
+
+msgid "ubl-settings-diskquota"
+msgstr ""
+
+msgid "Settings disk quotas - Addition"
+msgstr ""
+
+msgid "Settings disk quotas - Editing"
+msgstr ""
+
+msgid "Edit"
+msgstr ""
+
+msgid "Project ID"
+msgstr ""
+
+msgid "Catalog"
+msgstr ""
+
+msgid "Project Name"
+msgstr ""
+
+msgid "Auto"
+msgstr ""
+
+msgid "Review"
+msgstr ""
+
+msgid "Generate"
+msgstr ""
+
+msgid "User:"
+msgstr ""
+
+msgid "Group:"
+msgstr ""
+
+msgid "Projects:"
+msgstr ""
+
+msgid "Kb"
+msgstr ""
+
+msgid "Mb"
+msgstr ""
+
+msgid "Gb"
+msgstr ""
+
+msgid "Tb"
+msgstr ""
+
+msgid "Quota use status:"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:224 source/ubl-settings-diskquota.cc:154
+#: source/ubl-settings-diskquota.cc:144
+msgid "About"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:183 source/ubl-settings-diskquota.cc:113
+#: source/ubl-settings-diskquota.cc:103 source/ubl-settings-diskquota.cc:124
+#: source/ubl-settings-diskquota.cc:121 source/ubl-settings-diskquota.cc:118
+msgid "Configuration of disk quotas parameters for system groups and users"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:138 source/ubl-settings-diskquota.cc:68
+#: source/ubl-settings-diskquota.cc:60 source/ubl-settings-diskquota.cc:81
+#: source/ubl-settings-diskquota.cc:78 source/ubl-settings-diskquota.cc:75
+#: source/ubl-settings-diskquota.cc:74
+msgid "Copyright © UBSoft LLC, 2022 - "
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:201 source/ubl-settings-diskquota.cc:206
+#: source/ubl-settings-diskquota.cc:211 source/ubl-settings-diskquota.cc:131
+#: source/ubl-settings-diskquota.cc:136 source/ubl-settings-diskquota.cc:141
+#: source/ubl-settings-diskquota.cc:121 source/ubl-settings-diskquota.cc:126
+#: source/ubl-settings-diskquota.cc:142 source/ubl-settings-diskquota.cc:147
+#: source/ubl-settings-diskquota.cc:152 source/ubl-settings-diskquota.cc:139
+#: source/ubl-settings-diskquota.cc:144 source/ubl-settings-diskquota.cc:149
+msgid "Currently using:"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:216 source/ubl-settings-diskquota.cc:146
+#: source/ubl-settings-diskquota.cc:136 source/ubl-settings-diskquota.cc:157
+#: source/ubl-settings-diskquota.cc:154
+msgid "Currently using: "
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:62 source/ubl-settings-diskquota.cc:83
+#: source/ubl-settings-diskquota.cc:80 source/ubl-settings-diskquota.cc:77
+#: source/ubl-settings-diskquota.cc:76
+msgid "Date and Time"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:246 source/ubl-settings-diskquota.cc:381
+msgid ""
+"Deferring\n"
+"a hard\n"
+"limit\n"
+"(files)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:239 source/ubl-settings-diskquota.cc:374
+msgid ""
+"Deferring\n"
+"a hard\n"
+"limit\n"
+"(size)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:194
+msgid "Deferring a hard limit (files)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:189
+msgid "Deferring a hard limit (size)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:149 source/ubl-settings-diskquota.cc:181
+#: source/ubl-settings-diskquota.cc:182 source/ubl-settings-diskquota.cc:196
+#: source/ubl-settings-diskquota.cc:208 source/ubl-settings-diskquota.cc:79
+#: source/ubl-settings-diskquota.cc:111 source/ubl-settings-diskquota.cc:112
+#: source/ubl-settings-diskquota.cc:126 source/ubl-settings-diskquota.cc:138
+#: source/ubl-settings-diskquota.cc:69 source/ubl-settings-diskquota.cc:101
+#: source/ubl-settings-diskquota.cc:102 source/ubl-settings-diskquota.cc:116
+#: source/ubl-settings-diskquota.cc:128 source/ubl-settings-diskquota.cc:90
+#: source/ubl-settings-diskquota.cc:122 source/ubl-settings-diskquota.cc:123
+#: source/ubl-settings-diskquota.cc:137 source/ubl-settings-diskquota.cc:87
+#: source/ubl-settings-diskquota.cc:119 source/ubl-settings-diskquota.cc:120
+#: source/ubl-settings-diskquota.cc:134 source/ubl-settings-diskquota.cc:146
+#: source/ubl-settings-diskquota.cc:84 source/ubl-settings-diskquota.cc:117
+#: source/ubl-settings-diskquota.cc:83
+msgid "Device:"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:197 source/ubl-settings-diskquota.cc:207
+#: source/ubl-settings-diskquota.cc:127 source/ubl-settings-diskquota.cc:137
+#: source/ubl-settings-diskquota.cc:117 source/ubl-settings-diskquota.cc:138
+#: source/ubl-settings-diskquota.cc:148 source/ubl-settings-diskquota.cc:135
+#: source/ubl-settings-diskquota.cc:145
+msgid "Disk quotas for this device:"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:152 source/ubl-settings-diskquota.cc:153
+#: source/ubl-settings-diskquota.cc:82 source/ubl-settings-diskquota.cc:83
+#: source/ubl-settings-diskquota.cc:72 source/ubl-settings-diskquota.cc:73
+#: source/ubl-settings-diskquota.cc:93 source/ubl-settings-diskquota.cc:94
+#: source/ubl-settings-diskquota.cc:90 source/ubl-settings-diskquota.cc:91
+#: source/ubl-settings-diskquota.cc:87 source/ubl-settings-diskquota.cc:88
+#: source/ubl-settings-diskquota.cc:86
+msgid "Enable"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:597 source/ubl-settings-diskquota.cc:510
+#: source/ubl-settings-diskquota.cc:444
+msgid "Error saved local and global configuration"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:156 source/ubl-settings-diskquota.cc:158
+#: source/ubl-settings-diskquota.cc:86 source/ubl-settings-diskquota.cc:88
+#: source/ubl-settings-diskquota.cc:76 source/ubl-settings-diskquota.cc:78
+#: source/ubl-settings-diskquota.cc:97 source/ubl-settings-diskquota.cc:99
+#: source/ubl-settings-diskquota.cc:94 source/ubl-settings-diskquota.cc:96
+#: source/ubl-settings-diskquota.cc:91 source/ubl-settings-diskquota.cc:93
+#: source/ubl-settings-diskquota.cc:90 source/ubl-settings-diskquota.cc:92
+msgid "Excess files delay period"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:155 source/ubl-settings-diskquota.cc:157
+#: source/ubl-settings-diskquota.cc:85 source/ubl-settings-diskquota.cc:87
+#: source/ubl-settings-diskquota.cc:75 source/ubl-settings-diskquota.cc:77
+#: source/ubl-settings-diskquota.cc:96 source/ubl-settings-diskquota.cc:98
+#: source/ubl-settings-diskquota.cc:93 source/ubl-settings-diskquota.cc:95
+#: source/ubl-settings-diskquota.cc:90 source/ubl-settings-diskquota.cc:92
+#: source/ubl-settings-diskquota.cc:89 source/ubl-settings-diskquota.cc:91
+msgid "Excess size delay period"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:150 source/ubl-settings-diskquota.cc:175
+#: source/ubl-settings-diskquota.cc:176 source/ubl-settings-diskquota.cc:214
+#: source/ubl-settings-diskquota.cc:221 source/ubl-settings-diskquota.cc:80
+#: source/ubl-settings-diskquota.cc:105 source/ubl-settings-diskquota.cc:106
+#: source/ubl-settings-diskquota.cc:144 source/ubl-settings-diskquota.cc:151
+#: source/ubl-settings-diskquota.cc:70 source/ubl-settings-diskquota.cc:95
+#: source/ubl-settings-diskquota.cc:96 source/ubl-settings-diskquota.cc:134
+#: source/ubl-settings-diskquota.cc:141 source/ubl-settings-diskquota.cc:91
+#: source/ubl-settings-diskquota.cc:116 source/ubl-settings-diskquota.cc:117
+#: source/ubl-settings-diskquota.cc:155 source/ubl-settings-diskquota.cc:162
+#: source/ubl-settings-diskquota.cc:88 source/ubl-settings-diskquota.cc:113
+#: source/ubl-settings-diskquota.cc:114 source/ubl-settings-diskquota.cc:152
+#: source/ubl-settings-diskquota.cc:85 source/ubl-settings-diskquota.cc:110
+#: source/ubl-settings-diskquota.cc:111 source/ubl-settings-diskquota.cc:84
+msgid "File system:"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:191 source/ubl-settings-diskquota.cc:200
+#: source/ubl-settings-diskquota.cc:215 source/ubl-settings-diskquota.cc:243
+#: source/ubl-settings-diskquota.cc:121 source/ubl-settings-diskquota.cc:130
+#: source/ubl-settings-diskquota.cc:145 source/ubl-settings-diskquota.cc:378
+#: source/ubl-settings-diskquota.cc:111 source/ubl-settings-diskquota.cc:120
+#: source/ubl-settings-diskquota.cc:135 source/ubl-settings-diskquota.cc:321
+#: source/ubl-settings-diskquota.cc:132 source/ubl-settings-diskquota.cc:141
+#: source/ubl-settings-diskquota.cc:156 source/ubl-settings-diskquota.cc:325
+#: source/ubl-settings-diskquota.cc:129 source/ubl-settings-diskquota.cc:138
+#: source/ubl-settings-diskquota.cc:153 source/ubl-settings-diskquota.cc:317
+#: source/ubl-settings-diskquota.cc:264 source/ubl-settings-diskquota.cc:126
+msgid "Files"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:177 source/ubl-settings-diskquota.cc:178
+#: source/ubl-settings-diskquota.cc:107 source/ubl-settings-diskquota.cc:108
+#: source/ubl-settings-diskquota.cc:97 source/ubl-settings-diskquota.cc:98
+#: source/ubl-settings-diskquota.cc:118 source/ubl-settings-diskquota.cc:119
+#: source/ubl-settings-diskquota.cc:115 source/ubl-settings-diskquota.cc:116
+#: source/ubl-settings-diskquota.cc:112 source/ubl-settings-diskquota.cc:113
+msgid "Filters"
+msgstr ""
+
+msgid ""
+"GTK settings quotas. for UBLinux\n"
+"\n"
+"Usage: ubl-settings-diskquota [OPTIONS...]\n"
+"Options:\n"
+" -h, --help\t Show this help\n"
+" -V, --version\t Show package version\n"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:144 source/ubl-settings-diskquota.cc:74
+#: source/ubl-settings-diskquota.cc:66 source/ubl-settings-diskquota.cc:87
+#: source/ubl-settings-diskquota.cc:84 source/ubl-settings-diskquota.cc:81
+#: source/ubl-settings-diskquota.cc:80
+msgid "General settings"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:611 source/ubl-settings-diskquota.cc:524
+#: source/ubl-settings-diskquota.cc:458
+msgid "Global configuration downloaded successfully"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:585 source/ubl-settings-diskquota.cc:498
+#: source/ubl-settings-diskquota.cc:432
+msgid "Global configuration read error"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:617 source/ubl-settings-diskquota.cc:530
+#: source/ubl-settings-diskquota.cc:464
+msgid "Global configuration successfully written"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:593 source/ubl-settings-diskquota.cc:506
+#: source/ubl-settings-diskquota.cc:440
+msgid "Global configuration write error"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:198 source/ubl-settings-diskquota.cc:128
+#: source/ubl-settings-diskquota.cc:118 source/ubl-settings-diskquota.cc:139
+#: source/ubl-settings-diskquota.cc:136
+msgid "Group quotas for this device:"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:145 source/ubl-settings-diskquota.cc:75
+#: source/ubl-settings-diskquota.cc:67 source/ubl-settings-diskquota.cc:88
+#: source/ubl-settings-diskquota.cc:85 source/ubl-settings-diskquota.cc:82
+#: source/ubl-settings-diskquota.cc:81
+msgid "Groups"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:203 source/ubl-settings-diskquota.cc:204
+#: source/ubl-settings-diskquota.cc:213 source/ubl-settings-diskquota.cc:218
+#: source/ubl-settings-diskquota.cc:133 source/ubl-settings-diskquota.cc:134
+#: source/ubl-settings-diskquota.cc:143 source/ubl-settings-diskquota.cc:148
+#: source/ubl-settings-diskquota.cc:123 source/ubl-settings-diskquota.cc:124
+#: source/ubl-settings-diskquota.cc:138 source/ubl-settings-diskquota.cc:144
+#: source/ubl-settings-diskquota.cc:145 source/ubl-settings-diskquota.cc:154
+#: source/ubl-settings-diskquota.cc:159 source/ubl-settings-diskquota.cc:141
+#: source/ubl-settings-diskquota.cc:142 source/ubl-settings-diskquota.cc:151
+#: source/ubl-settings-diskquota.cc:156
+msgid "Hard limit"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:320 source/ubl-settings-diskquota.cc:324
+#: source/ubl-settings-diskquota.cc:316 source/ubl-settings-diskquota.cc:263
+msgid ""
+"Hard limit\n"
+"(Size) activation\n"
+"time"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:323 source/ubl-settings-diskquota.cc:327
+#: source/ubl-settings-diskquota.cc:319 source/ubl-settings-diskquota.cc:266
+msgid ""
+"Hard limit\n"
+"(files)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:325 source/ubl-settings-diskquota.cc:329
+#: source/ubl-settings-diskquota.cc:321 source/ubl-settings-diskquota.cc:268
+msgid ""
+"Hard limit\n"
+"(files) activation\n"
+"time"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:324 source/ubl-settings-diskquota.cc:328
+#: source/ubl-settings-diskquota.cc:320 source/ubl-settings-diskquota.cc:267
+msgid ""
+"Hard limit\n"
+"(files) delay"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:318 source/ubl-settings-diskquota.cc:322
+#: source/ubl-settings-diskquota.cc:314 source/ubl-settings-diskquota.cc:261
+msgid ""
+"Hard limit\n"
+"(size)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:319 source/ubl-settings-diskquota.cc:323
+#: source/ubl-settings-diskquota.cc:315 source/ubl-settings-diskquota.cc:262
+msgid ""
+"Hard limit\n"
+"(size) delay"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:247 source/ubl-settings-diskquota.cc:382
+msgid ""
+"Hard limit\n"
+"activation\n"
+"time (files)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:240 source/ubl-settings-diskquota.cc:375
+msgid ""
+"Hard limit\n"
+"activation\n"
+"time (size)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:195 source/ubl-settings-diskquota.cc:125
+#: source/ubl-settings-diskquota.cc:115 source/ubl-settings-diskquota.cc:136
+#: source/ubl-settings-diskquota.cc:133 source/ubl-settings-diskquota.cc:130
+msgid "Hard limit (file) activation time"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:123 source/ubl-settings-diskquota.cc:113
+#: source/ubl-settings-diskquota.cc:134 source/ubl-settings-diskquota.cc:131
+#: source/ubl-settings-diskquota.cc:128
+msgid "Hard limit (files)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:124 source/ubl-settings-diskquota.cc:114
+#: source/ubl-settings-diskquota.cc:135 source/ubl-settings-diskquota.cc:132
+#: source/ubl-settings-diskquota.cc:129
+msgid "Hard limit (files) delay"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:188 source/ubl-settings-diskquota.cc:118
+#: source/ubl-settings-diskquota.cc:108 source/ubl-settings-diskquota.cc:129
+#: source/ubl-settings-diskquota.cc:126 source/ubl-settings-diskquota.cc:123
+msgid "Hard limit (size)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:120 source/ubl-settings-diskquota.cc:110
+#: source/ubl-settings-diskquota.cc:131 source/ubl-settings-diskquota.cc:128
+#: source/ubl-settings-diskquota.cc:125
+msgid "Hard limit (size) activation time"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:119 source/ubl-settings-diskquota.cc:109
+#: source/ubl-settings-diskquota.cc:130 source/ubl-settings-diskquota.cc:127
+#: source/ubl-settings-diskquota.cc:124
+msgid "Hard limit (size) delay"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:190
+msgid "Hard limit activation time (size)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:225 source/ubl-settings-diskquota.cc:155
+#: source/ubl-settings-diskquota.cc:145
+msgid "Help"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:179 source/ubl-settings-diskquota.cc:109
+#: source/ubl-settings-diskquota.cc:99 source/ubl-settings-diskquota.cc:120
+#: source/ubl-settings-diskquota.cc:117 source/ubl-settings-diskquota.cc:114
+msgid "Load"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:222 source/ubl-settings-diskquota.cc:152
+#: source/ubl-settings-diskquota.cc:142
+msgid "Load global configuration"
+msgstr ""
+
+msgid "Direct control of the file system"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:223 source/ubl-settings-diskquota.cc:153
+#: source/ubl-settings-diskquota.cc:143
+msgid "Load local configuration"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:608 source/ubl-settings-diskquota.cc:521
+#: source/ubl-settings-diskquota.cc:455
+msgid "Local configuration downloaded successfully"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:581 source/ubl-settings-diskquota.cc:494
+#: source/ubl-settings-diskquota.cc:428
+msgid "Local configuration reading error"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:614 source/ubl-settings-diskquota.cc:527
+#: source/ubl-settings-diskquota.cc:461
+msgid "Local configuration successfully written"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:589 source/ubl-settings-diskquota.cc:502
+#: source/ubl-settings-diskquota.cc:436
+msgid "Local configuration write error"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:184 source/ubl-settings-diskquota.cc:234
+#: source/ubl-settings-diskquota.cc:114 source/ubl-settings-diskquota.cc:369
+#: source/ubl-settings-diskquota.cc:104 source/ubl-settings-diskquota.cc:314
+#: source/ubl-settings-diskquota.cc:125 source/ubl-settings-diskquota.cc:318
+#: source/ubl-settings-diskquota.cc:122 source/ubl-settings-diskquota.cc:310
+#: source/ubl-settings-diskquota.cc:119
+msgid "Name"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:623 source/ubl-settings-diskquota.cc:536
+#: source/ubl-settings-diskquota.cc:470
+msgid "Nothing to save!"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:143 source/ubl-settings-diskquota.cc:73
+#: source/ubl-settings-diskquota.cc:65 source/ubl-settings-diskquota.cc:86
+#: source/ubl-settings-diskquota.cc:83 source/ubl-settings-diskquota.cc:80
+#: source/ubl-settings-diskquota.cc:79
+msgid "Project Home Page"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:185 source/ubl-settings-diskquota.cc:235
+#: source/ubl-settings-diskquota.cc:115 source/ubl-settings-diskquota.cc:370
+#: source/ubl-settings-diskquota.cc:105 source/ubl-settings-diskquota.cc:315
+#: source/ubl-settings-diskquota.cc:126 source/ubl-settings-diskquota.cc:319
+#: source/ubl-settings-diskquota.cc:123 source/ubl-settings-diskquota.cc:311
+#: source/ubl-settings-diskquota.cc:258 source/ubl-settings-diskquota.cc:120
+msgid "Quotas"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:151 source/ubl-settings-diskquota.cc:81
+#: source/ubl-settings-diskquota.cc:71
+msgid "Quotas for groups"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:154 source/ubl-settings-diskquota.cc:84
+#: source/ubl-settings-diskquota.cc:74
+msgid "Quotas for users"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:180 source/ubl-settings-diskquota.cc:110
+#: source/ubl-settings-diskquota.cc:100 source/ubl-settings-diskquota.cc:121
+#: source/ubl-settings-diskquota.cc:118 source/ubl-settings-diskquota.cc:115
+msgid "Save"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:226 source/ubl-settings-diskquota.cc:156
+#: source/ubl-settings-diskquota.cc:146
+msgid "Save in global and local configuration"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:227 source/ubl-settings-diskquota.cc:157
+#: source/ubl-settings-diskquota.cc:147
+msgid "Save in global configuration"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:228 source/ubl-settings-diskquota.cc:158
+#: source/ubl-settings-diskquota.cc:148
+msgid "Save in local configuration"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:140 source/ubl-settings-diskquota.cc:70
+msgid "Setting user quotas"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:245 source/ubl-settings-diskquota.cc:380
+msgid ""
+"Severe\n"
+"limitation\n"
+"(files)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:238 source/ubl-settings-diskquota.cc:373
+msgid ""
+"Severe\n"
+"limitation\n"
+"(size)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:193
+msgid "Severe limitation (files)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:186 source/ubl-settings-diskquota.cc:199
+#: source/ubl-settings-diskquota.cc:210 source/ubl-settings-diskquota.cc:236
+#: source/ubl-settings-diskquota.cc:116 source/ubl-settings-diskquota.cc:129
+#: source/ubl-settings-diskquota.cc:140 source/ubl-settings-diskquota.cc:371
+#: source/ubl-settings-diskquota.cc:106 source/ubl-settings-diskquota.cc:119
+#: source/ubl-settings-diskquota.cc:130 source/ubl-settings-diskquota.cc:316
+#: source/ubl-settings-diskquota.cc:127 source/ubl-settings-diskquota.cc:151
+#: source/ubl-settings-diskquota.cc:320 source/ubl-settings-diskquota.cc:124
+#: source/ubl-settings-diskquota.cc:137 source/ubl-settings-diskquota.cc:148
+#: source/ubl-settings-diskquota.cc:312 source/ubl-settings-diskquota.cc:259
+#: source/ubl-settings-diskquota.cc:121
+msgid "Size"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:244 source/ubl-settings-diskquota.cc:379
+msgid ""
+"Soft\n"
+"Restriction\n"
+"(files)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:192
+msgid "Soft Restriction (files)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:202 source/ubl-settings-diskquota.cc:205
+#: source/ubl-settings-diskquota.cc:212 source/ubl-settings-diskquota.cc:217
+#: source/ubl-settings-diskquota.cc:132 source/ubl-settings-diskquota.cc:135
+#: source/ubl-settings-diskquota.cc:142 source/ubl-settings-diskquota.cc:147
+#: source/ubl-settings-diskquota.cc:122 source/ubl-settings-diskquota.cc:125
+#: source/ubl-settings-diskquota.cc:137 source/ubl-settings-diskquota.cc:143
+#: source/ubl-settings-diskquota.cc:146 source/ubl-settings-diskquota.cc:153
+#: source/ubl-settings-diskquota.cc:158 source/ubl-settings-diskquota.cc:140
+#: source/ubl-settings-diskquota.cc:150 source/ubl-settings-diskquota.cc:155
+msgid "Soft limit"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:322 source/ubl-settings-diskquota.cc:326
+#: source/ubl-settings-diskquota.cc:318 source/ubl-settings-diskquota.cc:265
+msgid ""
+"Soft limit\n"
+"(files)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:237 source/ubl-settings-diskquota.cc:372
+#: source/ubl-settings-diskquota.cc:317 source/ubl-settings-diskquota.cc:321
+#: source/ubl-settings-diskquota.cc:313 source/ubl-settings-diskquota.cc:260
+msgid ""
+"Soft limit\n"
+"(size)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:122 source/ubl-settings-diskquota.cc:112
+#: source/ubl-settings-diskquota.cc:133 source/ubl-settings-diskquota.cc:130
+#: source/ubl-settings-diskquota.cc:127
+msgid "Soft limit (files)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:187 source/ubl-settings-diskquota.cc:117
+#: source/ubl-settings-diskquota.cc:107 source/ubl-settings-diskquota.cc:128
+#: source/ubl-settings-diskquota.cc:125 source/ubl-settings-diskquota.cc:122
+msgid "Soft limit (size)"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:620 source/ubl-settings-diskquota.cc:533
+#: source/ubl-settings-diskquota.cc:467
+msgid "Successfully saved local and global configuration"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:59 source/ubl-settings-diskquota.cc:55
+#: source/ubl-settings-diskquota.cc:47 source/ubl-settings-diskquota.cc:68
+#: source/ubl-settings-diskquota.cc:70 source/ubl-settings-diskquota.cc:67
+#: source/ubl-settings-diskquota.cc:66
+msgid "The program must be run as root"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:209 source/ubl-settings-diskquota.cc:139
+#: source/ubl-settings-diskquota.cc:129 source/ubl-settings-diskquota.cc:150
+#: source/ubl-settings-diskquota.cc:147
+msgid "User quotas for this device: "
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:148 source/ubl-settings-diskquota.cc:78
+#: source/ubl-settings-diskquota.cc:68 source/ubl-settings-diskquota.cc:89
+#: source/ubl-settings-diskquota.cc:86 source/ubl-settings-diskquota.cc:83
+#: source/ubl-settings-diskquota.cc:82
+msgid "Users"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:163 source/ubl-settings-diskquota.cc:164
+#: source/ubl-settings-diskquota.cc:165 source/ubl-settings-diskquota.cc:166
+#: source/ubl-settings-diskquota.cc:93 source/ubl-settings-diskquota.cc:94
+#: source/ubl-settings-diskquota.cc:95 source/ubl-settings-diskquota.cc:96
+#: source/ubl-settings-diskquota.cc:83 source/ubl-settings-diskquota.cc:84
+#: source/ubl-settings-diskquota.cc:85 source/ubl-settings-diskquota.cc:86
+#: source/ubl-settings-diskquota.cc:104 source/ubl-settings-diskquota.cc:105
+#: source/ubl-settings-diskquota.cc:106 source/ubl-settings-diskquota.cc:107
+#: source/ubl-settings-diskquota.cc:101 source/ubl-settings-diskquota.cc:102
+#: source/ubl-settings-diskquota.cc:103 source/ubl-settings-diskquota.cc:98
+#: source/ubl-settings-diskquota.cc:99 source/ubl-settings-diskquota.cc:100
+#: source/ubl-settings-diskquota.cc:97
+msgid "days"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:219 source/ubl-settings-diskquota.cc:220
+#: source/ubl-settings-diskquota.cc:149 source/ubl-settings-diskquota.cc:150
+#: source/ubl-settings-diskquota.cc:139 source/ubl-settings-diskquota.cc:140
+#: source/ubl-settings-diskquota.cc:160 source/ubl-settings-diskquota.cc:161
+#: source/ubl-settings-diskquota.cc:157 source/ubl-settings-diskquota.cc:158
+msgid "files"
+msgstr ""
+
+msgid "Configuring disk quota settings for system groups and users"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:167 source/ubl-settings-diskquota.cc:168
+#: source/ubl-settings-diskquota.cc:169 source/ubl-settings-diskquota.cc:170
+#: source/ubl-settings-diskquota.cc:97 source/ubl-settings-diskquota.cc:98
+#: source/ubl-settings-diskquota.cc:99 source/ubl-settings-diskquota.cc:100
+#: source/ubl-settings-diskquota.cc:87 source/ubl-settings-diskquota.cc:88
+#: source/ubl-settings-diskquota.cc:89 source/ubl-settings-diskquota.cc:90
+#: source/ubl-settings-diskquota.cc:108 source/ubl-settings-diskquota.cc:109
+#: source/ubl-settings-diskquota.cc:110 source/ubl-settings-diskquota.cc:111
+#: source/ubl-settings-diskquota.cc:105 source/ubl-settings-diskquota.cc:106
+#: source/ubl-settings-diskquota.cc:107 source/ubl-settings-diskquota.cc:102
+#: source/ubl-settings-diskquota.cc:103 source/ubl-settings-diskquota.cc:104
+#: source/ubl-settings-diskquota.cc:101
+msgid "hours"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:141 source/ubl-settings-diskquota.cc:71
+#: source/ubl-settings-diskquota.cc:63 source/ubl-settings-diskquota.cc:84
+#: source/ubl-settings-diskquota.cc:81 source/ubl-settings-diskquota.cc:78
+#: source/ubl-settings-diskquota.cc:77
+msgid "https://wiki.ublinux.com"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:548 source/ubl-settings-diskquota.cc:461
+msgid ""
+"https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:171 source/ubl-settings-diskquota.cc:172
+#: source/ubl-settings-diskquota.cc:173 source/ubl-settings-diskquota.cc:174
+#: source/ubl-settings-diskquota.cc:101 source/ubl-settings-diskquota.cc:102
+#: source/ubl-settings-diskquota.cc:103 source/ubl-settings-diskquota.cc:104
+#: source/ubl-settings-diskquota.cc:91 source/ubl-settings-diskquota.cc:92
+#: source/ubl-settings-diskquota.cc:93 source/ubl-settings-diskquota.cc:94
+#: source/ubl-settings-diskquota.cc:112 source/ubl-settings-diskquota.cc:113
+#: source/ubl-settings-diskquota.cc:114 source/ubl-settings-diskquota.cc:115
+#: source/ubl-settings-diskquota.cc:109 source/ubl-settings-diskquota.cc:110
+#: source/ubl-settings-diskquota.cc:111 source/ubl-settings-diskquota.cc:106
+#: source/ubl-settings-diskquota.cc:107 source/ubl-settings-diskquota.cc:108
+#: source/ubl-settings-diskquota.cc:105
+msgid "minutes"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:257
+msgid "name"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:92 source/ubl-settings-diskquota.cc:89
+#: source/ubl-settings-diskquota.cc:86 source/ubl-settings-diskquota.cc:85
+msgid "quotas for groups"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:95 source/ubl-settings-diskquota.cc:92
+#: source/ubl-settings-diskquota.cc:89 source/ubl-settings-diskquota.cc:88
+msgid "quotas for users"
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:629 source/ubl-settings-diskquota.cc:542
+#: source/ubl-settings-diskquota.cc:476 source/ubl-settings-diskquota.cc:350
+#: source/ubl-settings-diskquota.cc:371 source/ubl-settings-diskquota.cc:318
+#: source/ubl-settings-diskquota.cc:267 source/ubl-settings-diskquota.cc:213
+msgid "ubl-settings-diskquota version: "
+msgstr ""
+
+#: source/ubl-settings-diskquota.cc:159 source/ubl-settings-diskquota.cc:160
+#: source/ubl-settings-diskquota.cc:161 source/ubl-settings-diskquota.cc:162
+#: source/ubl-settings-diskquota.cc:89 source/ubl-settings-diskquota.cc:90
+#: source/ubl-settings-diskquota.cc:91 source/ubl-settings-diskquota.cc:92
+#: source/ubl-settings-diskquota.cc:79 source/ubl-settings-diskquota.cc:80
+#: source/ubl-settings-diskquota.cc:81 source/ubl-settings-diskquota.cc:82
+#: source/ubl-settings-diskquota.cc:100 source/ubl-settings-diskquota.cc:101
+#: source/ubl-settings-diskquota.cc:102 source/ubl-settings-diskquota.cc:103
+#: source/ubl-settings-diskquota.cc:97 source/ubl-settings-diskquota.cc:98
+#: source/ubl-settings-diskquota.cc:99 source/ubl-settings-diskquota.cc:94
+#: source/ubl-settings-diskquota.cc:95 source/ubl-settings-diskquota.cc:96
+#: source/ubl-settings-diskquota.cc:93
+msgid "weeks"
+msgstr ""
+
+msgid "General statistics"
+msgstr ""
\ No newline at end of file
diff --git a/ubl-settings-diskquota_ru.po b/ubl-settings-diskquota_ru.po
new file mode 100644
index 0000000..814ebd0
--- /dev/null
+++ b/ubl-settings-diskquota_ru.po
@@ -0,0 +1,997 @@
+# Russian translations for ubl-settings-diskquota package.
+# Copyright (C) 2022, UBTech LLC
+# This file is distributed under the same license as the ubl-settings-diskquota package.
+# UBLinux Team , 2022
+#
+#, fuzzy
+msgid "test"
+msgstr ""
+"Project-Id-Version: ublexec 1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2023-04-10 16:09+0000\n"
+"PO-Revision-Date: 2023-01-01 00:00+0600\n"
+"Last-Translator: UBLinux Team \n"
+"Language-Team: Russian - UBLinux Team \n"
+"Language: Russian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit"
+#: source/ubl-strings.h:1
+
+msgid "Version:"
+msgstr "Версия:"
+
+#: source/ubl-strings.h:2
+msgid "ubl-settings-TEMPLATE version:"
+msgstr "Версия ubl-settings-TEMPLATE: "
+
+#: source/ubl-strings.h:2
+msgid "TEMPLATE settings"
+msgstr "Настройки TEMPLATE"
+
+#: 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
+#, fuzzy
+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:4
+msgid "TEMPLATE Manager"
+msgstr "Настройки TEMPLATE"
+
+#: source/ubl-strings.h:5
+msgid "System TEMPLATE settings management"
+msgstr "Настройки TEMPLATE"
+
+#: 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:11
+msgid "Documentation"
+msgstr "Справка"
+
+#: source/ubl-strings.h:12
+msgid "Save to local configuration"
+msgstr "Сохранить в локальную конфигурацию"
+
+#: source/ubl-strings.h:13
+msgid "Save to global configuration"
+msgstr "Сохранить в глобальную конфигурацию"
+
+#: source/ubl-strings.h:14
+msgid "Save configuration"
+msgstr "Сохранить конфигурацию"
+
+#: source/ubl-strings.h:24
+msgid "Always redirect to online documentation"
+msgstr "Всегда перенаправлять"
+
+#: source/ubl-strings.h:25
+msgid "Open documentation"
+msgstr "Прочитать справку"
+
+#: source/ubl-strings.h:27
+msgid "Nothing were chosen"
+msgstr "Ничего не было выбрано"
+
+#: source/ubl-strings.h:30
+msgid "Global configuration loading succseeded."
+msgstr "Успешно загружена глобальная конфигурация"
+
+#: source/ubl-strings.h:31
+msgid "Local configuration loading succseeded."
+msgstr "Успешно загружена локальная конфигурация"
+
+#: source/ubl-strings.h:33
+msgid "Local and global configuration saving succseeded."
+msgstr "Успешно записаны локальная и глобальная конфигурация"
+
+#: source/ubl-strings.h:34
+msgid "Global configuration saving succseeded."
+msgstr "Успешно записана глобальная конфигурация"
+
+#: source/ubl-strings.h:35
+msgid "Local configuration saving succseeded."
+msgstr "Успешно записана локальная конфигурация"
+
+msgid "Off"
+msgstr "Выключено"
+
+msgid "Not set"
+msgstr "Не задано"
+
+msgid "ubl-settings-diskquota"
+msgstr "Дисковые квоты"
+
+msgid "Settings disk quotas - Addition"
+msgstr "Настройка дисковых квот - Добавление"
+
+msgid "Settings disk quotas - Editing"
+msgstr "Настройка дисковых квот - Редактирование"
+
+msgid "Edit"
+msgstr "Редактировать"
+
+msgid "Kb"
+msgstr "Кб"
+
+msgid "Mb"
+msgstr "Мб"
+
+msgid "Gb"
+msgstr "Гб"
+
+msgid "Tb"
+msgstr "Тб"
+
+msgid "Quota use status:"
+msgstr "Статус использования квот:"
+
+msgid "Would you like to read documentation in the Web?"
+msgstr "Вы хотите прочитать справку в Сети?"
+
+msgid ""
+"You will be redirected to documentation website where documentation is\n"
+"translated and supported by community."
+msgstr ""
+"Вы будете перенаправлены на сайт с документацией где страницы помощи\n"
+"переводятся и поддерживаются сообществом."
+
+msgid "Cancel"
+msgstr "Отменить"
+
+msgid "Always redirect"
+msgstr "Всегда перенаправлять"
+
+msgid "Read online"
+msgstr "Прочитать онлайн"
+
+#: source/ubl-settings-quotas.cc:224 source/ubl-settings-quotas.cc:154
+#: source/ubl-settings-quotas.cc:144
+msgid "About"
+msgstr "О программе"
+
+msgid "Projects"
+msgstr "Проекты"
+
+#: source/ubl-settings-quotas.cc:183 source/ubl-settings-quotas.cc:113
+#: source/ubl-settings-quotas.cc:103 source/ubl-settings-quotas.cc:124
+#: source/ubl-settings-quotas.cc:121 source/ubl-settings-quotas.cc:118
+msgid "Configuration of disk quotas parameters for system groups and users"
+msgstr "Настройка параметров дисковых квот для системных групп и пользователей"
+
+msgid "Configuring disk quota settings for system groups and users"
+msgstr "Настройка параметров дисковых квот для системных групп и пользователей системы"
+
+#: source/ubl-settings-quotas.cc:138 source/ubl-settings-quotas.cc:68
+#: source/ubl-settings-quotas.cc:60 source/ubl-settings-quotas.cc:81
+#: source/ubl-settings-quotas.cc:78 source/ubl-settings-quotas.cc:75
+#: source/ubl-settings-quotas.cc:74
+msgid "Copyright © UBSoft LLC, 2022 - "
+msgstr ""
+
+#: source/ubl-settings-quotas.cc:201 source/ubl-settings-quotas.cc:206
+#: source/ubl-settings-quotas.cc:211 source/ubl-settings-quotas.cc:131
+#: source/ubl-settings-quotas.cc:136 source/ubl-settings-quotas.cc:141
+#: source/ubl-settings-quotas.cc:121 source/ubl-settings-quotas.cc:126
+#: source/ubl-settings-quotas.cc:142 source/ubl-settings-quotas.cc:147
+#: source/ubl-settings-quotas.cc:152 source/ubl-settings-quotas.cc:139
+#: source/ubl-settings-quotas.cc:144 source/ubl-settings-quotas.cc:149
+msgid "Currently using:"
+msgstr "В настоящее время используется:"
+
+#: source/ubl-settings-quotas.cc:216 source/ubl-settings-quotas.cc:146
+#: source/ubl-settings-quotas.cc:136 source/ubl-settings-quotas.cc:157
+#: source/ubl-settings-quotas.cc:154
+msgid "Currently using: "
+msgstr "В настоящее время используется: "
+
+#: source/ubl-settings-quotas.cc:62 source/ubl-settings-quotas.cc:83
+#: source/ubl-settings-quotas.cc:80 source/ubl-settings-quotas.cc:77
+#: source/ubl-settings-quotas.cc:76
+msgid "Date and Time"
+msgstr "Дата и время"
+
+#: source/ubl-settings-quotas.cc:246 source/ubl-settings-quotas.cc:381
+msgid ""
+"Deferring\n"
+"a hard\n"
+"limit\n"
+"(files)"
+msgstr ""
+"Отсрочка\n"
+"жесткого\n"
+"ограничения\n"
+"(файлы)"
+
+msgid ""
+"Deferring\n"
+"(files)"
+msgstr ""
+"Отсрочка\n"
+"(файлы)"
+
+msgid ""
+"Deferring\n"
+"(size)"
+msgstr ""
+"Отсрочка\n"
+"(объём)"
+
+#: source/ubl-settings-quotas.cc:239 source/ubl-settings-quotas.cc:374
+msgid ""
+"Deferring\n"
+"a hard\n"
+"limit\n"
+"(size)"
+msgstr ""
+"Отсрочка\n"
+"жесткого\n"
+"ограничения\n"
+"(объём)"
+
+#: source/ubl-settings-quotas.cc:194
+msgid "Deferring a hard limit (files)"
+msgstr "Отсрочка жесткого ограничения (файлы)"
+
+#: source/ubl-settings-quotas.cc:189
+msgid "Deferring a hard limit (size)"
+msgstr "Отсрочка жесткого ограничения (объём)"
+
+#: source/ubl-settings-quotas.cc:149 source/ubl-settings-quotas.cc:181
+#: source/ubl-settings-quotas.cc:182 source/ubl-settings-quotas.cc:196
+#: source/ubl-settings-quotas.cc:208 source/ubl-settings-quotas.cc:79
+#: source/ubl-settings-quotas.cc:111 source/ubl-settings-quotas.cc:112
+#: source/ubl-settings-quotas.cc:126 source/ubl-settings-quotas.cc:138
+#: source/ubl-settings-quotas.cc:69 source/ubl-settings-quotas.cc:101
+#: source/ubl-settings-quotas.cc:102 source/ubl-settings-quotas.cc:116
+#: source/ubl-settings-quotas.cc:128 source/ubl-settings-quotas.cc:90
+#: source/ubl-settings-quotas.cc:122 source/ubl-settings-quotas.cc:123
+#: source/ubl-settings-quotas.cc:137 source/ubl-settings-quotas.cc:87
+#: source/ubl-settings-quotas.cc:119 source/ubl-settings-quotas.cc:120
+#: source/ubl-settings-quotas.cc:134 source/ubl-settings-quotas.cc:146
+#: source/ubl-settings-quotas.cc:84 source/ubl-settings-quotas.cc:117
+#: source/ubl-settings-quotas.cc:83
+msgid "Device:"
+msgstr "Устройство:"
+
+msgid "Project ID"
+msgstr "ID проекта"
+
+msgid "Catalog"
+msgstr "Каталог"
+
+msgid "Project Name"
+msgstr "Имя проекта"
+
+msgid "Auto"
+msgstr "Авто"
+
+msgid "Review"
+msgstr "Обзор"
+
+msgid "Generate"
+msgstr "Сгенерировать"
+
+msgid "User"
+msgstr "Пользователь"
+
+msgid "Group"
+msgstr "Группа"
+
+msgid "User:"
+msgstr "Пользователь:"
+
+msgid "Group:"
+msgstr "Группа:"
+
+msgid "Projects:"
+msgstr "Проект:"
+
+msgid "Quota type"
+msgstr "Тип квот"
+
+msgid "Status"
+msgstr "Статус"
+
+msgid "Device\nProject"
+msgstr "Устройство\nПроект"
+
+#: source/ubl-settings-quotas.cc:197 source/ubl-settings-quotas.cc:207
+#: source/ubl-settings-quotas.cc:127 source/ubl-settings-quotas.cc:137
+#: source/ubl-settings-quotas.cc:117 source/ubl-settings-quotas.cc:138
+#: source/ubl-settings-quotas.cc:148 source/ubl-settings-quotas.cc:135
+#: source/ubl-settings-quotas.cc:145
+msgid "Disk quotas for this device:"
+msgstr "Дисковые квоты для этого устройства:"
+
+#: source/ubl-settings-quotas.cc:152 source/ubl-settings-quotas.cc:153
+#: source/ubl-settings-quotas.cc:82 source/ubl-settings-quotas.cc:83
+#: source/ubl-settings-quotas.cc:72 source/ubl-settings-quotas.cc:73
+#: source/ubl-settings-quotas.cc:93 source/ubl-settings-quotas.cc:94
+#: source/ubl-settings-quotas.cc:90 source/ubl-settings-quotas.cc:91
+#: source/ubl-settings-quotas.cc:87 source/ubl-settings-quotas.cc:88
+#: source/ubl-settings-quotas.cc:86
+msgid "Enable"
+msgstr "Включить"
+
+#: source/ubl-settings-quotas.cc:597 source/ubl-settings-quotas.cc:510
+#: source/ubl-settings-quotas.cc:444
+#, fuzzy
+msgid "Error saved local and global configuration"
+msgstr "Сохранить глобальную и локальную конфигурацию"
+
+#: source/ubl-settings-quotas.cc:156 source/ubl-settings-quotas.cc:158
+#: source/ubl-settings-quotas.cc:86 source/ubl-settings-quotas.cc:88
+#: source/ubl-settings-quotas.cc:76 source/ubl-settings-quotas.cc:78
+#: source/ubl-settings-quotas.cc:97 source/ubl-settings-quotas.cc:99
+#: source/ubl-settings-quotas.cc:94 source/ubl-settings-quotas.cc:96
+#: source/ubl-settings-quotas.cc:91 source/ubl-settings-quotas.cc:93
+#: source/ubl-settings-quotas.cc:90 source/ubl-settings-quotas.cc:92
+msgid "Excess files delay period"
+msgstr "Превышение периода задержки файлов"
+
+#: source/ubl-settings-quotas.cc:155 source/ubl-settings-quotas.cc:157
+#: source/ubl-settings-quotas.cc:85 source/ubl-settings-quotas.cc:87
+#: source/ubl-settings-quotas.cc:75 source/ubl-settings-quotas.cc:77
+#: source/ubl-settings-quotas.cc:96 source/ubl-settings-quotas.cc:98
+#: source/ubl-settings-quotas.cc:93 source/ubl-settings-quotas.cc:95
+#: source/ubl-settings-quotas.cc:90 source/ubl-settings-quotas.cc:92
+#: source/ubl-settings-quotas.cc:89 source/ubl-settings-quotas.cc:91
+msgid "Excess size delay period"
+msgstr "Период задержки превышения размера"
+
+#: source/ubl-settings-quotas.cc:150 source/ubl-settings-quotas.cc:175
+#: source/ubl-settings-quotas.cc:176 source/ubl-settings-quotas.cc:214
+#: source/ubl-settings-quotas.cc:221 source/ubl-settings-quotas.cc:80
+#: source/ubl-settings-quotas.cc:105 source/ubl-settings-quotas.cc:106
+#: source/ubl-settings-quotas.cc:144 source/ubl-settings-quotas.cc:151
+#: source/ubl-settings-quotas.cc:70 source/ubl-settings-quotas.cc:95
+#: source/ubl-settings-quotas.cc:96 source/ubl-settings-quotas.cc:134
+#: source/ubl-settings-quotas.cc:141 source/ubl-settings-quotas.cc:91
+#: source/ubl-settings-quotas.cc:116 source/ubl-settings-quotas.cc:117
+#: source/ubl-settings-quotas.cc:155 source/ubl-settings-quotas.cc:162
+#: source/ubl-settings-quotas.cc:88 source/ubl-settings-quotas.cc:113
+#: source/ubl-settings-quotas.cc:114 source/ubl-settings-quotas.cc:152
+#: source/ubl-settings-quotas.cc:85 source/ubl-settings-quotas.cc:110
+#: source/ubl-settings-quotas.cc:111 source/ubl-settings-quotas.cc:84
+msgid "File system:"
+msgstr "Файловая система:"
+
+#: source/ubl-settings-quotas.cc:191 source/ubl-settings-quotas.cc:200
+#: source/ubl-settings-quotas.cc:215 source/ubl-settings-quotas.cc:243
+#: source/ubl-settings-quotas.cc:121 source/ubl-settings-quotas.cc:130
+#: source/ubl-settings-quotas.cc:145 source/ubl-settings-quotas.cc:378
+#: source/ubl-settings-quotas.cc:111 source/ubl-settings-quotas.cc:120
+#: source/ubl-settings-quotas.cc:135 source/ubl-settings-quotas.cc:321
+#: source/ubl-settings-quotas.cc:132 source/ubl-settings-quotas.cc:141
+#: source/ubl-settings-quotas.cc:156 source/ubl-settings-quotas.cc:325
+#: source/ubl-settings-quotas.cc:129 source/ubl-settings-quotas.cc:138
+#: source/ubl-settings-quotas.cc:153 source/ubl-settings-quotas.cc:317
+#: source/ubl-settings-quotas.cc:264 source/ubl-settings-quotas.cc:126
+msgid "Files"
+msgstr "Файлы"
+
+#: source/ubl-settings-quotas.cc:177 source/ubl-settings-quotas.cc:178
+#: source/ubl-settings-quotas.cc:107 source/ubl-settings-quotas.cc:108
+#: source/ubl-settings-quotas.cc:97 source/ubl-settings-quotas.cc:98
+#: source/ubl-settings-quotas.cc:118 source/ubl-settings-quotas.cc:119
+#: source/ubl-settings-quotas.cc:115 source/ubl-settings-quotas.cc:116
+#: source/ubl-settings-quotas.cc:112 source/ubl-settings-quotas.cc:113
+msgid "Filters"
+msgstr "Фильтры"
+
+msgid "Direct control of the file system"
+msgstr "Прямое управление файловой системой"
+
+msgid ""
+"GTK settings disk quota for UBLinux\n"
+"\n"
+"Usage: ubl-settings-diskquota [OPTIONS...]\n"
+"Options:\n"
+" -h, --help\t Show this help\n"
+" -V, --version\t Show package version\n"
+" --lock-help Lock utility help\n"
+" --lock-save Lock saving local and global configuration\n"
+" --lock-save-local Lock save global configuration\n"
+" --lock-save-global Lock load global configuration\n"
+" --lock-load-global Lock load global configuration\n"
+msgstr ""
+"GTK утилита настройки дисковых для UBLinux\n"
+"\n"
+"Использование: ubl-settings-diskquota [Параметры приложения...]\n"
+"Параметры приложения:\n"
+" -h, --help\t Показать параметры справки\n"
+" -V, --version\t Показать версию пакета\n"
+" --lock-help Блокировка вызова справки\n"
+" --lock-save Блокировка сохранения локальной и глобальной "
+"конфигурации\n"
+" --lock-save-local Блокировка сохранения локальной конфигурации\n"
+" --lock-save-global Блокировка сохранения глобальной конфигурации\n"
+" --lock-load-global Блокировка загрузки глобальной конфигурации\n"
+
+#: source/ubl-settings-quotas.cc:144 source/ubl-settings-quotas.cc:74
+#: source/ubl-settings-quotas.cc:66 source/ubl-settings-quotas.cc:87
+#: source/ubl-settings-quotas.cc:84 source/ubl-settings-quotas.cc:81
+#: source/ubl-settings-quotas.cc:80
+msgid "General settings"
+msgstr "Общие настройки"
+
+#: source/ubl-settings-quotas.cc:611 source/ubl-settings-quotas.cc:524
+#: source/ubl-settings-quotas.cc:458
+msgid "Global configuration downloaded successfully"
+msgstr "Успешно загружена глобальная конфигурация"
+
+#: source/ubl-settings-quotas.cc:585 source/ubl-settings-quotas.cc:498
+#: source/ubl-settings-quotas.cc:432
+#, fuzzy
+msgid "Global configuration read error"
+msgstr "Сохранить глобальную конфигурацию"
+
+#: source/ubl-settings-quotas.cc:617 source/ubl-settings-quotas.cc:530
+#: source/ubl-settings-quotas.cc:464
+msgid "Global configuration successfully written"
+msgstr "Успешно записана глобальная конфигурация"
+
+#: source/ubl-settings-quotas.cc:593 source/ubl-settings-quotas.cc:506
+#: source/ubl-settings-quotas.cc:440
+#, fuzzy
+msgid "Global configuration write error"
+msgstr "Сохранить глобальную конфигурацию"
+
+#: source/ubl-settings-quotas.cc:198 source/ubl-settings-quotas.cc:128
+#: source/ubl-settings-quotas.cc:118 source/ubl-settings-quotas.cc:139
+#: source/ubl-settings-quotas.cc:136
+msgid "Group quotas for this device:"
+msgstr "Групповые квоты для этого устройства:"
+
+#: source/ubl-settings-quotas.cc:145 source/ubl-settings-quotas.cc:75
+#: source/ubl-settings-quotas.cc:67 source/ubl-settings-quotas.cc:88
+#: source/ubl-settings-quotas.cc:85 source/ubl-settings-quotas.cc:82
+#: source/ubl-settings-quotas.cc:81
+msgid "Groups"
+msgstr "Группы"
+
+#: source/ubl-settings-quotas.cc:203 source/ubl-settings-quotas.cc:204
+#: source/ubl-settings-quotas.cc:213 source/ubl-settings-quotas.cc:218
+#: source/ubl-settings-quotas.cc:133 source/ubl-settings-quotas.cc:134
+#: source/ubl-settings-quotas.cc:143 source/ubl-settings-quotas.cc:148
+#: source/ubl-settings-quotas.cc:123 source/ubl-settings-quotas.cc:124
+#: source/ubl-settings-quotas.cc:138 source/ubl-settings-quotas.cc:144
+#: source/ubl-settings-quotas.cc:145 source/ubl-settings-quotas.cc:154
+#: source/ubl-settings-quotas.cc:159 source/ubl-settings-quotas.cc:141
+#: source/ubl-settings-quotas.cc:142 source/ubl-settings-quotas.cc:151
+#: source/ubl-settings-quotas.cc:156
+#, fuzzy
+msgid "Hard limit"
+msgstr "Жесткий предел"
+
+#: source/ubl-settings-quotas.cc:320 source/ubl-settings-quotas.cc:324
+#: source/ubl-settings-quotas.cc:316 source/ubl-settings-quotas.cc:263
+#, fuzzy
+msgid ""
+"Hard limit\n"
+"(Size) activation\n"
+"time"
+msgstr ""
+"Жесткий предел\n"
+"(размер)"
+
+#: source/ubl-settings-quotas.cc:323 source/ubl-settings-quotas.cc:327
+#: source/ubl-settings-quotas.cc:319 source/ubl-settings-quotas.cc:266
+#, fuzzy
+msgid ""
+"Hard limit\n"
+"(files)"
+msgstr ""
+"Жесткий лимит\n"
+"(файлы)"
+
+#: source/ubl-settings-quotas.cc:325 source/ubl-settings-quotas.cc:329
+#: source/ubl-settings-quotas.cc:321 source/ubl-settings-quotas.cc:268
+#, fuzzy
+msgid ""
+"Hard limit\n"
+"(files) activation\n"
+"time"
+msgstr ""
+"Жесткий предел\n"
+"(размер)"
+
+#: source/ubl-settings-quotas.cc:324 source/ubl-settings-quotas.cc:328
+#: source/ubl-settings-quotas.cc:320 source/ubl-settings-quotas.cc:267
+#, fuzzy
+msgid ""
+"Hard limit\n"
+"(files) delay"
+msgstr ""
+"Жесткий лимит\n"
+"(файлы)"
+
+#: source/ubl-settings-quotas.cc:318 source/ubl-settings-quotas.cc:322
+#: source/ubl-settings-quotas.cc:314 source/ubl-settings-quotas.cc:261
+#, fuzzy
+msgid ""
+"Hard limit\n"
+"(size)"
+msgstr ""
+"Жесткий предел\n"
+"(размер) задержки"
+
+#: source/ubl-settings-quotas.cc:319 source/ubl-settings-quotas.cc:323
+#: source/ubl-settings-quotas.cc:315 source/ubl-settings-quotas.cc:262
+#, fuzzy
+msgid ""
+"Hard limit\n"
+"(size) delay"
+msgstr ""
+"Жесткий предел\n"
+"(размер) задержки"
+
+#: source/ubl-settings-quotas.cc:247 source/ubl-settings-quotas.cc:382
+#, fuzzy
+msgid ""
+"Hard limit\n"
+"activation\n"
+"time (files)"
+msgstr ""
+"Время активации\n"
+"жесткого лимита\n"
+"(файла)"
+
+#: source/ubl-settings-quotas.cc:240 source/ubl-settings-quotas.cc:375
+msgid ""
+"Hard limit\n"
+"activation\n"
+"time (size)"
+msgstr ""
+"Время активации\n"
+"жесткого лимита\n"
+"(объём)"
+
+#: source/ubl-settings-quotas.cc:195 source/ubl-settings-quotas.cc:125
+#: source/ubl-settings-quotas.cc:115 source/ubl-settings-quotas.cc:136
+#: source/ubl-settings-quotas.cc:133 source/ubl-settings-quotas.cc:130
+msgid "Hard limit (file) activation time"
+msgstr "Время активации жесткого лимита (файла)"
+
+#: source/ubl-settings-quotas.cc:123 source/ubl-settings-quotas.cc:113
+#: source/ubl-settings-quotas.cc:134 source/ubl-settings-quotas.cc:131
+#: source/ubl-settings-quotas.cc:128
+msgid "Hard limit (files)"
+msgstr "Жесткий лимит (файлы)"
+
+#: source/ubl-settings-quotas.cc:124 source/ubl-settings-quotas.cc:114
+#: source/ubl-settings-quotas.cc:135 source/ubl-settings-quotas.cc:132
+#: source/ubl-settings-quotas.cc:129
+msgid "Hard limit (files) delay"
+msgstr "Жесткий лимит (файлы)"
+
+#: source/ubl-settings-quotas.cc:188 source/ubl-settings-quotas.cc:118
+#: source/ubl-settings-quotas.cc:108 source/ubl-settings-quotas.cc:129
+#: source/ubl-settings-quotas.cc:126 source/ubl-settings-quotas.cc:123
+msgid "Hard limit (size)"
+msgstr "Жесткий лимит (объём)"
+
+#: source/ubl-settings-quotas.cc:120 source/ubl-settings-quotas.cc:110
+#: source/ubl-settings-quotas.cc:131 source/ubl-settings-quotas.cc:128
+#: source/ubl-settings-quotas.cc:125
+msgid "Hard limit (size) activation time"
+msgstr "Жесткий предел (размер)"
+
+#: source/ubl-settings-quotas.cc:119 source/ubl-settings-quotas.cc:109
+#: source/ubl-settings-quotas.cc:130 source/ubl-settings-quotas.cc:127
+#: source/ubl-settings-quotas.cc:124
+msgid "Hard limit (size) delay"
+msgstr "Жесткий предел (размер) задержки"
+
+#: source/ubl-settings-quotas.cc:190
+msgid "Hard limit activation time (size)"
+msgstr "Время активации жесткого ограничения (объём)"
+
+#: source/ubl-settings-quotas.cc:225 source/ubl-settings-quotas.cc:155
+#: source/ubl-settings-quotas.cc:145
+msgid "Help"
+msgstr "Справка"
+
+#: source/ubl-settings-quotas.cc:179 source/ubl-settings-quotas.cc:109
+#: source/ubl-settings-quotas.cc:99 source/ubl-settings-quotas.cc:120
+#: source/ubl-settings-quotas.cc:117 source/ubl-settings-quotas.cc:114
+msgid "Load"
+msgstr "Загрузить"
+
+#: source/ubl-settings-quotas.cc:222 source/ubl-settings-quotas.cc:152
+#: source/ubl-settings-quotas.cc:142
+msgid "Load global configuration"
+msgstr "Загрузить глобальную конфигурацию"
+
+#: source/ubl-settings-quotas.cc:223 source/ubl-settings-quotas.cc:153
+#: source/ubl-settings-quotas.cc:143
+msgid "Load local configuration"
+msgstr "Загрузить локальную конфигурацию"
+
+#: source/ubl-settings-quotas.cc:608 source/ubl-settings-quotas.cc:521
+#: source/ubl-settings-quotas.cc:455
+msgid "Local configuration downloaded successfully"
+msgstr "Успешно загружена локальная конфигурация"
+
+#: source/ubl-settings-quotas.cc:581 source/ubl-settings-quotas.cc:494
+#: source/ubl-settings-quotas.cc:428
+#, fuzzy
+msgid "Local configuration reading error"
+msgstr "Загрузить локальную конфигурацию"
+
+#: source/ubl-settings-quotas.cc:614 source/ubl-settings-quotas.cc:527
+#: source/ubl-settings-quotas.cc:461
+msgid "Local configuration successfully written"
+msgstr "Успешно записана локальная конфигурация"
+
+#: source/ubl-settings-quotas.cc:589 source/ubl-settings-quotas.cc:502
+#: source/ubl-settings-quotas.cc:436
+#, fuzzy
+msgid "Local configuration write error"
+msgstr "Загрузить локальную конфигурацию"
+
+#: source/ubl-settings-quotas.cc:184 source/ubl-settings-quotas.cc:234
+#: source/ubl-settings-quotas.cc:114 source/ubl-settings-quotas.cc:369
+#: source/ubl-settings-quotas.cc:104 source/ubl-settings-quotas.cc:314
+#: source/ubl-settings-quotas.cc:125 source/ubl-settings-quotas.cc:318
+#: source/ubl-settings-quotas.cc:122 source/ubl-settings-quotas.cc:310
+#: source/ubl-settings-quotas.cc:119
+msgid "Name"
+msgstr "Имя"
+
+#: source/ubl-settings-quotas.cc:623 source/ubl-settings-quotas.cc:536
+#: source/ubl-settings-quotas.cc:470
+msgid "Nothing to save!"
+msgstr "Нечего сохранять!"
+
+#: source/ubl-settings-quotas.cc:143 source/ubl-settings-quotas.cc:73
+#: source/ubl-settings-quotas.cc:65 source/ubl-settings-quotas.cc:86
+#: source/ubl-settings-quotas.cc:83 source/ubl-settings-quotas.cc:80
+#: source/ubl-settings-quotas.cc:79
+msgid "Project Home Page"
+msgstr "Главная страница проекта"
+
+#: source/ubl-settings-quotas.cc:185 source/ubl-settings-quotas.cc:235
+#: source/ubl-settings-quotas.cc:115 source/ubl-settings-quotas.cc:370
+#: source/ubl-settings-quotas.cc:105 source/ubl-settings-quotas.cc:315
+#: source/ubl-settings-quotas.cc:126 source/ubl-settings-quotas.cc:319
+#: source/ubl-settings-quotas.cc:123 source/ubl-settings-quotas.cc:311
+#: source/ubl-settings-quotas.cc:258 source/ubl-settings-quotas.cc:120
+msgid "Quotas"
+msgstr "Квоты"
+
+#: source/ubl-settings-quotas.cc:151 source/ubl-settings-quotas.cc:81
+#: source/ubl-settings-quotas.cc:71
+msgid "Quotas for groups"
+msgstr "Квоты для групп"
+
+#: source/ubl-settings-quotas.cc:154 source/ubl-settings-quotas.cc:84
+#: source/ubl-settings-quotas.cc:74
+msgid "Quotas for users"
+msgstr "Квоты для пользователей"
+
+#: source/ubl-settings-quotas.cc:180 source/ubl-settings-quotas.cc:110
+#: source/ubl-settings-quotas.cc:100 source/ubl-settings-quotas.cc:121
+#: source/ubl-settings-quotas.cc:118 source/ubl-settings-quotas.cc:115
+msgid "Save"
+msgstr "Сохранить"
+
+#: source/ubl-settings-quotas.cc:226 source/ubl-settings-quotas.cc:156
+#: source/ubl-settings-quotas.cc:146
+msgid "Save in global and local configuration"
+msgstr "Сохранить в глобальную и локальную конфигурацию"
+
+#: source/ubl-settings-quotas.cc:227 source/ubl-settings-quotas.cc:157
+#: source/ubl-settings-quotas.cc:147
+msgid "Save in global configuration"
+msgstr "Сохранить в глобальную конфигурацию"
+
+#: source/ubl-settings-quotas.cc:228 source/ubl-settings-quotas.cc:158
+#: source/ubl-settings-quotas.cc:148
+msgid "Save in local configuration"
+msgstr "Сохранить в локальную конфигурацию"
+
+#: source/ubl-settings-quotas.cc:140 source/ubl-settings-quotas.cc:70
+msgid "Setting user quotas"
+msgstr "Настройка квот пользователей"
+
+#: source/ubl-settings-quotas.cc:245 source/ubl-settings-quotas.cc:380
+msgid ""
+"Severe\n"
+"limitation\n"
+"(files)"
+msgstr ""
+"Жесткое\n"
+"лимит\n"
+"(файлы)"
+
+#: source/ubl-settings-quotas.cc:238 source/ubl-settings-quotas.cc:373
+msgid ""
+"Severe\n"
+"limitation\n"
+"(size)"
+msgstr ""
+"Жесткое\n"
+"лимит\n"
+"(объём)"
+
+#: source/ubl-settings-quotas.cc:193
+msgid "Severe limitation (files)"
+msgstr "Жесткое лимит (файлы)"
+
+#: source/ubl-settings-quotas.cc:186 source/ubl-settings-quotas.cc:199
+#: source/ubl-settings-quotas.cc:210 source/ubl-settings-quotas.cc:236
+#: source/ubl-settings-quotas.cc:116 source/ubl-settings-quotas.cc:129
+#: source/ubl-settings-quotas.cc:140 source/ubl-settings-quotas.cc:371
+#: source/ubl-settings-quotas.cc:106 source/ubl-settings-quotas.cc:119
+#: source/ubl-settings-quotas.cc:130 source/ubl-settings-quotas.cc:316
+#: source/ubl-settings-quotas.cc:127 source/ubl-settings-quotas.cc:151
+#: source/ubl-settings-quotas.cc:320 source/ubl-settings-quotas.cc:124
+#: source/ubl-settings-quotas.cc:137 source/ubl-settings-quotas.cc:148
+#: source/ubl-settings-quotas.cc:312 source/ubl-settings-quotas.cc:259
+#: source/ubl-settings-quotas.cc:121
+msgid "Size"
+msgstr "Объём"
+
+#: source/ubl-settings-quotas.cc:244 source/ubl-settings-quotas.cc:379
+msgid ""
+"Soft\n"
+"Restriction\n"
+"(files)"
+msgstr ""
+"Мягкое\n"
+"лимит\n"
+"(файлы)"
+
+#: source/ubl-settings-quotas.cc:192
+msgid "Soft Restriction (files)"
+msgstr "Мягкое лимит (файлы)"
+
+#: source/ubl-settings-quotas.cc:202 source/ubl-settings-quotas.cc:205
+#: source/ubl-settings-quotas.cc:212 source/ubl-settings-quotas.cc:217
+#: source/ubl-settings-quotas.cc:132 source/ubl-settings-quotas.cc:135
+#: source/ubl-settings-quotas.cc:142 source/ubl-settings-quotas.cc:147
+#: source/ubl-settings-quotas.cc:122 source/ubl-settings-quotas.cc:125
+#: source/ubl-settings-quotas.cc:137 source/ubl-settings-quotas.cc:143
+#: source/ubl-settings-quotas.cc:146 source/ubl-settings-quotas.cc:153
+#: source/ubl-settings-quotas.cc:158 source/ubl-settings-quotas.cc:140
+#: source/ubl-settings-quotas.cc:150 source/ubl-settings-quotas.cc:155
+#, fuzzy
+msgid "Soft limit"
+msgstr "Мягкий лимит"
+
+#: source/ubl-settings-quotas.cc:322 source/ubl-settings-quotas.cc:326
+#: source/ubl-settings-quotas.cc:318 source/ubl-settings-quotas.cc:265
+#, fuzzy
+msgid ""
+"Soft limit\n"
+"(files)"
+msgstr ""
+"Мягкий\n"
+"лимит\n"
+"(файлы)"
+
+#: source/ubl-settings-quotas.cc:237 source/ubl-settings-quotas.cc:372
+#: source/ubl-settings-quotas.cc:317 source/ubl-settings-quotas.cc:321
+#: source/ubl-settings-quotas.cc:313 source/ubl-settings-quotas.cc:260
+#, fuzzy
+msgid ""
+"Soft limit\n"
+"(size)"
+msgstr ""
+"Мягкий лимит\n"
+"(объём)"
+
+msgid ""
+"Soft limit\n"
+"(file)"
+msgstr ""
+"Мягкий лимит\n"
+"(файлы)"
+
+#: source/ubl-settings-quotas.cc:122 source/ubl-settings-quotas.cc:112
+#: source/ubl-settings-quotas.cc:133 source/ubl-settings-quotas.cc:130
+#: source/ubl-settings-quotas.cc:127
+msgid "Soft limit (files)"
+msgstr ""
+"Мягкий лимит\n"
+"(файлы)"
+
+#: source/ubl-settings-quotas.cc:187 source/ubl-settings-quotas.cc:117
+#: source/ubl-settings-quotas.cc:107 source/ubl-settings-quotas.cc:128
+#: source/ubl-settings-quotas.cc:125 source/ubl-settings-quotas.cc:122
+msgid "Soft limit (size)"
+msgstr "Мягкий лимит (объём)"
+
+#: source/ubl-settings-quotas.cc:620 source/ubl-settings-quotas.cc:533
+#: source/ubl-settings-quotas.cc:467
+#, fuzzy
+msgid "Successfully saved local and global configuration"
+msgstr "Сохранить глобальную и локальную конфигурацию"
+
+#: source/ubl-settings-quotas.cc:59 source/ubl-settings-quotas.cc:55
+#: source/ubl-settings-quotas.cc:47 source/ubl-settings-quotas.cc:68
+#: source/ubl-settings-quotas.cc:70 source/ubl-settings-quotas.cc:67
+#: source/ubl-settings-quotas.cc:66
+msgid "The program must be run as root"
+msgstr "Программа должна быть запущена от имени root"
+
+#: source/ubl-settings-quotas.cc:209 source/ubl-settings-quotas.cc:139
+#: source/ubl-settings-quotas.cc:129 source/ubl-settings-quotas.cc:150
+#: source/ubl-settings-quotas.cc:147
+msgid "User quotas for this device: "
+msgstr "Квоты пользователей для этого устройства: "
+
+#: source/ubl-settings-quotas.cc:148 source/ubl-settings-quotas.cc:78
+#: source/ubl-settings-quotas.cc:68 source/ubl-settings-quotas.cc:89
+#: source/ubl-settings-quotas.cc:86 source/ubl-settings-quotas.cc:83
+#: source/ubl-settings-quotas.cc:82
+msgid "Users"
+msgstr "Пользователи"
+
+#: source/ubl-settings-quotas.cc:163 source/ubl-settings-quotas.cc:164
+#: source/ubl-settings-quotas.cc:165 source/ubl-settings-quotas.cc:166
+#: source/ubl-settings-quotas.cc:93 source/ubl-settings-quotas.cc:94
+#: source/ubl-settings-quotas.cc:95 source/ubl-settings-quotas.cc:96
+#: source/ubl-settings-quotas.cc:83 source/ubl-settings-quotas.cc:84
+#: source/ubl-settings-quotas.cc:85 source/ubl-settings-quotas.cc:86
+#: source/ubl-settings-quotas.cc:104 source/ubl-settings-quotas.cc:105
+#: source/ubl-settings-quotas.cc:106 source/ubl-settings-quotas.cc:107
+#: source/ubl-settings-quotas.cc:101 source/ubl-settings-quotas.cc:102
+#: source/ubl-settings-quotas.cc:103 source/ubl-settings-quotas.cc:98
+#: source/ubl-settings-quotas.cc:99 source/ubl-settings-quotas.cc:100
+#: source/ubl-settings-quotas.cc:97
+msgid "days"
+msgstr "дни"
+
+#: source/ubl-settings-quotas.cc:219 source/ubl-settings-quotas.cc:220
+#: source/ubl-settings-quotas.cc:149 source/ubl-settings-quotas.cc:150
+#: source/ubl-settings-quotas.cc:139 source/ubl-settings-quotas.cc:140
+#: source/ubl-settings-quotas.cc:160 source/ubl-settings-quotas.cc:161
+#: source/ubl-settings-quotas.cc:157 source/ubl-settings-quotas.cc:158
+#, fuzzy
+msgid "files"
+msgstr "Файлы"
+
+#: source/ubl-settings-quotas.cc:167 source/ubl-settings-quotas.cc:168
+#: source/ubl-settings-quotas.cc:169 source/ubl-settings-quotas.cc:170
+#: source/ubl-settings-quotas.cc:97 source/ubl-settings-quotas.cc:98
+#: source/ubl-settings-quotas.cc:99 source/ubl-settings-quotas.cc:100
+#: source/ubl-settings-quotas.cc:87 source/ubl-settings-quotas.cc:88
+#: source/ubl-settings-quotas.cc:89 source/ubl-settings-quotas.cc:90
+#: source/ubl-settings-quotas.cc:108 source/ubl-settings-quotas.cc:109
+#: source/ubl-settings-quotas.cc:110 source/ubl-settings-quotas.cc:111
+#: source/ubl-settings-quotas.cc:105 source/ubl-settings-quotas.cc:106
+#: source/ubl-settings-quotas.cc:107 source/ubl-settings-quotas.cc:102
+#: source/ubl-settings-quotas.cc:103 source/ubl-settings-quotas.cc:104
+#: source/ubl-settings-quotas.cc:101
+msgid "hours"
+msgstr "часы"
+
+#: source/ubl-settings-quotas.cc:141 source/ubl-settings-quotas.cc:71
+#: source/ubl-settings-quotas.cc:63 source/ubl-settings-quotas.cc:84
+#: source/ubl-settings-quotas.cc:81 source/ubl-settings-quotas.cc:78
+#: source/ubl-settings-quotas.cc:77
+msgid "https://wiki.ublinux.com"
+msgstr "https://wiki.ublinux.ru"
+
+#: source/ubl-settings-quotas.cc:548 source/ubl-settings-quotas.cc:461
+msgid ""
+"https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/"
+msgstr ""
+
+#: source/ubl-settings-quotas.cc:171 source/ubl-settings-quotas.cc:172
+#: source/ubl-settings-quotas.cc:173 source/ubl-settings-quotas.cc:174
+#: source/ubl-settings-quotas.cc:101 source/ubl-settings-quotas.cc:102
+#: source/ubl-settings-quotas.cc:103 source/ubl-settings-quotas.cc:104
+#: source/ubl-settings-quotas.cc:91 source/ubl-settings-quotas.cc:92
+#: source/ubl-settings-quotas.cc:93 source/ubl-settings-quotas.cc:94
+#: source/ubl-settings-quotas.cc:112 source/ubl-settings-quotas.cc:113
+#: source/ubl-settings-quotas.cc:114 source/ubl-settings-quotas.cc:115
+#: source/ubl-settings-quotas.cc:109 source/ubl-settings-quotas.cc:110
+#: source/ubl-settings-quotas.cc:111 source/ubl-settings-quotas.cc:106
+#: source/ubl-settings-quotas.cc:107 source/ubl-settings-quotas.cc:108
+#: source/ubl-settings-quotas.cc:105
+msgid "minutes"
+msgstr "минуты"
+
+#: source/ubl-settings-quotas.cc:257
+msgid "name"
+msgstr "имя"
+
+#: source/ubl-settings-quotas.cc:92 source/ubl-settings-quotas.cc:89
+#: source/ubl-settings-quotas.cc:86 source/ubl-settings-quotas.cc:85
+#, fuzzy
+msgid "quotas for groups"
+msgstr "Квоты для групп"
+
+#: source/ubl-settings-quotas.cc:95 source/ubl-settings-quotas.cc:92
+#: source/ubl-settings-quotas.cc:89 source/ubl-settings-quotas.cc:88
+#, fuzzy
+msgid "quotas for users"
+msgstr "Квоты для пользователей"
+
+#: source/ubl-settings-quotas.cc:629 source/ubl-settings-quotas.cc:542
+#: source/ubl-settings-quotas.cc:476 source/ubl-settings-quotas.cc:350
+#: source/ubl-settings-quotas.cc:371 source/ubl-settings-quotas.cc:318
+#: source/ubl-settings-quotas.cc:267 source/ubl-settings-quotas.cc:213
+msgid "ubl-settings-quotas version: "
+msgstr "ubl-settings-quotas версия: "
+
+#: source/ubl-settings-quotas.cc:159 source/ubl-settings-quotas.cc:160
+#: source/ubl-settings-quotas.cc:161 source/ubl-settings-quotas.cc:162
+#: source/ubl-settings-quotas.cc:89 source/ubl-settings-quotas.cc:90
+#: source/ubl-settings-quotas.cc:91 source/ubl-settings-quotas.cc:92
+#: source/ubl-settings-quotas.cc:79 source/ubl-settings-quotas.cc:80
+#: source/ubl-settings-quotas.cc:81 source/ubl-settings-quotas.cc:82
+#: source/ubl-settings-quotas.cc:100 source/ubl-settings-quotas.cc:101
+#: source/ubl-settings-quotas.cc:102 source/ubl-settings-quotas.cc:103
+#: source/ubl-settings-quotas.cc:97 source/ubl-settings-quotas.cc:98
+#: source/ubl-settings-quotas.cc:99 source/ubl-settings-quotas.cc:94
+#: source/ubl-settings-quotas.cc:95 source/ubl-settings-quotas.cc:96
+#: source/ubl-settings-quotas.cc:93
+msgid "weeks"
+msgstr "недели"
+
+msgid "Argument not recognized\n"
+msgstr "Аргумент не распознан\n"
+
+msgid "ubl-settings-diskquota version: "
+msgstr "ubl-settings-diskquota версия: "
+
+msgid "ubl-settings-quotas"
+msgstr "Квоты"
+
+msgid "General statistics"
+msgstr "Общая статистика"
+
+#~ msgid "Severe limitation (size)"
+#~ msgstr "Жесткое лимит (объём)"
+
+#, fuzzy
+#~ msgid "Hard limit activation time (files)"
+#~ msgstr "Время активации жесткого граничения (файла)"