Merge pull request 'master' (#70) from YanTheKaller/ubl-settings-diskquota:master into master

Reviewed-on: #70
pull/81/head^2
Dmitry Razumov 2 years ago
commit 24c78c90d9

@ -1,6 +0,0 @@
make
gcc compile/resources.c compile/ubl-cmake.h source/view_set_disk.h source/view_set_disk.c source/view_check_user_table.c source/view_check_user_table.h source/view_filters.c source/model/vector.c source/model/vector.h source/view_filters.h source/view_temp_u_g_p.c source/view_temp_u_g_p.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
sudo make install clean
cd ./terminal-commands
make
cd ../

@ -9,8 +9,10 @@ CMAKE_COMMAND = cmake
CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source
CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile
DEPENDS = /bin/cmake DEPENDS = /bin/cmake
PREFIX ?= /usr PREFIX ?= /usr/local
PKGNAME = $(MAKEFILE_DIR) PKGNAME = $(MAKEFILE_DIR)
FILE_VER = source/${PKGNAME}.h
PKGIDENT=$(subst /,-,${PREFIX})
default_target: all default_target: all
@ -21,11 +23,16 @@ all: init build
init: init:
@echo "Initialize ..."; \ @echo "Initialize ..."; \
if [ -d ".git" ]; then \ if [ -d ".git" ]; then \
LATEST_TAG=$$(git describe --tags | sed 's/^v//'|grep -oE "^[0-9]{1,}.[0-9]{1,}"); \ LATEST_TAG=$$(git describe --abbrev=0 --tags | sed 's/^v//'); \
if [ -z "$${LATEST_TAG}" ]; \
then \
LATEST_TAG=$$"0.0"; \
echo "$${LATEST_TAG} is empty"; \
fi; \
else \ else \
LATEST_TAG="0.0"; \ LATEST_TAG="Development"; \
fi; \ fi; \
sed -r "s/^(string version_application).*/\1=\"$${LATEST_TAG}\";/" -i source/${PKGNAME}.h; \ sed -r "s/^(string version_application).*/\1 = \"$${LATEST_TAG}\";/" -i ${FILE_VER}; \
echo "-- Build path: ${CMAKE_BUILD_DIR}" echo "-- Build path: ${CMAKE_BUILD_DIR}"
depend: depend:
@ -43,8 +50,6 @@ debug:
@echo "Debug ..." @echo "Debug ..."
if [ ! -d ${CMAKE_BUILD_DIR} ]; then \ if [ ! -d ${CMAKE_BUILD_DIR} ]; then \
$(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \ $(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \
@gcc compile/resources.c compile/ubl-cmake.h source/view_set_disk.h source/view_set_disk.c source/view_check_user_table.c source/view_check_user_table.h source/view_filters.c source/model/vector.c source/model/vector.h source/view_filters.h source/view_temp_u_g_p.c source/view_temp_u_g_p.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
fi; \ fi; \
echo "Debug: OK" echo "Debug: OK"
@ -66,7 +71,8 @@ check:
build: depend prepare build: depend prepare
@echo "Build ..."; \ @echo "Build ..."; \
make --directory=${CMAKE_BUILD_DIR}; \ $(MAKE_COMMAND) --directory=${CMAKE_BUILD_DIR}; \
sed -r "s/^(string version_application).*/\1;/" -i ${FILE_VER}; \
echo "Build: OK" echo "Build: OK"
uninstall: uninstall:
@ -74,7 +80,7 @@ uninstall:
@for FILE_PO in $(wildcard *.po); do \ @for FILE_PO in $(wildcard *.po); do \
LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \ FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
$(RM) "$${PATH_FILE_MO}"; \ $(RM) "$${PATH_FILE_MO}"; \
done done
@for SIZE in 16x16 32x32 48x48 scalable; do \ @for SIZE in 16x16 32x32 48x48 scalable; do \
@ -89,9 +95,7 @@ uninstall:
@$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}" @$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}"
@$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" @$(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}.svg"
@$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/com.ublinux.${PKGNAME}.checked.svg" @$(RM) "${DESTDIR}/usr/share/polkit-1/actions/com.ublinux.${PKGNAME}${PKGIDENT}.policy"
@$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/com.ublinux.${PKGNAME}.warning.svg"
@$(RM) "${DESTDIR}${PREFIX}/share/polkit-1/actions/com.ublinux.${PKGNAME}.policy"
@if [ -z ${DESTDIR} ]; then \ @if [ -z ${DESTDIR} ]; then \
[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \
update-desktop-database --quiet &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \
@ -103,9 +107,9 @@ install: check uninstall
@echo "Install ..." @echo "Install ..."
@for FILE_PO in $(wildcard *.po); do \ @for FILE_PO in $(wildcard *.po); do \
LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \
install -dm755 "${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES"; \ install -dm755 "${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES"; \
FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \ FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \
PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ PATH_FILE_MO="${DESTDIR}/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \
echo "$${FILE_PO}"; \ echo "$${FILE_PO}"; \
msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \ msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \
done done
@ -113,25 +117,22 @@ install: check uninstall
install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ 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"; \ 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 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 -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.checked.svg" @cp ./com.ublinux.${PKGNAME}.policy ./compile/com.ublinux.${PKGNAME}${PKGIDENT}.policy
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.warning.svg" @sed -e 's+/usr/bin+${PREFIX}/bin+' -e 's+.run+${PKGIDENT}.run+g' ./compile/com.ublinux.${PKGNAME}${PKGIDENT}.policy -i
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.funnel.svg"
@install -dm755 "${DESTDIR}${PREFIX}/share/polkit-1/actions"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "com.ublinux.${PKGNAME}.policy"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/polkit-1/actions/" "gdb.policy"
@install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" @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/applications/" "${PKGNAME}.desktop"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.checked.svg"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.warning.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/polkit-1/actions/" "${CMAKE_BUILD_DIR}/com.ublinux.${PKGNAME}${PKGIDENT}.policy"
@install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/status/" "com.ublinux.${PKGNAME}.funnel-symbolic.svg"
@ldconfig -n /usr/local/lib
@if [ -z ${DESTDIR} ]; then \ @if [ -z ${DESTDIR} ]; then \
[ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \
update-desktop-database --quiet &>/dev/null || true; \ update-desktop-database --quiet &>/dev/null || true; \
[ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ [ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \
fi fi
@echo "Install: OK" @echo "Install: OK"
@sed -r "s/^(string version_application=\"*\").*/string version_application;/" -i source/${PKGNAME}.h; \
clean: clean:
@echo "Clean ..." @echo "Clean ..."
@ -151,5 +152,4 @@ help:
echo "... compile"; \ echo "... compile"; \
echo "... install"; \ echo "... install"; \
echo "... uninstall"; \ echo "... uninstall"; \
echo "... clean" echo "... clean"

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

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

@ -181,6 +181,14 @@ void wrapper_edit_view_device_show(GtkWidget* self) {
g_signal_connect(G_OBJECT(get_widget_view_device()->btnSaveTempSave),"clicked",G_CALLBACK(entry_device_disk),&i); g_signal_connect(G_OBJECT(get_widget_view_device()->btnSaveTempSave),"clicked",G_CALLBACK(entry_device_disk),&i);
} }
void on_status_changed(){
int active = gtk_combo_box_get_active(GTK_COMBO_BOX(get_widget_view_device()->cmbDeviceSetStatus));
if (active == 0|| active ==1)
gtk_widget_set_sensitive(get_widget_view_device()->boxBlockDisabledStatus,0);
else
gtk_widget_set_sensitive(get_widget_view_device()->boxBlockDisabledStatus,1);
}
void wrapper_add_view_device_show(GtkWidget* self) { void wrapper_add_view_device_show(GtkWidget* self) {
view_device_set_vector_device(&all_config.v_disk_status); view_device_set_vector_device(&all_config.v_disk_status);
view_device_set_index(-1); view_device_set_index(-1);
@ -189,6 +197,7 @@ void wrapper_add_view_device_show(GtkWidget* self) {
view_device_show(NULL, glade_path); view_device_show(NULL, glade_path);
int i = 0; int i = 0;
g_signal_connect(G_OBJECT(get_widget_view_device()->btnSaveTempSave),"clicked",G_CALLBACK(entry_device_disk),&i); g_signal_connect(G_OBJECT(get_widget_view_device()->btnSaveTempSave),"clicked",G_CALLBACK(entry_device_disk),&i);
g_signal_connect(G_OBJECT(get_widget_view_device()->cmbDeviceSetStatus),"changed",G_CALLBACK(on_status_changed),NULL);
} }
void block_tree_view(hotebook* widgets,void (*f)()) { void block_tree_view(hotebook* widgets,void (*f)()) {
@ -369,6 +378,7 @@ void wrapper_all_save() {
yon_ubl_status_box_render(MESS_NOTHING_SAVE, BACKGROUND_IMAGE_SUCCESS_TYPE); yon_ubl_status_box_render(MESS_NOTHING_SAVE, BACKGROUND_IMAGE_SUCCESS_TYPE);
} }
} }
void wrapper_global_save() { void wrapper_global_save() {
if (wrapper_template_save(&all_config, CMD_SAVE_GLOBAL, CMD_REMOVE_GLOBAL)) { if (wrapper_template_save(&all_config, CMD_SAVE_GLOBAL, CMD_REMOVE_GLOBAL)) {
yon_ubl_status_box_render(GLOBAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); yon_ubl_status_box_render(GLOBAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);

@ -219,8 +219,8 @@ void yon_terminal_integrated_start(GtkWidget *terminal, char* command, void *end
enum YON_TYPE{ enum YON_TYPE{
YON_TYPE_STRING, YON_TYPE_STRING,
YON_TYPE_INT,
YON_TYPE_STRING_LIST, YON_TYPE_STRING_LIST,
YON_TYPE_INT,
YON_TYPE_BOOLEAN, YON_TYPE_BOOLEAN,
YON_TYPE_OTHER YON_TYPE_OTHER
}; };
@ -365,4 +365,4 @@ void yon_ubl_browser_window_open(char *link, char *browser_window_name);
void yon_ubl_browser_window_open(char *link, char *browser_window_name); void yon_ubl_browser_window_open(char *link, char *browser_window_name);
#endif #endif
#endif #endif
#endif #endif

@ -237,5 +237,36 @@ custom_window *setup_window_custom(custom_window* custom_widgets, GtkBuilder *bu
custom_widgets->device.btnDel = yon_gtk_builder_get_widget(builder,"btnDelDevice"); custom_widgets->device.btnDel = yon_gtk_builder_get_widget(builder,"btnDelDevice");
custom_widgets->device.tree_view = yon_gtk_builder_get_widget(builder,"DeviceQuotasTree"); custom_widgets->device.tree_view = yon_gtk_builder_get_widget(builder,"DeviceQuotasTree");
custom_widgets->device.liststore = GTK_LIST_STORE(gtk_builder_get_object(builder, "liststoreDevice")); custom_widgets->device.liststore = GTK_LIST_STORE(gtk_builder_get_object(builder, "liststoreDevice"));
GList *list = gtk_tree_view_get_columns(GTK_TREE_VIEW(custom_widgets->treeViewGeneral));
for (int i = 0; i < g_list_length(list); i++){
yon_window_config_add_listener(g_list_nth_data(list,i),yon_char_append("general_tree",yon_char_from_int(i)),"fixed-width",YON_TYPE_INT);
}
g_list_free(list);
list = gtk_tree_view_get_columns(GTK_TREE_VIEW(custom_widgets->device.tree_view));
for (int i = 0; i < g_list_length(list); i++){
yon_window_config_add_listener(g_list_nth_data(list,i),yon_char_append("device_tree",yon_char_from_int(i)),"fixed-width",YON_TYPE_INT);
}
g_list_free(list);
list = gtk_tree_view_get_columns(GTK_TREE_VIEW(custom_widgets->user.tree_view));
for (int i = 0; i < g_list_length(list); i++){
yon_window_config_add_listener(g_list_nth_data(list,i),yon_char_append("user_tree",yon_char_from_int(i)),"fixed-width",YON_TYPE_INT);
}
g_list_free(list);
list = gtk_tree_view_get_columns(GTK_TREE_VIEW(custom_widgets->group.tree_view));
for (int i = 0; i < g_list_length(list); i++){
yon_window_config_add_listener(g_list_nth_data(list,i),yon_char_append("group_tree",yon_char_from_int(i)),"fixed-width",YON_TYPE_INT);
}
g_list_free(list);
list = gtk_tree_view_get_columns(GTK_TREE_VIEW(custom_widgets->project.tree_view));
for (int i = 0; i < g_list_length(list); i++){
yon_window_config_add_listener(g_list_nth_data(list,i),yon_char_append("project_tree",yon_char_from_int(i)),"fixed-width",YON_TYPE_INT);
}
g_list_free(list);
return custom_widgets; return custom_widgets;
} }

@ -109,7 +109,7 @@ typedef struct {
} documentation_confirmation_window; } documentation_confirmation_window;
typedef char* string; typedef char* string;
static string version_application=""; static string version_application;
main_window *setup_window(main_window* widgets, custom_window* custom_widgets); main_window *setup_window(main_window* widgets, custom_window* custom_widgets);

@ -93,9 +93,10 @@
#define STR_ERROR_PROJECT_NAME_ENTER_VALUE _("Project name required field") #define STR_ERROR_PROJECT_NAME_ENTER_VALUE _("Project name required field")
#define STR_ERROR_LIST_USER_NULL _("The list of users is empty") #define STR_ERROR_LIST_USER_NULL _("The list of users is empty")
#define STR_ERROR_NO_SELECTED_DISK _("To save, you need to select a disk") #define STR_ERROR_NO_SELECTED_DISK _("To save, you need to select a disk")
#define STR_ERROR_ENTRY_VALUE_VOLUME_OR_FILES _("The volume and files fields must have at least one value") #define STR_ERROR_ENTRY_VALUE_VOLUME_OR_FILES _("Insert at leat one value before saving")
#define STR_ERROR_PATH_IS_DISK_FALSE _("The selected directory is not located on the target device") #define STR_ERROR_PATH_IS_DISK_FALSE _("The selected directory is not located on the target device")
#define ADD_LABEL _("Add")
#define UPDATE_LABEL _("Update")
#define CANCEL_LABEL _("Cancel")
#define SAVE_LABEL _("Save")

@ -53,6 +53,7 @@ view_device_set_window *view_device_setup_window_custom(view_device_set_window*
obj_view_device_widgets->DeviceCombo = yon_gtk_builder_get_widget(builder,"DeviceCombo"); obj_view_device_widgets->DeviceCombo = yon_gtk_builder_get_widget(builder,"DeviceCombo");
obj_view_device_widgets->lblHeadQuotasEditDeviceWindow = yon_gtk_builder_get_widget(builder,"lblHeadQuotasEditDeviceWindow"); obj_view_device_widgets->lblHeadQuotasEditDeviceWindow = yon_gtk_builder_get_widget(builder,"lblHeadQuotasEditDeviceWindow");
obj_view_device_widgets->boxBlockGuiAddEditDevice = yon_gtk_builder_get_widget(builder,"boxBlockGuiAddEditDevice"); obj_view_device_widgets->boxBlockGuiAddEditDevice = yon_gtk_builder_get_widget(builder,"boxBlockGuiAddEditDevice");
obj_view_device_widgets->boxBlockDisabledStatus = yon_gtk_builder_get_widget(builder,"boxBlockDisabledStatus");
if (strcmp(view_device_set_add_edit, "add") == 0) { if (strcmp(view_device_set_add_edit, "add") == 0) {
gtk_label_set_label(GTK_LABEL(obj_view_device_widgets->lblHeadQuotasEditDeviceWindow), STR_TITLE_ADD_QUOTAS); gtk_label_set_label(GTK_LABEL(obj_view_device_widgets->lblHeadQuotasEditDeviceWindow), STR_TITLE_ADD_QUOTAS);
gtk_widget_hide(obj_view_device_widgets->lblNameDevice); gtk_widget_hide(obj_view_device_widgets->lblNameDevice);

@ -35,6 +35,7 @@ typedef struct {
GtkWidget* cmbDeviceSetStatus; GtkWidget* cmbDeviceSetStatus;
GtkWidget* lblHeadQuotasEditDeviceWindow; GtkWidget* lblHeadQuotasEditDeviceWindow;
GtkWidget* boxBlockGuiAddEditDevice; GtkWidget* boxBlockGuiAddEditDevice;
GtkWidget* boxBlockDisabledStatus;
char* name; char* name;
} view_device_set_window; } view_device_set_window;

@ -339,6 +339,10 @@ void update_max_size_spin(GtkWidget *self, int* flag) {
for (int i = 0; i < get_device_vec()->vectorList.total; i++) { for (int i = 0; i < get_device_vec()->vectorList.total; i++) {
device_config* _config = (device_config*)get_device_vec()->pfVectorGet(get_device_vec(), i); device_config* _config = (device_config*)get_device_vec()->pfVectorGet(get_device_vec(), i);
if (strstr(str_disk, _config->name_disk)) { if (strstr(str_disk, _config->name_disk)) {
if (self==temp_widgets->quotegroupSizeSoftLimitCombo)
gtk_spin_button_set_value(GTK_SPIN_BUTTON(temp_widgets->quotegroupSizeSoftLimitSpin),0.0);
else if (self==temp_widgets->quotegroupSizeHardLimitCombo)
gtk_spin_button_set_value(GTK_SPIN_BUTTON(temp_widgets->quotegroupSizeHardLimitSpin),0.0);
philos_set_spin_adjustment(temp_widgets->quotegroupSizeSoftLimitCheck, philos_set_spin_adjustment(temp_widgets->quotegroupSizeSoftLimitCheck,
temp_widgets->quotegroupSizeSoftLimitSpin, temp_widgets->quotegroupSizeSoftLimitSpin,
temp_widgets->quotegroupSizeSoftLimitCombo, _config->size_disk); temp_widgets->quotegroupSizeSoftLimitCombo, _config->size_disk);

File diff suppressed because it is too large Load Diff

@ -1,441 +1,310 @@
# Language translations for ubl-settings-diskquota package. # SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, UBTech LLC # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the ubl-settings-diskquota package. # This file is distributed under the same license as the PACKAGE package.
# UBLinux Team <info@ublinux.com>, 2022 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
# #
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-10 16:09+0000\n" "POT-Creation-Date: 2023-08-09 11:01+0600\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n" "Language: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: source/ubl-strings.h:1 #: source/ubl-settings-diskquota.h:32
msgid "Version:" msgid "Version:"
msgstr "" msgstr ""
#: source/ubl-strings.h:2 #: source/ubl-strings.h:10
msgid "ubl-settings-diskquota version:" msgid "ubl-settings-diskquota version:"
msgstr "" msgstr ""
#: source/ubl-strings.h:2 #: source/ubl-strings.h:10
msgid "TEMPLATE settings"
msgstr "Настройки TEMPLATE"
#: source/ubl-strings.h:2
msgid "Usage:" msgid "Usage:"
msgstr "" msgstr ""
#: source/ubl-strings.h:2 #: source/ubl-strings.h:10
msgid "[OPTIONS]" msgid "[OPTIONS]"
msgstr "" msgstr ""
#: source/ubl-strings.h:2 #: source/ubl-strings.h:10
msgid "Options:" msgid "Options:"
msgstr "" msgstr ""
#: source/ubl-strings.h:2 #: source/ubl-strings.h:10
msgid "Show this help" msgid "Show this help"
msgstr "" msgstr ""
#: source/ubl-strings.h:2 #: source/ubl-strings.h:10
msgid "Show package version" msgid "Show package version"
msgstr "" msgstr ""
#: source/ubl-strings.h:2 #: source/ubl-strings.h:10
msgid "Lock this help menu" msgid "Lock this help menu"
msgstr "" msgstr ""
#: source/ubl-strings.h:2 #: source/ubl-strings.h:10
#, fuzzy
msgid "Lock configuration saving" msgid "Lock configuration saving"
msgstr "" msgstr ""
#: source/ubl-strings.h:2 #: source/ubl-strings.h:10
msgid "Lock local configration saving" msgid "Lock local configration saving"
msgstr "" msgstr ""
#: source/ubl-strings.h:2 #: source/ubl-strings.h:10
msgid "Lock global configration saving" msgid "Lock global configration saving"
msgstr "" msgstr ""
#: source/ubl-strings.h:2 #: source/ubl-strings.h:10
msgid "Lock global configration loading" msgid "Lock global configration loading"
msgstr "" msgstr ""
#: source/ubl-strings.h:5 #: source/ubl-strings.h:12
msgid "System TEMPLATE settings management" msgid "Disk quotas"
msgstr ""
#: source/ubl-strings.h:13
msgid "Configuring disk quota settings for system groups and users"
msgstr "" msgstr ""
#: source/ubl-strings.h:7 #: source/ubl-strings.h:15
msgid "Operation succeeded" msgid "Operation succeeded"
msgstr "" msgstr ""
#: source/ubl-strings.h:8 #: source/ubl-strings.h:16
msgid "" msgid ""
"Warning! Application was launched without root - root-dependent actions are " "Warning! Application was launched without root - root-dependent actions are "
"locked." "locked."
msgstr "" msgstr ""
#: source/ubl-strings.h:10 #: source/ubl-strings.h:18
msgid "About" msgid "About"
msgstr "" msgstr ""
#: source/ubl-strings.h:11 #: source/ubl-strings.h:19
msgid "Documentation" msgid "Documentation"
msgstr "" msgstr ""
#: source/ubl-strings.h:12 #: source/ubl-strings.h:21
msgid "Save to local configuration" msgid "Save to local configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:13 #: source/ubl-strings.h:22
msgid "Save to global configuration" msgid "Save to global configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:14 #: source/ubl-strings.h:23
msgid "Save configuration" msgid "Save configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:15 #: source/ubl-strings.h:24
msgid "Save" msgid "Save"
msgstr "" msgstr ""
#: source/ubl-strings.h:16 #: source/ubl-strings.h:26
msgid "Load local configuration" msgid "Load local configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:17 #: source/ubl-strings.h:27
msgid "Load global configuration" msgid "Load global configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:18 #: source/ubl-strings.h:28
msgid "Load" msgid "Load"
msgstr "" msgstr ""
#: source/ubl-strings.h:20 #: source/ubl-strings.h:30 source/ubl-strings.h:101
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
#: source/ubl-strings.h:22 #: source/ubl-strings.h:30 source/ubl-strings.h:102
msgid "Save"
msgstr ""
#: source/ubl-strings.h:32
msgid "Would you like to read documentation in the Web?" msgid "Would you like to read documentation in the Web?"
msgstr "" msgstr ""
#: source/ubl-strings.h:23 #: source/ubl-strings.h:33
msgid "" msgid ""
"You will be redirected to documentation website where documentation is\n" "You will be redirected to documentation website where documentation is\n"
"translated and supported by community." "translated and supported by community."
msgstr "" msgstr ""
#: source/ubl-strings.h:24 #: source/ubl-strings.h:34
msgid "Always redirect to online documentation" msgid "Always redirect to online documentation"
msgstr "" msgstr ""
#: source/ubl-strings.h:25 #: source/ubl-strings.h:35
msgid "Open documentation" msgid "Open documentation"
msgstr "" msgstr ""
#: source/ubl-strings.h:26 #: source/ubl-strings.h:36
msgid "Project Home Page" msgid "Project Home Page"
msgstr "" msgstr ""
#: source/ubl-strings.h:27 #: source/ubl-strings.h:37
msgid "Nothing were chosen" msgid "Nothing were chosen"
msgstr "" msgstr ""
#: source/ubl-strings.h:30 #: source/ubl-strings.h:40
msgid "Global configuration loading succseeded." msgid "Global configuration loading succseeded."
msgstr "" msgstr ""
#: source/ubl-strings.h:31 #: source/ubl-strings.h:41
msgid "Local configuration loading succseeded." msgid "Local configuration loading succseeded."
msgstr "" msgstr ""
#: source/ubl-strings.h:33 #: source/ubl-strings.h:42
msgid "Config loading failed"
msgstr ""
#: source/ubl-strings.h:44
msgid "Local and global configuration saving succseeded." msgid "Local and global configuration saving succseeded."
msgstr "" msgstr ""
#: source/ubl-strings.h:34 #: source/ubl-strings.h:45
msgid "Global configuration saving succseeded." msgid "Global configuration saving succseeded."
msgstr "" msgstr ""
#: source/ubl-strings.h:35 #: source/ubl-strings.h:46
msgid "Local configuration saving succseeded." msgid "Local configuration saving succseeded."
msgstr "" msgstr ""
msgid "Edit" #: source/ubl-strings.h:47
msgid "Nothing to save!"
msgstr "" msgstr ""
#: source/ubl-strings.h:49
msgid "Kb" msgid "Kb"
msgstr "" msgstr ""
#: source/ubl-strings.h:50
msgid "Mb" msgid "Mb"
msgstr "" msgstr ""
#: source/ubl-strings.h:51
msgid "Gb" msgid "Gb"
msgstr "" msgstr ""
#: source/ubl-strings.h:52
msgid "Tb" msgid "Tb"
msgstr "" msgstr ""
msgid "Disk quotas" #: source/ubl-strings.h:65
msgstr ""
msgid "Configuring disk quota settings for system groups and users"
msgstr ""
msgid "Device"
msgstr ""
msgid "Device:"
msgstr ""
msgid "Catalog"
msgstr ""
msgid "Catalog:"
msgstr ""
msgid "Project Name"
msgstr ""
msgid "Project Name:"
msgstr ""
msgid "Auto"
msgstr ""
msgid "Review"
msgstr ""
msgid "Generate"
msgstr ""
msgid "User"
msgstr ""
msgid "Group"
msgstr ""
msgid "User:"
msgstr ""
msgid "Users:"
msgstr ""
msgid "Users"
msgstr ""
msgid "Group:"
msgstr ""
msgid "Groups:"
msgstr ""
msgid "Groups"
msgstr ""
msgid "Projects:"
msgstr ""
msgid "Quota type"
msgstr ""
msgid "Status"
msgstr ""
msgid "Projects"
msgstr ""
msgid "Error saved local and global configuration"
msgstr ""
msgid "The delay period for exceeding files:"
msgstr ""
msgid "The postponement period for exceeding the volume:"
msgstr ""
msgid "File system:"
msgstr ""
msgid "Files"
msgstr ""
msgid "Filters"
msgstr ""
msgid "minutes"
msgstr ""
msgid "name"
msgstr ""
msgid "days"
msgstr ""
msgid "files"
msgstr ""
msgid "hours"
msgstr ""
msgid "w " msgid "w "
msgstr "" msgstr ""
#: source/ubl-strings.h:66
msgid "d " msgid "d "
msgstr "" msgstr ""
#: source/ubl-strings.h:67
msgid "h " msgid "h "
msgstr "" msgstr ""
#: source/ubl-strings.h:68
msgid "m " msgid "m "
msgstr "" msgstr ""
msgid "weeks" #: source/ubl-strings.h:70
msgstr "" msgid "On"
msgid "General statistics"
msgstr ""
msgid "https://wiki.ublinux.com"
msgstr "" msgstr ""
#: source/ubl-strings.h:71
msgid "Off" msgid "Off"
msgstr "" msgstr ""
#: source/ubl-strings.h:72
msgid "Not set" msgid "Not set"
msgstr "" msgstr ""
msgid "Name" #: source/ubl-strings.h:73
msgstr "" msgid "Settings quotas - Addition"
msgid "Nothing to save!"
msgstr ""
msgid "Project ID"
msgstr ""
msgid "Project ID:"
msgstr ""
msgid "Settings disk quotas - Addition"
msgstr ""
msgid "Settings disk quotas - Editing"
msgstr ""
msgid "Quota use status:"
msgstr ""
msgid "Size"
msgstr ""
msgid "Quotas"
msgstr ""
msgid "Mount\npoint"
msgstr ""
msgid "FS"
msgstr ""
msgid "The postponement period\nfor exceeding the volume"
msgstr ""
msgid "The delay period\nfor exceeding files"
msgstr ""
msgid "Soft\nrestriction\n(volume)"
msgstr ""
msgid "Hard\nlimit\n(volume)"
msgstr ""
msgid "Postponing\nthe\nhard\nlimit\n(volume)"
msgstr "" msgstr ""
msgid "Soft\nrestriction\n(files)" #: source/ubl-strings.h:74
msgid "Settings quotas - Editing"
msgstr "" msgstr ""
msgid "Hard\nlimit\n(files)" #: source/ubl-strings.h:78
msgstr "" msgid "Please select folder"
msgid "Postponing\nthe\nhard\nlimit\n(files)"
msgstr ""
msgid "Device/\nProject"
msgstr ""
msgid "Soft limit"
msgstr ""
msgid "Hard limit"
msgstr "" msgstr ""
msgid "Soft limit (volume)" #: source/ubl-strings.h:80
msgid "User"
msgstr "" msgstr ""
msgid "Hard limit (volume)" #: source/ubl-strings.h:81
msgid "Group"
msgstr "" msgstr ""
msgid "Postponing the hard limit (volume)" #: source/ubl-strings.h:82
msgid "Project"
msgstr "" msgstr ""
msgid "Soft limit (files)" #: source/ubl-strings.h:83
msgid "Users"
msgstr "" msgstr ""
msgid "Hard limit (files)" #: source/ubl-strings.h:84
msgid "Groups"
msgstr "" msgstr ""
msgid "Postponing the hard limit (files)" #: source/ubl-strings.h:86
msgid "Is not a directory"
msgstr "" msgstr ""
msgid "On" #: source/ubl-strings.h:87
msgid "Withdraw all users"
msgstr "" msgstr ""
msgid "Please select folder" #: source/ubl-strings.h:88
msgid "Withdraw all groups"
msgstr "" msgstr ""
msgid "Warning" #: source/ubl-strings.h:90
msgid "Project ID mandatory field"
msgstr "" msgstr ""
msgid "The selected directory is not located on the target device" #: source/ubl-strings.h:91
msgid "The path does not match the specified disk"
msgstr "" msgstr ""
msgid "Withdraw all users" #: source/ubl-strings.h:92
msgid "Project name mandatory field"
msgstr "" msgstr ""
msgid "Withdraw all groups" #: source/ubl-strings.h:93
msgid "Project name required field"
msgstr "" msgstr ""
#: source/ubl-strings.h:94
msgid "The list of users is empty" msgid "The list of users is empty"
msgstr "" msgstr ""
msgid "Project name required field" #: source/ubl-strings.h:95
msgstr "" msgid "To save, you need to select a disk"
msgid "Project ID mandatory field"
msgstr "" msgstr ""
msgid "The volume and files fields must have at least one value" #: source/ubl-strings.h:96
msgid "Insert at least one value before saving"
msgstr "" msgstr ""
msgid "The path does not match the specified disk" #: source/ubl-strings.h:97
msgid "The selected directory is not located on the target device"
msgstr "" msgstr ""
msgid "Project name mandatory field" #: source/ubl-strings.h:99
msgid "Add"
msgstr "" msgstr ""
msgid "Project" #: source/ubl-strings.h:100
msgid "Update"
msgstr "" msgstr ""
msgid "Is not a directory"
msgstr ""

@ -433,8 +433,8 @@ msgstr "Имя проекта обязательное поле"
msgid "Project ID mandatory field" msgid "Project ID mandatory field"
msgstr "ID проекта обязательное поле" msgstr "ID проекта обязательное поле"
msgid "The volume and files fields must have at least one value" msgid "Insert at least one value before saving"
msgstr "Поля объем и файлы должно быть указано хотя бы одно значение" msgstr "Необходимо ввести хотя бы одно значение перед сохранением"
msgid "The path does not match the specified disk" msgid "The path does not match the specified disk"
msgstr "Путь не соответствует указанному диску" msgstr "Путь не соответствует указанному диску"
@ -449,4 +449,10 @@ msgid "Project"
msgstr "Проект" msgstr "Проект"
msgid "Is not a directory" msgid "Is not a directory"
msgstr "Не является каталогом" msgstr "Не является каталогом"
msgid "Add"
msgstr "Добавить"
msgid "Update"
msgstr "Обновить"
Loading…
Cancel
Save