From 018710b2ea09e22c5236bef86e4a2815cdb9414f Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Fri, 29 Dec 2023 12:12:43 +0600 Subject: [PATCH] Added status messages for loading --- source/ubl-settings-usergroups.c | 8 ++++++++ source/ubl-settings-usergroups.h | 2 +- source/ubl-strings.h | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/source/ubl-settings-usergroups.c b/source/ubl-settings-usergroups.c index 286dceb..af41582 100644 --- a/source/ubl-settings-usergroups.c +++ b/source/ubl-settings-usergroups.c @@ -74,12 +74,18 @@ void yon_interface_update(main_window *widgets){ void on_config_local_load(GtkWidget *self, main_window *widgets){ yon_load_proceed(YON_CONFIG_LOCAL); + textdomain(template_ui_LocaleName); + yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + textdomain(LocaleName); main_config.load_mode=1; yon_interface_update(widgets); } void on_config_global_load(GtkWidget *self, main_window *widgets){ yon_load_proceed(YON_CONFIG_GLOBAL); + textdomain(template_ui_LocaleName); + yon_ubl_status_box_render(GLOBAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); + textdomain(LocaleName); main_config.load_mode=0; yon_interface_update(widgets); } @@ -1289,6 +1295,8 @@ void on_main_delete(GtkWidget *self, main_window *widgets){ char *name; gtk_tree_model_get(model,&iter,2,&name,-1); yon_config_remove_by_key(USERADD(name)); + yon_config_remove_by_key(USERADD_SYNC(name)); + yon_config_remove_by_key(USERSHADOW(name)); gtk_list_store_remove(GTK_LIST_STORE(model),&iter); } } else { diff --git a/source/ubl-settings-usergroups.h b/source/ubl-settings-usergroups.h index 6238dc8..30b7fea 100644 --- a/source/ubl-settings-usergroups.h +++ b/source/ubl-settings-usergroups.h @@ -32,7 +32,7 @@ #define config_path yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL) #define LocalePath "/usr/share/locale" -#define LocaleName "ubl-settings-usergroups" +#define LocaleName "ubl-settings-usergroups" #define clear_config_both_command "ubconfig remove TEMP_SECTION TEMP_PATAMETER" #define clear_config_global_command "ubconfig --target global remove TEMP_SECTION TEMP_PATAMETER" diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 54639f8..2b2a576 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -82,6 +82,7 @@ #define ADDITIONAL_CONFIGURATION_LABEL _("Additional configuration") //ubl-settings-usergroups-group.glade +#define DEFAULT_GROUPS_TITLE_LABEL _("Default groups") #define GROUPS_TITLE_LABEL _("Choose groups") #define GROUP_USERS_TITLE_LABEL _("Choose users")