From 8b55f1158327b0551546bde53110643f65111fca Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 16 Jan 2025 16:42:28 +0600 Subject: [PATCH] Menus has been added for system users and groups tables --- source/ubl-settings-usergroups.c | 2 + source/ubl-settings-usergroups.h | 1 + source/ubl-strings.h | 1 + ...tings-usergroups-additional-settings.glade | 220 ++++++++++++++- ubl-settings-usergroups.glade | 2 +- ubl-settings-usergroups.pot | 266 +++++++++--------- ubl-settings-usergroups_ru.po | 266 +++++++++--------- 7 files changed, 491 insertions(+), 267 deletions(-) diff --git a/source/ubl-settings-usergroups.c b/source/ubl-settings-usergroups.c index 2ac5912..847aa3e 100644 --- a/source/ubl-settings-usergroups.c +++ b/source/ubl-settings-usergroups.c @@ -2450,6 +2450,8 @@ main_window *yon_main_window_complete(main_window *widgets){ g_signal_connect(G_OBJECT(widgets->LoadCustomMenuItem),"activate",G_CALLBACK(on_config_custom_load),widgets); widgets->UsersMenu = yon_rmb_menu_setup(widgets->UsersTree,(RmbCheck)yon_element_chosen,widgets->UsersTree,CREATE_NEW_LABEL,add_icon_name,G_CALLBACK(on_main_add),widgets,EDIT_LABEL,edit_icon_name,G_CALLBACK(on_main_edit),widgets, REMOVE_LABEL,delete_icon_name,G_CALLBACK(on_main_delete),widgets,NULL); widgets->GroupsMenu = yon_rmb_menu_setup(widgets->GroupsTree,(RmbCheck)yon_element_chosen,widgets->GroupsTree,CREATE_NEW_LABEL,add_icon_name,G_CALLBACK(on_main_add),widgets,EDIT_LABEL,edit_icon_name,G_CALLBACK(on_main_edit),widgets,REMOVE_LABEL,delete_icon_name,G_CALLBACK(on_main_delete),widgets,NULL); + widgets->GroupsMenu = yon_rmb_menu_setup(widgets->SystemTree,(RmbCheck)yon_element_chosen,widgets->GroupsTree,SYNC_TOOLTIP_LABEL,sync_icon_name,G_CALLBACK(on_user_sync_with_config),widgets,REMOVE_LABEL,delete_icon_name,G_CALLBACK(on_main_delete),widgets,NULL); + widgets->GroupsMenu = yon_rmb_menu_setup(widgets->SystemGroupsTree,(RmbCheck)yon_element_chosen,widgets->GroupsTree,SYNC_TOOLTIP_LABEL,sync_icon_name,G_CALLBACK(on_user_sync_with_config),widgets,REMOVE_LABEL,delete_icon_name,G_CALLBACK(on_main_delete),widgets,NULL); g_signal_connect(G_OBJECT(widgets->UsersTree),"button-press-event",G_CALLBACK(on_menu_open),widgets->UsersMenu); g_signal_connect(G_OBJECT(widgets->GroupsTree),"button-press-event",G_CALLBACK(on_menu_open),widgets->GroupsMenu); diff --git a/source/ubl-settings-usergroups.h b/source/ubl-settings-usergroups.h index e216f46..cc74f21 100644 --- a/source/ubl-settings-usergroups.h +++ b/source/ubl-settings-usergroups.h @@ -86,6 +86,7 @@ #define add_icon_name "com.ublinux.ubl-settings-usergroups.increase-symbolic" #define edit_icon_name "com.ublinux.ubl-settings-usergroups.edit-symbolic" #define delete_icon_name "com.ublinux.ubl-settings-usergroups.trash-symbolic" +#define sync_icon_name "com.ublinux.ubl-settings-usergroups.user-add-symbolic" #define password_hash_get_command(passwd) yon_char_append("mkpasswd2 ",passwd) diff --git a/source/ubl-strings.h b/source/ubl-strings.h index 0bc7e12..15f854a 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -64,6 +64,7 @@ #define SYSTEM_GROUP_SYSTEM_REMOVE_CONFIRMATION_LABEL(target) yon_char_unite(_("This group doesn't exist in configuration. Are you sure want to remove group")," ",target," ", _("from the system?"),NULL) #define SYSTEM_GROUP_CONFIG_REMOVE_CONFIRMATION_LABEL(target) yon_char_unite(_("This group exists in configuration and system. Are you sure want to remove group")," ",target,"", "?",NULL) +#define SYNC_TOOLTIP_LABEL _("Syncronize with configuration") //ubl-settings-usergroups-additional-settings.glade #define ADDITIONAL_SETTINGS_TITLE_LABEL _("Additional settings") diff --git a/ubl-settings-usergroups-additional-settings.glade b/ubl-settings-usergroups-additional-settings.glade index 7618860..4f83b00 100644 --- a/ubl-settings-usergroups-additional-settings.glade +++ b/ubl-settings-usergroups-additional-settings.glade @@ -3,6 +3,17 @@ + + + + + + + + + + + True False @@ -394,8 +405,109 @@ - - While shutdown, save the settings of all users with UID>=1000 to the configuration + + True + False + 0 + in + + + True + False + 5 + 5 + 5 + 5 + + + True + False + vertical + 5 + + + True + False + 5 + + + True + False + While shutdown, save the settings of all users with UID>=1000 to the configuration + + + False + True + 0 + + + + + True + True + + + False + True + end + 1 + + + + + False + True + 0 + + + + + True + False + slide-up + + + True + True + in + 150 + + + True + True + UsersShutdownList + both + + + + + + + False + True + 1 + + + + + + + + + + + + + True + True + 1 + + + + + While booting the operating system, apply the settings of all users from the configuration True True False @@ -404,7 +516,107 @@ False True - 1 + 2 + + + + + True + False + 0 + in + + + True + False + 5 + 5 + 5 + 5 + + + True + False + vertical + 5 + + + True + False + + + True + False + While shutdown, save the settings of all users with UID>=1000 to the configuration + + + False + True + 0 + + + + + True + True + + + False + True + end + 1 + + + + + False + True + 0 + + + + + True + False + slide-up + + + True + True + in + 150 + + + True + True + GroupsShutdownList + both + + + + + + + False + True + 1 + + + + + + + + + + + + + True + True + 3 @@ -425,7 +637,7 @@ - False + True True 1 diff --git a/ubl-settings-usergroups.glade b/ubl-settings-usergroups.glade index 3943708..4ec95c8 100644 --- a/ubl-settings-usergroups.glade +++ b/ubl-settings-usergroups.glade @@ -209,7 +209,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. True True - Additional saving configuration + Syncronize with configuration image5