diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1d74e21 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8c69de3 --- /dev/null +++ b/Makefile @@ -0,0 +1,157 @@ +#!/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 +FILE_VERSION = VERSION.md +DEPENDS = /bin/cmake +PREFIX ?= /usr +PKGNAME = $(MAKEFILE_DIR) +#PKGNAME = ubl-settings-manager + +default_target: all + +.PHONY: all init depend debug prepare check build uninstall install clean up_ver help + +all: init build + +init: + @echo "Initialize ..."; \ + sed -r "s/(version_application = ).*/\1\"$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2)\";/" -i source/ubl-settings-quotas.cc; \ + 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: + @echo "Debug ..." + if [ ! -d ${CMAKE_BUILD_DIR} ]; then \ + $(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \ + fi; \ + echo "Debug: OK" + +prepare: + @echo "Prepare ..."; \ + if [ ! -d ${CMAKE_BUILD_DIR} ]; then \ + $(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \ + fi; \ + echo "Prepare: OK" + +check: + @echo "Check ..."; \ + if [ -f ${CMAKE_BUILD_DIR}/${PKGNAME} ]; then \ + echo "Check: OK"; \ + else \ + echo "Check: ${CMAKE_BUILD_DIR}/${PKGNAME} not found !"; \ + exit 1; \ + fi + +build: depend prepare + @echo "Build ..."; \ + make --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) -rd "${DESTDIR}${PREFIX}/share/${PKGNAME}" + @if [ -z ${DESTDIR} ]; then \ + [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ + update-desktop-database --quiet &>/dev/null || true; \ + [ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ + fi + @echo "Uninstall: OK" + +install: check uninstall + @echo "Install ..." + @for FILE_PO in $(wildcard *.po); do \ + LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ + install -dm755 "${DESTDIR}${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 -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 -dm755 "${DESTDIR}${PREFIX}/share/${PKGNAME}"/{ui,css,images} + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/ui/" "${PKGNAME}.glade" + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/css/" "${PKGNAME}.css" + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/ui/" "${PKGNAME}-banner.png" + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.ubl-settings-quotas.checked.svg" + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.ubl-settings-quotas.warning.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" + +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 index eaa8e8c..ef1382a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,44 @@ # ubl-settings-quotas +# Настройки квот +[RU] Утилита для настройки квот +Utility for setting the date and time + +![alt text](screenshot/screenshot.png) + +# Build +In order to build ubl-settings-quotas you will need: + +- CMake +- C compiler +- GTK+ 3 & dependencies + +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 +``` +# Usage +```sh +$ ubl-settings-quotas --help +GTK settings quotas for UBLinux + +Usage: ubl-settings-quotas [OPTIONS...] +Options: + -h, --help Show this help + -V, --version Show package version + +$ ubl-settings-quotas --version +ubl-settings-quotas version: x.xx +``` diff --git a/VERSION.md b/VERSION.md new file mode 100644 index 0000000..12ebd01 --- /dev/null +++ b/VERSION.md @@ -0,0 +1 @@ +VERSION 1.0 diff --git a/com.ublinux.ubl-settings-quotas.checked.svg b/com.ublinux.ubl-settings-quotas.checked.svg new file mode 100644 index 0000000..e3cab42 --- /dev/null +++ b/com.ublinux.ubl-settings-quotas.checked.svg @@ -0,0 +1,327 @@ + + + + + + + + + + + + + + + + diff --git a/com.ublinux.ubl-settings-quotas.svg b/com.ublinux.ubl-settings-quotas.svg new file mode 100644 index 0000000..f636c26 --- /dev/null +++ b/com.ublinux.ubl-settings-quotas.svg @@ -0,0 +1,4957 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/com.ublinux.ubl-settings-quotas.warning.svg b/com.ublinux.ubl-settings-quotas.warning.svg new file mode 100644 index 0000000..9a90dba --- /dev/null +++ b/com.ublinux.ubl-settings-quotas.warning.svg @@ -0,0 +1,55 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/screenshot/screenshot.png b/screenshot/screenshot.png new file mode 100644 index 0000000..3fa8cdd 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..9e72be6 --- /dev/null +++ b/source/CMakeLists.txt @@ -0,0 +1,33 @@ +cmake_minimum_required(VERSION 3.7) +project(ubl-settings-quotas) + +find_package(PkgConfig REQUIRED) + +pkg_check_modules(GTK REQUIRED gtkmm-3.0) +include_directories(${GTK_INCLUDE_DIRS}) +link_directories(${GTK_LIBRARY_DIRS}) +add_definitions(${GTK_CFLAGS_OTHER}) +find_package(ICU REQUIRED COMPONENTS uc dt in io) + +#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 \ + -O2 -pipe -fno-plt -fexceptions \ + -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ + -fstack-clash-protection -fcf-protection -g") + +set(SOURCE_FILES + util.h + util.cc + ubl-util-standard.h + ubl-util-standard.c + ubl-settings-quotas.h + ubl-settings-quotas.cc + main.cc) + +set(LIBRARIES + ${GTK_LIBRARIES} + pthread) + +add_executable(ubl-settings-quotas ${SOURCE_FILES}) +target_link_libraries(ubl-settings-quotas ${LIBRARIES} ${ICU_LIBRARIES}) +install(TARGETS ubl-settings-quotas DESTINATION bin) \ No newline at end of file diff --git a/source/main.cc b/source/main.cc new file mode 100644 index 0000000..4aa2a5a --- /dev/null +++ b/source/main.cc @@ -0,0 +1,76 @@ +#include "ubl-settings-quotas.h" + + +void pars_flag(int index_start, int argc, char* argv[]); + +int main(int argc, char** argv) { + string str_argv= ""; + string str_cmd_argv = ""; + for (int i=1; i 1){ + str_argv = argv[1]; + } + bindtextdomain(app_name.c_str(), "/usr/share/locale/"); + bind_textdomain_codeset(app_name.c_str(), "UTF-8"); + textdomain(app_name.c_str()); + if (str_argv.find("--socket-id") != std::string::npos) { + auto app = Gtk::Application::create(argc, argv, "org.gtkmm.example.plug"); + auto builder = Gtk::Builder::create_from_file(path_glade); + Glib::init(); + setlocale(LC_ALL, ""); + Glib::OptionContext context; + + CmdArgParser parser{ + "Socket ID", + "Command line argument for socket ID communication.", + "No help available, sorry" + }; + + context.set_main_group(parser); + context.parse(argc, argv); + + ::Window socketID = parser.GetSocketID(); + + // Handle plug: + SettingsPlug plug{socketID, builder}; + plug.show(); + + app->run(plug); + return 0; + } + else if (str_argv.find("-") != std::string::npos || argc == 1) { + int len_argv = 1; + auto app = Gtk::Application::create(len_argv, argv, "org.gtkmm.example.plug"); + auto builder = Gtk::Builder::create_from_file(path_glade); + pars_flag(1, argc, argv); + MainWindow* wnd = nullptr; + builder->get_widget_derived("MainWindow", wnd); + auto r = app->run(*wnd); + delete wnd; + return r; + } + +} +void pars_flag(int index_start, int argc, char* argv[]) { + string str_argv = ""; + for (int i = index_start; i const& builder) + : Gtk::ApplicationWindow(obj), builder{builder} { + this->builder = builder; + this->settings(); +} + +MainWindow::MainWindow(Glib::RefPtr const& builder) { + this->builder = builder; + this->settings(); +} + +void MainWindow::settings() { + this->get_builder(); + this->lacalization(); + this->add_CSS(); + btnBoxAboutDialog->set_visible(false); + Gtk::Widget *boxWidget; + builder->get_widget("boxColor", boxWidget); + HeadOverlay->add_overlay(*boxWidget); + ubl_make_plugs(boxSave, boxButton, socket_ext_id_I, socket_trd_id_I); + if (geteuid() == 0) { + } + else { + boxFuncs->set_sensitive(false); + btnSave->set_sensitive(false); + btnLoad->set_sensitive(false); + imgInfo->set_from_icon_name("com.ublinux.ubl-settings-datetime.warning", Gtk::ICON_SIZE_MENU); + info_status_app("boxInfoMessError"); + lblWarning->set_text(gettext("The program must be run as root")); + } +} + +void MainWindow::lacalization() { + time_t now = time(0); + tm *ltm = localtime(&now); + unsigned int year = 1900+ ltm->tm_year; + string str_authors = string(gettext("Copyright © UBSoft LLC, 2022 - ")) + to_string(year); + aboutWindows->set_copyright(str_authors); + aboutWindows->set_comments(gettext("Date and Time")); + aboutWindows->set_website(gettext("https://wiki.ublinux.com")); + aboutWindows->set_version(gettext(version_application.c_str())); + aboutWindows->set_website_label(gettext("Project Home Page")); + generalTabLabel->set_text(gettext("General settings")); + GroupsTabLabel->set_text(gettext("Groups")); + UsersTabLabel->set_text(gettext("Users")); + generalDeviceLabel->set_text(gettext("Device:")); + generalFileSystemLabel->set_text(gettext("File system:")); + generalGroupsFrameLabel->set_text(gettext("quotas for groups")); + generalGroupsEnableCheck->set_label(gettext("Enable")); + generalUsersEnableCheck->set_label(gettext("Enable")); + generalUsersFrameLabel->set_label(gettext("quotas for users")); + generalGroupsSizeLabel->set_text(gettext("Excess size delay period")); + generalGroupsFilesLabel->set_text(gettext("Excess files delay period")); + generalUsersSizeLabel->set_text(gettext("Excess size delay period")); + generalUsersFilesLabel->set_text(gettext("Excess files delay period")); + generalGroupsSizeWeeksLabel->set_text(gettext("weeks")); + generalGroupsFilesWeeksLabel->set_text(gettext("weeks")); + generalUsersSizeWeeksLabel->set_text(gettext("weeks")); + generalUsersFilesWeeksLabel->set_text(gettext("weeks")); + generalGroupsSizeDaysLabel->set_text(gettext("days")); + generalGroupsFilesDaysLabel->set_text(gettext("days")); + generalUsersSizeDaysLabel->set_text(gettext("days")); + generalUsersFilesDaysLabel->set_text(gettext("days")); + generalGroupsSizeHoursLabel->set_text(gettext("hours")); + generalGroupsFilesHoursLabel->set_text(gettext("hours")); + generalUsersSizeHoursLabel->set_text(gettext("hours")); + generalUsersFilesHoursLabel->set_text(gettext("hours")); + generalGroupsSizeMinutesLabel->set_text(gettext("minutes")); + generalGroupsFilesMinutesLabel->set_text(gettext("minutes")); + generalUsersSizeMinutesLabel->set_text(gettext("minutes")); + generalUsersFilesMinutesLabel->set_text(gettext("minutes")); + lblLoad->set_text(gettext("Load")); + lblSave->set_text(gettext("Save")); +} + +void MainWindow::add_CSS() { + Glib::RefPtr cssProvider = Gtk::CssProvider::create(); + cssProvider->load_from_path(path_css); + Glib::RefPtr styleContext = Gtk::StyleContext::create(); + Glib::RefPtr screen = Gdk::Screen::get_default();//get default screen + styleContext->add_provider_for_screen(screen, cssProvider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);//add provider for screen in all application + HeadBackgroundImage->set(path_img_head_background); + //Glib::RefPtr headerTopic_css = headerTopic->get_style_context(); + Glib::RefPtr boxButton_css = boxButton->get_style_context(); + Glib::RefPtr boxSave_css = boxSave->get_style_context(); + Glib::RefPtr headerBar_css = headerBar->get_style_context(); + if (socket_trd_id_I == 0 && socket_ext_id_I == 0){ + boxButton_css->add_class("bkim_no_plug"); + boxSave_css->add_class("bkim_no_plug"); + } + + //headerTopic_css->add_class("textHead"); +} + + + +void MainWindow::get_builder() { + builder->set_translation_domain(path_app); + builder->get_widget("headerTopic", headerTopic); + builder->get_widget("boxButton", boxButton); + builder->get_widget("boxSave", boxSave); + builder->get_widget("aboutWindows", aboutWindows); + builder->get_widget("HeadOverlay", HeadOverlay); + builder->get_widget("headerBar", headerBar); + builder->get_widget("boxFuncs", boxFuncs); + builder->get_widget("btnLoad", btnLoad); + builder->get_widget("btnSave", btnSave); + builder->get_widget("btnBoxAboutDialog", btnBoxAboutDialog); + builder->get_widget("HeadBackgroundImage", HeadBackgroundImage); + builder->get_widget("imgInfo", imgInfo); + builder->get_widget("lblWarning", lblWarning); + builder->get_widget("boxInfoError", boxInfoError); + builder->get_widget("imgInfo", imgInfo); + builder->get_widget("generalTabLabel", generalTabLabel); + builder->get_widget("GroupsTabLabel", GroupsTabLabel); + builder->get_widget("UsersTabLabel", UsersTabLabel); + builder->get_widget("generalDeviceLabel", generalDeviceLabel); + builder->get_widget("generalGroupsFrameLabel", generalGroupsFrameLabel); + builder->get_widget("generalGroupsSizeLabel", generalGroupsSizeLabel); + builder->get_widget("generalGroupsFilesLabel", generalGroupsFilesLabel); + builder->get_widget("generalUsersFrameLabel", generalUsersFrameLabel); + builder->get_widget("generalUsersSizeLabel", generalUsersSizeLabel); + builder->get_widget("generalUsersFilesLabel", generalUsersFilesLabel); + builder->get_widget("generalGroupsSizeWeeksLabel", generalGroupsSizeWeeksLabel); + builder->get_widget("generalGroupsFilesWeeksLabel", generalGroupsFilesWeeksLabel); + builder->get_widget("generalUsersSizeWeeksLabel", generalUsersSizeWeeksLabel); + builder->get_widget("generalUsersFilesWeeksLabel", generalUsersFilesWeeksLabel); + builder->get_widget("generalGroupsSizeDaysLabel", generalGroupsSizeDaysLabel); + builder->get_widget("generalGroupsFilesDaysLabel", generalGroupsFilesDaysLabel); + builder->get_widget("generalUsersSizeDaysLabel", generalUsersSizeDaysLabel); + builder->get_widget("generalUsersFilesDaysLabel", generalUsersFilesDaysLabel); + builder->get_widget("generalGroupsSizeHoursLabel", generalGroupsSizeHoursLabel); + builder->get_widget("generalGroupsFilesHoursLabel", generalGroupsFilesHoursLabel); + builder->get_widget("generalUsersSizeHoursLabel", generalUsersSizeHoursLabel); + builder->get_widget("generalUsersFilesHoursLabel", generalUsersFilesHoursLabel); + builder->get_widget("generalGroupsSizeMinutesLabel", generalGroupsSizeMinutesLabel); + builder->get_widget("generalGroupsFilesMinutesLabel", generalGroupsFilesMinutesLabel); + builder->get_widget("generalUsersSizeMinutesLabel", generalUsersSizeMinutesLabel); + builder->get_widget("generalUsersFilesMinutesLabel", generalUsersFilesMinutesLabel); + builder->get_widget("generalFileSystemLabel", generalFileSystemLabel); + builder->get_widget("generalGroupsEnableCheck", generalGroupsEnableCheck); + builder->get_widget("generalUsersEnableCheck", generalUsersEnableCheck); + builder->get_widget("lblLoad", lblLoad); + builder->get_widget("lblSave", lblSave); + builder->get_widget("btnSettings", btnSettings); +} + +void MainWindow::event() { + btnLoadGlob->signal_activate().connect([&]() {}); + btnLoadLocal->signal_activate().connect([&]() {}); + btnSynopsis->signal_activate().connect([&]() {}); + btnAbout->signal_activate().connect([&]() {}); + btnSaveLocalGlob->signal_activate().connect([&]() {}); + btnSaveGlob->signal_activate().connect([&]() {}); + btnSaveLocal->signal_activate().connect([&]() {}); +} + +void MainWindow::info_status_app(string stule) { + Glib::RefPtr boxInfo = boxInfoError->get_style_context(); + boxInfo->remove_class("boxInfoMessOK"); + boxInfo->remove_class("boxInfoMessError"); + boxInfo->add_class(stule); +} + +SettingsPlug::SettingsPlug(::Window p_socketID, Glib::RefPtr builder) + :Gtk::Plug{p_socketID} { + MainWindow* wnd = nullptr; + builder->get_widget_derived("window", wnd); + builder->get_widget("plugBox", plugBox); + plugBox->get_parent()->remove(*plugBox); + add(*plugBox); + show_all_children(); +} + +void help() { + string version = string(gettext("ubl-settings-quotas version: ")) + version_application + "\n"; + cout << version.c_str(); + string help; + help = "GTK settings quotas. for UBLinux\n\n" + "Usage: ubl-settings-quotas [OPTIONS...]\n" + "Options:\n" + " -h, --help Show this help\n" + " -V, --version Show package version\n"; + cout << gettext(help.c_str()); + +} + diff --git a/source/ubl-settings-quotas.h b/source/ubl-settings-quotas.h new file mode 100644 index 0000000..72c223f --- /dev/null +++ b/source/ubl-settings-quotas.h @@ -0,0 +1,117 @@ +#ifndef UBL_SETTINGS_QUOTAS_H +#define UBL_SETTINGS_QUOTAS_H +#include +#include +#include +#include +#include + +#include "ubl-util-standard.c" +#include "util.h" + + +using namespace std; + +extern const string path_app; +extern const string path_glade; +extern const string app_name; +extern const string path_locale; +extern const string path_css; +extern const string path_img_head_background; +extern int socket_ext_id_I; +extern int socket_trd_id_I; +extern string version_application; +class CmdArgParser : public Glib::OptionGroup { +public: + CmdArgParser(const std::string& p_name, const std::string& p_description, const std::string& p_help); + ::Window GetSocketID() const; +private: + int m_socketID = 0; + +}; + +class MainWindow : public Gtk::ApplicationWindow { + public: + Glib::RefPtr builder; + template + struct Result{ + Type response; + int error; + }; + Gtk::Label *headerTopic; + Gtk::AboutDialog *aboutWindows; + Gtk::Overlay *HeadOverlay; + Gtk::HeaderBar *headerBar; + Gtk::Box *boxSave; + Gtk::Box *boxButton; + Gtk::Box *boxFuncs; + Gtk::MenuButton *btnSave; + Gtk::MenuButton *btnLoad; + Gtk::MenuButton *btnSettings; + Gtk::ButtonBox *btnBoxAboutDialog; + Gtk::Image *HeadBackgroundImage; + Gtk::Image *imgInfo; + Gtk::Box *boxInfoError; + Gtk::Label *lblWarning; + Gtk::Label *generalTabLabel; + Gtk::Label *UsersTabLabel; + Gtk::Label *GroupsTabLabel; + Gtk::Label *generalDeviceLabel; + Gtk::Label *generalGroupsFrameLabel; + Gtk::Label *generalGroupsSizeLabel; + Gtk::Label *generalGroupsFilesLabel; + Gtk::Label *generalUsersFrameLabel; + Gtk::Label *generalUsersSizeLabel; + Gtk::Label *generalUsersFilesLabel; + Gtk::Label *generalGroupsSizeWeeksLabel; + Gtk::Label *generalGroupsFilesWeeksLabel; + Gtk::Label *generalUsersSizeWeeksLabel; + Gtk::Label *generalUsersFilesWeeksLabel; + Gtk::Label *generalGroupsSizeDaysLabel; + Gtk::Label *generalGroupsFilesDaysLabel; + Gtk::Label *generalUsersSizeDaysLabel; + Gtk::Label *generalUsersFilesDaysLabel; + Gtk::Label *generalGroupsSizeHoursLabel; + Gtk::Label *generalGroupsFilesHoursLabel; + Gtk::Label *generalUsersSizeHoursLabel; + Gtk::Label *generalUsersFilesHoursLabel; + Gtk::Label *generalGroupsSizeMinutesLabel; + Gtk::Label *generalGroupsFilesMinutesLabel; + Gtk::Label *generalUsersSizeMinutesLabel; + Gtk::Label *generalUsersFilesMinutesLabel; + Gtk::Label *generalFileSystemLabel; + Gtk::Label *lblLoad; + Gtk::Label *lblSave; + Gtk::CheckButton *generalGroupsEnableCheck; + Gtk::CheckButton *generalUsersEnableCheck; + Gtk::MenuItem *btnLoadGlob; + Gtk::MenuItem *btnLoadLocal; + Gtk::MenuItem *btnSynopsis; + Gtk::MenuItem *btnAbout; + Gtk::MenuItem *btnSaveLocalGlob; + Gtk::MenuItem *btnSaveGlob; + Gtk::MenuItem *btnSaveLocal; + public: + MainWindow(BaseObjectType* obj, Glib::RefPtr const& builder); + MainWindow(Glib::RefPtr const& builder); + void settings(); + void lacalization(); + void add_CSS(); + void get_builder(); + void event(); + void info_status_app(string stule); + + +}; + +class SettingsPlug : public Gtk::Plug{ +public: + Gtk::Window *window; + SettingsPlug(::Window p_socketID, Glib::RefPtr builder); + +private: + Gtk::Widget *plugBox; + Gtk::Widget *parent; +}; +void help(); +#endif diff --git a/source/ubl-util-standard.c b/source/ubl-util-standard.c new file mode 100644 index 0000000..3b753b1 --- /dev/null +++ b/source/ubl-util-standard.c @@ -0,0 +1,91 @@ +#include "ubl-util-standard.h" +#ifndef __cplusplus +#ifndef UBL_GET_STANDARD_UI +#define UBL_GET_STANDARD_UI + + +inline returnstruct *ubl_make_plugs(GtkWidget *LeftWidget, GtkWidget *RightWidget, int left_plug_id, int right_plug_id){ + returnstruct *ret=(returnstruct*)malloc(sizeof(returnstruct*)); + if (left_plug_id>0&&LeftWidget){ + GtkWidget *plug=gtk_plug_new(left_plug_id); + GtkWidget *toplug=LeftWidget; + if (gtk_widget_get_parent(GTK_WIDGET(toplug))){ + g_object_ref(G_OBJECT(toplug)); + GtkWidget *parent=gtk_widget_get_parent(toplug); + gtk_container_remove(GTK_CONTAINER(parent),toplug); + gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); + } else + gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); + gtk_widget_show(GTK_WIDGET(plug)); + ret->plugLeft=plug; + } + if (right_plug_id>0&&RightWidget){ + GtkWidget *plug=gtk_plug_new(right_plug_id); + GtkWidget *toplug=RightWidget; + if (gtk_widget_get_parent(GTK_WIDGET(toplug))){ + g_object_ref(G_OBJECT(toplug)); + GtkWidget *parent=gtk_widget_get_parent(toplug); + gtk_container_remove(GTK_CONTAINER(parent),toplug); + gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); + } else + gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); + gtk_widget_show(GTK_WIDGET(plug)); + ret->plugRight=plug; + } + return ret; +} + +#endif + +#else + + +inline void ubl_make_plugs(Gtk::Widget *LeftWidget, Gtk::Widget *RightWidget, int left_plug_id, int right_plug_id){ + if (left_plug_id>0&&LeftWidget){ + GtkWidget *plug=gtk_plug_new(left_plug_id); + GtkWidget *toplug=GTK_WIDGET(LeftWidget->gobj()); + {GdkScreen *screen = gtk_widget_get_screen(plug); + gtk_widget_set_app_paintable(plug,TRUE); + GdkVisual *colormap = gdk_screen_get_rgba_visual(screen); + gtk_widget_set_visual(plug, colormap);} + {GdkScreen *screen = gtk_widget_get_screen(toplug); + gtk_widget_set_app_paintable(toplug,TRUE); + GdkVisual *colormap = gdk_screen_get_rgba_visual(screen); + gtk_widget_set_visual(toplug, colormap);} + if (gtk_widget_get_parent(GTK_WIDGET(toplug))){ + g_object_ref(G_OBJECT(toplug)); + GtkWidget *parent=gtk_widget_get_parent(toplug); + gtk_container_remove(GTK_CONTAINER(parent),toplug); + gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); + } else + gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); + gtk_widget_show(GTK_WIDGET(plug)); + gtk_style_context_add_class(gtk_widget_get_style_context(plug),"bkim"); + gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"bkim"); + gtk_style_context_add_class(gtk_widget_get_style_context(plug),"primary-toolbar"); + } + if (right_plug_id>0&&RightWidget){ + GtkWidget *plug=gtk_plug_new(right_plug_id); + GtkWidget *toplug=GTK_WIDGET(RightWidget->gobj()); + {GdkScreen *screen = gtk_widget_get_screen(plug); + gtk_widget_set_app_paintable(plug,TRUE); + GdkVisual *colormap = gdk_screen_get_rgba_visual(screen); + gtk_widget_set_visual(plug, colormap);} + {GdkScreen *screen = gtk_widget_get_screen(toplug); + gtk_widget_set_app_paintable(toplug,TRUE); + GdkVisual *colormap = gdk_screen_get_rgba_visual(screen); + gtk_widget_set_visual(toplug, colormap);} + if (gtk_widget_get_parent(GTK_WIDGET(toplug))){ + g_object_ref(G_OBJECT(toplug)); + GtkWidget *parent=gtk_widget_get_parent(toplug); + gtk_container_remove(GTK_CONTAINER(parent),toplug); + gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); + } else + gtk_container_add(GTK_CONTAINER(plug),GTK_WIDGET(toplug)); + gtk_widget_show(GTK_WIDGET(plug)); + gtk_style_context_add_class(gtk_widget_get_style_context(plug),"bkim"); + gtk_style_context_add_class(gtk_widget_get_style_context(toplug),"bkim"); + gtk_style_context_add_class(gtk_widget_get_style_context(plug),"primary-toolbar"); + } +} +#endif \ No newline at end of file diff --git a/source/ubl-util-standard.h b/source/ubl-util-standard.h new file mode 100644 index 0000000..3209625 --- /dev/null +++ b/source/ubl-util-standard.h @@ -0,0 +1,20 @@ +#ifndef __cplusplus +#include +#include + +typedef struct { + GtkWidget *plugLeft; + GtkWidget *plugRight; + + +} returnstruct; +static returnstruct *ubl_make_plugs(GtkWidget *LeftWidget, GtkWidget *RightWidget, int left_plug_id, int right_plug_id); +#else +#include +#include +#include +#include + + +static void ubl_make_plugs(Gtk::Widget *LeftWidget, Gtk::Widget *RightWidget, int left_plug_id, int right_plug_id); +#endif \ No newline at end of file diff --git a/source/util.cc b/source/util.cc new file mode 100644 index 0000000..d2ca2dd --- /dev/null +++ b/source/util.cc @@ -0,0 +1,195 @@ +#include "util.h" + + +array, 5> read_csv(const string& filename) { + array, 5> array_vectors; + vector vec_option; + vector vec_opcision; + ifstream file(filename); + string line; + char delimiter = ','; + getline(file, line); + while (getline(file, line)) { + stringstream stream(line); + string option; + string opcision; + getline(stream, option, delimiter); + string line_local = stream.str(); + if (line_local.find("\"") != string::npos) { + string str_delimiter = "\""; + vector point = find_all(line_local, str_delimiter); + size_t len = point.size(); + if (len >= 2) { + int index_start = point[len-2]; + int index_end = point[len-1]; + opcision = line_local.substr(index_start, index_end); + index_end = opcision.find("\""); + if (opcision.find("\"") != string::npos) { + opcision.replace(index_end, opcision.length(), ""); + } + + } + else { + opcision = "error"; + } + + + } + else{ + getline(stream, opcision, delimiter); + } + + + vec_option.push_back(option); + vec_opcision.push_back(opcision); + } + + array_vectors[0] = vec_option; + array_vectors[1] = vec_opcision; + return array_vectors; +} + +string call(string cmd) { + FILE *fp; + int status; + char path[PATH_MAX] = {0}; + fp = popen(cmd.c_str(), "r"); + if (fp == NULL) { + exit(1); + } + while (fgets(path, PATH_MAX, fp) != NULL) { + break; + } + status = pclose(fp); + if (status == -1) { + exit(1); + } + return path; +} +vector find_all(string &str_ntp, string substr) { + size_t index = 0; + vector sub_index; + while ((index = str_ntp.find(substr, index)) != std::string::npos) { + index += substr.length(); + sub_index.push_back(index); + } + return sub_index; +} + +void str_remove(std::string& source, std::string to_remove) { + string::size_type n = to_remove.length(); + for (string::size_type i = source.find(to_remove); + i != string::npos; + i = source.find(to_remove)) + source.erase(i, n); +} + +void str_replace_all(std::string& str_base, string str_find, string sReplacement) +{ + size_t pos = 0, fpos; + while ((fpos = str_base.find(str_find, pos)) != std::string::npos) + { + str_base.replace(fpos, str_find.size(), sReplacement); + pos = fpos + sReplacement.size(); + } +} +std::vector split(std::string text, char delim) { + std::string line; + std::vector vec; + std::stringstream ss(text); + while(std::getline(ss, line, delim)) { + vec.push_back(line); + } + return vec; +} +unsigned short read_uid_min_max(string filename, string search) { + std::string line; + int uid = 0; + string remove_tab = "\t"; + string remove_space = " "; + std::ifstream in(filename); // окрываем файл для чтения + if (in.is_open()){ + while (getline(in, line)){ + try{ + if (line.find(search) != string::npos && (line.find("SYS_"+search) == string::npos)) { + str_remove(line, search); + str_remove(line, remove_space); + str_remove(line, remove_tab); + uid = atoi(line.c_str()); + } + } + catch (int x) { + if (search == "UID_MIN"){ + uid = 1000; + } + else{ + uid = 65534; + } + + } + + } + } + else{ + if (search == "UID_MIN") { + uid = 1000; + } + else{ + uid = 65534; + } + } + in.close(); + return uid; + +} + +vector pars_users() { + vector vec_users; + unsigned short uid_min = read_uid_min_max("/etc/login.defs", "UID_MIN"); + unsigned short uid_max =read_uid_min_max("/etc/login.defs", "UID_MAX"); + while (true) { + errno = 0; + passwd* entry = getpwent(); + if (!entry) { + if (errno) { + break; + } + break; + } + if ((entry->pw_uid >= uid_min && entry->pw_uid < uid_max) || entry->pw_uid == 0) { + vec_users.push_back(string(entry->pw_name)); + } + } + endpwent(); + return vec_users; +} + +string read_passwd(string username) { + string passwd = ""; + std::string line; + std::ifstream in("/etc/shadow"); + if (in.is_open()) { + while (getline(in, line)) { + if (line.find(username) != string::npos) { + size_t index_start = line.find(":"); + if (index_start != string::npos) { + size_t index_end = line.find(":", index_start + 1); + passwd = line.substr(index_start+1, index_end - index_start-1); + break; + } + } + } + } + in.close(); + return passwd; +} + +int synopsis_show(string str_link) { + // gettext("https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/") + string cmd = "xdg-open " + str_link; + if (geteuid() == 0) { + string response_user = getlogin(); + cmd = "su -l " + response_user + " -c \" DISPLAY=$DISPLAY " + cmd + " \""; + } + return system(cmd.c_str()); +} \ No newline at end of file diff --git a/source/util.h b/source/util.h new file mode 100644 index 0000000..6c569e5 --- /dev/null +++ b/source/util.h @@ -0,0 +1,41 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace std; + + +struct Passwd { + string user; + int uid; +}; + +std::array, 5> read_csv(const std::string& filename); +std::string call(std::string cmd); +vector find_all(string &str_ntp, string substr); +void str_remove(std::string& source, std::string to_remove); +void str_replace_all(string &str_base, string str_find, string str_replace); +std::vector split(std::string text, char delim); +unsigned short read_uid_min_max(string filename, string search); +vector pars_users(); +string read_passwd(string username); +int synopsis_show(string str_link); diff --git a/ubl-settings-quotas-banner.png b/ubl-settings-quotas-banner.png new file mode 100644 index 0000000..8eb67cb Binary files /dev/null and b/ubl-settings-quotas-banner.png differ diff --git a/ubl-settings-quotas.css b/ubl-settings-quotas.css new file mode 100644 index 0000000..ee3ba98 --- /dev/null +++ b/ubl-settings-quotas.css @@ -0,0 +1,149 @@ +.textHead{ + text-shadow: 2px 2px @theme_bg_color; + color: @theme_text_color; +} +.boxInfoMessError{ + background-color: #ea9999; +} +.boxInfoMessOK{ + background-color: #f3f0ac; +} +.bannerbackground { + background-color: #404040; +} +.textHead{ + text-shadow: 1px 1px #ffffff; +} +.view_app { + background-color: @theme_bg_color; +} +.view_app.view.cell:selected { + background-color:@theme_selected_bg_color; + color:@theme_selected_text_color; + transition: 10ms ease-out; + border-radius: 3px; +} +#GnomeIcon{ + border-style:solid; + border-bottom-width: 1px; + border-image: linear-gradient(90deg, alpha(@theme_text_color,0.4) 55%, alpha(@theme_bg_color, 0) 100%); + border-image-slice: 1; +} + +#SepIcon{ + background-color: alpha(@theme_text_color, 0.6); +} + +#iconlabel { + font-size:14px; + font-weight: bold; + +} +.roundborder * { + border-width:0px; + border-radius:5px; +} +.noborder { + border: none; +} +.menu:hover { + border-color:alpha(@theme_text_color, 0.01); +} +.menu { + border-color:alpha(@theme_text_color, 0.01); +} +.menu:hover >* { + border-color:alpha(@theme_text_color, 0.01); +} +.menuitembottom{ + margin-top:0px; + margin-bottom:3px; +} +.menuitemmiddle{ + margin-top:0px; + margin-bottom:0px; +} + +.menuitemtop{ + margin-bottom:0px; +} +.menuitemtop *{ + margin:2px 2px 0 2px; + padding: 5px 10px 3px 5px; +} +.menuitemmiddle *{ + margin:0 2px 0 2px; + padding: 3px 10px 3px 5px; +} +.menuitembottom *{ + margin:0 2px 2px 2px; + padding: 3px 10px 5px 5px; +} +.menuitemtop:hover { + background:@theme_bg_color; + border-color: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-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; +} + +.workingbg, #workingbg { + background-color:@theme_base_color; +} +.workingbg.view.cell:selected { + background-color:@theme_selected_bg_color; +} +.workingbg.view.cell:hover { + background-color:darker(@theme_selected_bg_color); + color:@theme_selected_text_color; + border-radius:3px; +} +.bkim { + transition: 200ms ease-out; + background-image: none; +} +.noborder{ +border:none; +} + +.bkim{ +opacity:0.99; +border:none; +} + +.bkim_no_plug{ +background-color: transparent; +opacity:0.99; +} + + diff --git a/ubl-settings-quotas.desktop b/ubl-settings-quotas.desktop new file mode 100644 index 0000000..ddea473 --- /dev/null +++ b/ubl-settings-quotas.desktop @@ -0,0 +1,15 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=ubl-settings-quotas +Name[ru]=Настройки квот +GenericName=ubl-settings-quotas +GenericName[ru]=Настройки квот +Comment=ubl-settings-quotas +Comment[ru]=Приложение для управления настройками квот +Type=Application +Exec=ubl-settings-quotas +Icon=com.ublinux.ubl-settings-quotas +Terminal=false +X-XfcePluggable=true +X-UBLPluggable=true +Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings; diff --git a/ubl-settings-quotas.glade b/ubl-settings-quotas.glade new file mode 100644 index 0000000..33419f1 --- /dev/null +++ b/ubl-settings-quotas.glade @@ -0,0 +1,3383 @@ + + + + + + + + + + + + False + UBConfig - Quotas + com.ublinux.ubl-settings-quotas + + + True + False + 5 + 5 + 5 + 5 + vertical + + + Name + True + True + False + start + 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 + + + + + Hard limit (size) delay + True + True + False + start + True + + + False + True + 5 + + + + + Hard limit (size) activation time + True + True + False + start + True + + + False + True + 6 + + + + + Files + True + True + False + start + True + + + False + True + 7 + + + + + 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 + + + + + Hard limit (file) activation time + True + True + False + start + True + + + False + True + 11 + + + + + True + False + end + 5 + 5 + True + + + Cancel + True + True + True + center + + + False + True + 0 + + + + + Save + True + True + True + center + + + False + True + 1 + + + + + False + True + 12 + + + + + + + + + + + + + Byte + + + Kb + + + Mb + + + Gb + + + Tb + + + + + False + False + True + center + com.ublinux.ubl-settings-quotas + dialog + True + Quotas Manager + 1.1 + Copyright © 2022 - 2023, UBSoft LLC + Sum up system information + https://ublinux.ru/ + Project Home Page + Это приложение распространяется без каких-либо гарантий. +Подробнее в <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License, версии 2 или позднее</a>. + UBGroup + UBGroup + com.ublinux.ubl-settings-quotas + True + gpl-2-0 + + + True + False + vertical + 2 + + + False + end + + + False + False + 1 + + + + + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 2 + System quotas + + + + + + + + + + True + False + + + 90 + True + False + 5 + 5 + 5 + 5 + 6 + 6 + 69 + com.ublinux.ubl-settings-quotas + + + False + True + 0 + + + + + True + False + + + True + False + + + True + False + vertical + + + 255 + True + False + Configuration of disk quotas parameters for system groups and users + + + + + + + + True + True + 0 + + + + + False + True + 0 + + + + + True + True + 0 + + + + + True + True + 1 + + + + + 6 + 1 + 10 + + + 23 + 1 + 10 + + + 59 + 1 + 10 + + + 100 + 1 + 10 + + + 6 + 1 + 10 + + + 23 + 1 + 10 + + + 59 + 1 + 10 + + + 100 + 1 + 10 + + + 6 + 1 + 10 + + + 23 + 1 + 10 + + + 59 + 1 + 10 + + + 100 + 1 + 10 + + + 6 + 1 + 10 + + + 23 + 1 + 10 + + + 59 + 1 + 10 + + + 100 + 1 + 10 + + + + True + False + False + False + + + True + False + Help + + + + + + True + False + About + True + + + + + True + False + + + True + False + Load from global configuration + True + + + + + True + False + Load from local configuration + True + + + + + True + False + + + True + False + Save to global and local configuration + True + + + + + True + False + Save to global configuration + True + + + + + True + False + Save to local configuration + True + + + + + False + com.ublinux.ubl-settings-quotas + + + True + False + vertical + + + True + False + vertical + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 6 + 6 + 25 + 1 + + + False + True + 0 + + + + + True + False + start + 5 + 5 + 5 + 5 + 6 + 6 + + + + + + + True + 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 + True + True + vertical + + + True + True + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + + + 135 + True + False + 5 + 5 + Device: + 0 + + + False + True + 0 + + + + + True + False + DeviceStore + + + True + True + 1 + + + + + 135 + True + False + 5 + 5 + File system: + 0 + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 12 + 5 + + + True + False + vertical + + + Enable + True + True + False + start + True + + + False + True + 0 + + + + + True + False + 20 + + + True + False + vertical + + + True + False + Excess size delay period + 0 + + + False + True + 0 + + + + + True + False + Excess files delay period + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalGroupsSizeWeeksSpin + + + False + True + 0 + + + + + True + False + weeks + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalGroupsFilesWeeksSpin + + + False + True + 0 + + + + + True + False + weeks + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalGroupsSizeDaysSpin + + + False + True + 0 + + + + + True + False + days + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalGroupsFilesDaysSpin + + + False + True + 0 + + + + + True + False + days + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 2 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalGroupsSizeHoursSpin + + + False + True + 0 + + + + + True + False + hours + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalGroupsFilesHoursSpin + + + False + True + 0 + + + + + True + False + hours + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 3 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalGroupsSizeMinutesSpin + + + False + True + 0 + + + + + True + False + minutes + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalGroupsFilesMinutesSpin + + + False + True + 0 + + + + + True + False + minutes + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 4 + + + + + False + True + 1 + + + + + + + + + True + False + quotas for groups + 0 + + + + + False + True + 1 + + + + + True + False + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 12 + 5 + + + True + False + vertical + + + Enable + True + True + False + start + True + + + False + True + 0 + + + + + True + False + 20 + + + True + False + vertical + + + True + False + Excess size delay period + 0 + + + False + True + 0 + + + + + True + False + Excess files delay period + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeWeeksSpin + + + False + True + 0 + + + + + True + False + weeks + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesWeeksSpin + + + False + True + 0 + + + + + True + False + weeks + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeDaysSpin + + + False + True + 0 + + + + + True + False + days + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesDaysSpin + + + False + True + 0 + + + + + True + False + days + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 2 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeHoursSpin + + + False + True + 0 + + + + + True + False + hours + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesHourSpin + + + False + True + 0 + + + + + True + False + hours + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 3 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeMinutesSpin + + + False + True + 0 + + + + + True + False + minutes + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesMinuteSpin + + + False + True + 0 + + + + + True + False + minutes + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 4 + + + + + False + True + 1 + + + + + + + + + True + False + quotas for users + 0 + + + + + False + True + 2 + + + + + + + True + False + General settings + + + False + + + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + + + True + False + Device: + + + False + True + 0 + + + + + True + False + DeviceStore + + + True + True + 1 + + + + + True + False + 5 + 5 + File system: + + + False + True + 2 + + + + + Filters + True + True + True + + + False + True + 3 + + + + + False + True + 0 + + + + + True + True + liststore1 + + + + + + Name + + + + + Quotas + + + + + Size + + + + + Soft limit +(size) + + + + + Hard limit +(size) + + + + + Hard limit +(size) delay + + + + + Hard limit +(Size) activation +time + + + + + Files + + + + + Soft limit +(files) + + + + + Hard limit +(files) + + + + + Hard limit +(files) delay + + + + + Hard limit +(files) activation +time + + + + + False + True + 1 + + + + + 1 + + + + + True + False + Groups + + + 1 + False + + + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + + + True + False + Device: + + + False + True + 0 + + + + + True + False + DeviceStore + + + True + True + 1 + + + + + True + False + 5 + 5 + File system: + + + False + True + 2 + + + + + Filters + True + True + True + + + False + True + 3 + + + + + False + True + 0 + + + + + True + True + liststore1 + + + + + + Name + + + + + Quotas + + + + + Size + + + + + Soft limit +(size) + + + + + Hard limit +(size) + + + + + Hard limit +(size) delay + + + + + Hard limit +(Size) activation +time + + + + + Files + + + + + Soft limit +(files) + + + + + Hard limit +(files) + + + + + Hard limit +(files) delay + + + + + Hard limit +(files) activation +time + + + + + False + True + 1 + + + + + 2 + + + + + True + False + Users + + + 2 + False + + + + + True + True + 0 + + + + + False + True + 2 + + + + + True + True + 0 + + + + + + + True + False + True + + + True + False + 5 + 5 + 5 + 5 + 2 + UBConfig - Quotas + + + + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 6 + 32 + com.ublinux.ubl-settings-quotas + + + + + True + False + + + True + True + False + True + menuLoad + + + True + False + + + True + False + Load + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + + + + + + False + True + 0 + + + + + 2 + + + + + True + False + + + True + True + False + True + menuSave + + + True + False + + + True + False + Save + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + + + + + + False + True + 0 + + + + + True + True + True + False + True + True + menuAbout + none + + + True + False + open-menu-symbolic + + + + + + False + True + 1 + + + + + end + 3 + + + + + + + + + + + + + vertical + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1000000 + 1 + 10 + + + 1000000 + 1 + 10 + + + 1024 + 1 + 10 + + + 1024 + 1 + 10 + + + False + UBConfig - Quotas + com.ublinux.ubl-settings-quotas + + + True + False + 5 + 5 + 5 + 5 + vertical + + + True + False + vertical + 5 + + + True + False + 5 + + + True + False + Device: + + + False + True + 0 + + + + + True + False + DeviceStore + + + True + True + 1 + + + + + True + False + start + File system: + 0 + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + Disk quotas for this device: + 0 + + + False + True + 1 + + + + + True + False + Group quotas for this device: + 0 + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + True + + + True + False + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 12 + 5 + + + True + False + vertical + + + True + False + Currently using: + + + False + True + 0 + + + + + True + False + Soft limit + 0 + + + False + True + 1 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quotegroupSizeSoftLimitAdjustment + + + True + True + 1 + + + + + True + False + + Kb + Mb + Gb + Tb + + + + False + True + 2 + + + + + True + True + 2 + + + + + True + False + Hard limit + 0 + + + False + True + 3 + + + + + True + False + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quotegroupSizeHardLimitAdjustment + + + True + True + 1 + + + + + True + False + + Kb + Mb + Gb + Tb + + + + False + True + 2 + + + + + True + True + 4 + + + + + + + + + True + False + Size + + + + + True + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 12 + 5 + + + True + False + vertical + + + True + False + Currently using: + + + False + True + 0 + + + + + True + False + Soft limit + 0 + + + False + True + 1 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quotegroupFilesSoftLimitAdjustment + + + True + True + 1 + + + + + True + False + files + + + False + True + 2 + + + + + True + True + 2 + + + + + True + False + Hard limit + 0 + + + False + True + 3 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quotegroupFilesHardLimitAdjustment + + + True + True + 1 + + + + + True + False + files + + + False + True + 2 + + + + + True + True + 4 + + + + + + + + + True + False + Files + + + + + True + True + 1 + + + + + False + True + 1 + + + + + True + False + 5 + vertical + True + + + True + False + end + 5 + True + + + Cancel + True + True + True + + + False + True + 0 + + + + + Save + True + True + True + + + False + True + 1 + + + + + False + True + 0 + + + + + False + True + 2 + + + + + + + 1000000 + 1 + 10 + + + 1000000 + 1 + 10 + + + 1024 + 1 + 10 + + + 1024 + 1 + 10 + + + False + UBConfig - Quotas + com.ublinux.ubl-settings-quotas + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + vertical + + + True + False + vertical + 5 + + + True + False + 5 + + + True + False + Device: + + + False + True + 0 + + + + + True + False + DeviceStore + + + True + True + 1 + + + + + True + False + start + File system: + 0 + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + Disk quotas for this device: + 0 + + + False + True + 1 + + + + + True + False + User quotas for this device: + 0 + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + True + + + True + False + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 12 + 5 + + + True + False + vertical + + + True + False + Currently using: + + + False + True + 0 + + + + + True + False + Soft limit + 0 + + + False + True + 1 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quoteuserSizeSoftLimitAdjustment + + + True + True + 1 + + + + + True + False + + Kb + Mb + Gb + Tb + + + + False + True + 2 + + + + + True + True + 2 + + + + + True + False + Hard limit + 0 + + + False + True + 3 + + + + + True + False + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quoteuserSizeHardLimitAdjustment + + + True + True + 1 + + + + + True + False + + Kb + Mb + Gb + Tb + + + + False + True + 2 + + + + + True + True + 4 + + + + + + + + + True + False + Size + + + + + True + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 12 + 5 + + + True + False + vertical + + + True + False + Currently using: + + + False + True + 0 + + + + + True + False + Soft limit + 0 + + + False + True + 1 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quoteuserFilesSoftLimitAdjustment + + + True + True + 1 + + + + + True + False + files + + + False + True + 2 + + + + + True + True + 2 + + + + + True + False + Hard limit + 0 + + + False + True + 3 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quoteuserFilesHardLimitAdjustment + + + True + True + 1 + + + + + True + False + files + + + False + True + 2 + + + + + True + True + 4 + + + + + + + + + True + False + Files + + + + + True + True + 1 + + + + + False + True + 1 + + + + + True + False + 5 + vertical + True + + + True + False + end + 5 + True + + + Cancel + True + True + True + 5 + 5 + + + False + True + 0 + + + + + Save + True + True + True + 5 + 5 + + + False + True + 1 + + + + + False + True + 0 + + + + + False + True + 2 + + + + + + diff --git a/ubl-settings-quotas.glade~ b/ubl-settings-quotas.glade~ new file mode 100644 index 0000000..1882970 --- /dev/null +++ b/ubl-settings-quotas.glade~ @@ -0,0 +1,3383 @@ + + + + + + + + + + + + False + UBConfig - Quotas + com.ublinux.ubl-settings-quotas + + + True + False + 5 + 5 + 5 + 5 + vertical + + + Name + True + True + False + start + 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 + + + + + Hard limit (size) delay + True + True + False + start + True + + + False + True + 5 + + + + + Hard limit (size) activation time + True + True + False + start + True + + + False + True + 6 + + + + + Files + True + True + False + start + True + + + False + True + 7 + + + + + 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 + + + + + Hard limit (file) activation time + True + True + False + start + True + + + False + True + 11 + + + + + True + False + end + 5 + 5 + True + + + Cancel + True + True + True + center + + + False + True + 0 + + + + + Save + True + True + True + center + + + False + True + 1 + + + + + False + True + 12 + + + + + + + + + + + + + Byte + + + Kb + + + Mb + + + Gb + + + Tb + + + + + False + False + True + center + com.ublinux.ubl-settings-quotas + dialog + True + Quotas Manager + 1.1 + Copyright © 2022 - 2023, UBSoft LLC + Sum up system information + https://ublinux.ru/ + Project Home Page + Это приложение распространяется без каких-либо гарантий. +Подробнее в <a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License, версии 2 или позднее</a>. + UBGroup + UBGroup + com.ublinux.ubl-settings-quotas + True + gpl-2-0 + + + True + False + vertical + 2 + + + False + end + + + False + False + 1 + + + + + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 2 + System quotas + + + + + + + + + + True + False + + + 90 + True + False + 5 + 5 + 5 + 5 + 6 + 6 + 69 + com.ublinux.ubl-settings-quotas + + + False + True + 0 + + + + + True + False + + + True + False + + + True + False + vertical + + + 255 + True + False + Configuration of disk quotas parameters for system groups and users + + + + + + + + True + True + 0 + + + + + False + True + 0 + + + + + True + True + 0 + + + + + True + True + 1 + + + + + 6 + 1 + 10 + + + 23 + 1 + 10 + + + 59 + 1 + 10 + + + 100 + 1 + 10 + + + 6 + 1 + 10 + + + 23 + 1 + 10 + + + 59 + 1 + 10 + + + 100 + 1 + 10 + + + 6 + 1 + 10 + + + 23 + 1 + 10 + + + 59 + 1 + 10 + + + 100 + 1 + 10 + + + 6 + 1 + 10 + + + 23 + 1 + 10 + + + 59 + 1 + 10 + + + 100 + 1 + 10 + + + + True + False + False + False + + + True + False + Help + + + + + + True + False + About + True + + + + + True + False + + + True + False + Load from global configuration + True + + + + + True + False + Load from local configuration + True + + + + + True + False + + + True + False + Save to global and local configuration + True + + + + + True + False + Save to global configuration + True + + + + + True + False + Save to local configuration + True + + + + + False + com.ublinux.ubl-settings-quotas + + + True + False + vertical + + + True + False + vertical + + + True + False + + + True + False + 5 + 5 + 5 + 5 + 6 + 6 + 25 + 1 + + + False + True + 0 + + + + + True + False + start + 5 + 5 + 5 + 5 + 6 + 6 + + + + + + + True + 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 + True + True + vertical + + + True + True + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + + + 135 + True + False + 5 + 5 + Device: + 0 + + + False + True + 0 + + + + + True + False + DeviceStore + + + True + True + 1 + + + + + 135 + True + False + 5 + 5 + File system: + 0 + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 12 + 5 + + + True + False + vertical + + + Enable + True + True + False + start + True + + + False + True + 0 + + + + + True + False + 20 + + + True + False + vertical + + + True + False + Excess size delay period + 0 + + + False + True + 0 + + + + + True + False + Excess files delay period + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalGroupsSizeWeeksSpin + + + False + True + 0 + + + + + True + False + weeks + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalGroupsFilesWeeksSpin + + + False + True + 0 + + + + + True + False + weeks + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalGroupsSizeDaysSpin + + + False + True + 0 + + + + + True + False + days + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalGroupsFilesDaysSpin + + + False + True + 0 + + + + + True + False + days + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 2 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalGroupsSizeHoursSpin + + + False + True + 0 + + + + + True + False + hours + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalGroupsFilesHoursSpin + + + False + True + 0 + + + + + True + False + hours + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 3 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalGroupsSizeMinutesSpin + + + False + True + 0 + + + + + True + False + minutes + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalGroupsFilesMinutesSpin + + + False + True + 0 + + + + + True + False + minutes + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 4 + + + + + False + True + 1 + + + + + + + + + True + False + quotas for groups + 0 + + + + + False + True + 1 + + + + + True + False + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 12 + 5 + + + True + False + vertical + + + Enable + True + True + False + start + True + + + False + True + 0 + + + + + True + False + 20 + + + True + False + vertical + + + True + False + Excess size delay period + 0 + + + False + True + 0 + + + + + True + False + Excess files delay period + 0 + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeWeeksSpin + + + False + True + 0 + + + + + True + False + weeks + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesWeeksSpin + + + False + True + 0 + + + + + True + False + weeks + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 1 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeDaysSpin + + + False + True + 0 + + + + + True + False + days + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesDaysSpin + + + False + True + 0 + + + + + True + False + days + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 2 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeHoursSpin + + + False + True + 0 + + + + + True + False + hours + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesHourSpin + + + False + True + 0 + + + + + True + False + hours + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 3 + + + + + True + False + vertical + 5 + + + True + False + 5 + + + True + True + 0 + generalUsersSizeMinutesSpin + + + False + True + 0 + + + + + True + False + minutes + + + False + True + 1 + + + + + False + True + 0 + + + + + True + False + 5 + + + True + True + 0 + generalUsersFilesMinuteSpin + + + False + True + 0 + + + + + True + False + minutes + + + False + True + 1 + + + + + False + True + 1 + + + + + False + True + 4 + + + + + False + True + 1 + + + + + + + + + True + False + quotas for users + 0 + + + + + False + True + 2 + + + + + + + True + False + General settings + + + False + + + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + + + True + False + Device: + + + False + True + 0 + + + + + True + False + DeviceStore + + + True + True + 1 + + + + + True + False + 5 + 5 + File system: + + + False + True + 2 + + + + + Filters + True + True + True + + + False + True + 3 + + + + + False + True + 0 + + + + + True + True + liststore1 + + + + + + Name + + + + + Quotas + + + + + Size + + + + + Soft limit +(size) + + + + + Hard limit +(size) + + + + + Hard limit +(size) delay + + + + + Hard limit +(Size) activation +time + + + + + Files + + + + + Soft limit +(files) + + + + + Hard limit +(files) + + + + + Hard limit +(files) delay + + + + + Hard limit +(files) activation +time + + + + + False + True + 1 + + + + + 1 + + + + + True + False + Groups + + + 1 + False + + + + + True + False + vertical + + + True + False + 5 + 5 + 5 + 5 + + + True + False + Device: + + + False + True + 0 + + + + + True + False + DeviceStore + + + True + True + 1 + + + + + True + False + 5 + 5 + File system: + + + False + True + 2 + + + + + Filters + True + True + True + + + False + True + 3 + + + + + False + True + 0 + + + + + True + True + liststore1 + + + + + + Name + + + + + Quotas + + + + + Size + + + + + Soft limit +(size) + + + + + Hard limit +(size) + + + + + Hard limit +(size) delay + + + + + Hard limit +(Size) activation +time + + + + + Files + + + + + Soft limit +(files) + + + + + Hard limit +(files) + + + + + Hard limit +(files) delay + + + + + Hard limit +(files) activation +time + + + + + False + True + 1 + + + + + 2 + + + + + True + False + Users + + + 2 + False + + + + + True + True + 0 + + + + + False + True + 2 + + + + + True + True + 0 + + + + + + + True + False + True + + + True + False + 5 + 5 + 5 + 5 + 2 + UBConfig - Quotas + + + + + + + + True + False + 5 + 5 + 5 + 5 + 6 + 6 + 32 + com.ublinux.ubl-settings-quotas + + + + + True + False + + + True + True + False + True + menuLoad + + + True + False + + + True + False + Load + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + + + + + + False + True + 0 + + + + + 2 + + + + + True + False + + + True + True + False + True + menuSave + + + True + False + + + True + False + Save + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + + + + + + False + True + 0 + + + + + True + True + True + False + True + True + menuAbout + none + + + True + False + open-menu-symbolic + + + + + + False + True + 1 + + + + + end + 3 + + + + + + + + + + + + + vertical + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1000000 + 1 + 10 + + + 1000000 + 1 + 10 + + + 1024 + 1 + 10 + + + 1024 + 1 + 10 + + + False + UBConfig - Quotas + com.ublinux.ubl-settings-quotas + + + True + False + 5 + 5 + 5 + 5 + vertical + + + True + False + vertical + 5 + + + True + False + 5 + + + True + False + Device: + + + False + True + 0 + + + + + True + False + DeviceStore + + + True + True + 1 + + + + + True + False + start + File system: + 0 + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + Disk quotas for this device: + 0 + + + False + True + 1 + + + + + True + False + Group quotas for this device: + 0 + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + True + + + True + False + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 12 + 5 + + + True + False + vertical + + + True + False + Currently using: + + + False + True + 0 + + + + + True + False + Soft limit + 0 + + + False + True + 1 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quotegroupSizeSoftLimitAdjustment + + + True + True + 1 + + + + + True + False + + Kb + Mb + Gb + Tb + + + + False + True + 2 + + + + + True + True + 2 + + + + + True + False + Hard limit + 0 + + + False + True + 3 + + + + + True + False + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quotegroupSizeHardLimitAdjustment + + + True + True + 1 + + + + + True + False + + Kb + Mb + Gb + Tb + + + + False + True + 2 + + + + + True + True + 4 + + + + + + + + + True + False + Size + + + + + True + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 12 + 5 + + + True + False + vertical + + + True + False + Currently using: + + + False + True + 0 + + + + + True + False + Soft limit + 0 + + + False + True + 1 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quotegroupFilesSoftLimitAdjustment + + + True + True + 1 + + + + + True + False + files + + + False + True + 2 + + + + + True + True + 2 + + + + + True + False + Hard limit + 0 + + + False + True + 3 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quotegroupFilesHardLimitAdjustment + + + True + True + 1 + + + + + True + False + files + + + False + True + 2 + + + + + True + True + 4 + + + + + + + + + True + False + Files + + + + + True + True + 1 + + + + + False + True + 1 + + + + + True + False + 5 + vertical + True + + + True + False + end + 5 + True + + + Cancel + True + True + True + + + False + True + 0 + + + + + Save + True + True + True + + + False + True + 1 + + + + + False + True + 0 + + + + + False + True + 2 + + + + + + + 1000000 + 1 + 10 + + + 1000000 + 1 + 10 + + + 1024 + 1 + 10 + + + 1024 + 1 + 10 + + + False + UBConfig - Quotas + com.ublinux.ubl-settings-quotas + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + vertical + + + True + False + vertical + 5 + + + True + False + 5 + + + True + False + Device: + + + False + True + 0 + + + + + True + False + DeviceStore + + + True + True + 1 + + + + + True + False + start + File system: + 0 + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + Disk quotas for this device: + 0 + + + False + True + 1 + + + + + True + False + User quotas for this device: + 0 + + + False + True + 2 + + + + + False + True + 0 + + + + + True + False + True + + + True + False + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 12 + 5 + + + True + False + vertical + + + True + False + Currently using: + + + False + True + 0 + + + + + True + False + Soft limit + 0 + + + False + True + 1 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quoteuserSizeSoftLimitAdjustment + + + True + True + 1 + + + + + True + False + + Kb + Mb + Gb + Tb + + + + False + True + 2 + + + + + True + True + 2 + + + + + True + False + Hard limit + 0 + + + False + True + 3 + + + + + True + False + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quoteuserSizeHardLimitAdjustment + + + True + True + 1 + + + + + True + False + + Kb + Mb + Gb + Tb + + + + False + True + 2 + + + + + True + True + 4 + + + + + + + + + True + False + Size + + + + + True + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 0.019999999552965164 + in + + + True + False + 5 + 5 + 12 + 5 + + + True + False + vertical + + + True + False + Currently using: + + + False + True + 0 + + + + + True + False + Soft limit + 0 + + + False + True + 1 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quoteuserFilesSoftLimitAdjustment + + + True + True + 1 + + + + + True + False + files + + + False + True + 2 + + + + + True + True + 2 + + + + + True + False + Hard limit + 0 + + + False + True + 3 + + + + + True + False + 5 + + + True + True + False + right + True + + + False + True + 0 + + + + + True + True + quoteuserFilesHardLimitAdjustment + + + True + True + 1 + + + + + True + False + files + + + False + True + 2 + + + + + True + True + 4 + + + + + + + + + True + False + Files + + + + + True + True + 1 + + + + + False + True + 1 + + + + + True + False + 5 + vertical + True + + + True + False + end + 5 + True + + + Cancel + True + True + True + 5 + 5 + + + False + True + 0 + + + + + Save + True + True + True + 5 + 5 + + + False + True + 1 + + + + + False + True + 0 + + + + + False + True + 2 + + + + + +