From d7f96635abf3bce88be6dec077223837b3cd0d71 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Wed, 18 Feb 2026 17:36:00 +0600 Subject: [PATCH 1/3] Fixed group editing --- source/CMakeLists.txt | 2 +- source/ubl-settings-usergroups-group.c | 6 +++++- source/ubl-settings-usergroups.c | 8 ++++++-- ubl-settings-usergroups.desktop | 0 4 files changed, 12 insertions(+), 4 deletions(-) mode change 100644 => 100755 ubl-settings-usergroups.desktop diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index b9894e3..bec35b4 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -12,6 +12,7 @@ pkg_check_modules(VTE291 REQUIRED vte-2.91) include_directories(${VTE291_INCLUDE_DIRS}) link_directories(${VTE291_LIBRARY_DIRS}) add_definitions(${VTE291_CFLAGS_OTHER}) +add_definitions(-DVTE_INCLUDE) pkg_check_modules(PWQ REQUIRED pwquality) include_directories(${PWQ_INCLUDE_DIRS}) @@ -72,7 +73,6 @@ add_custom_target( ) -add_definitions(-DVTE_INCLUDE) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ -O2 -pipe -fno-plt -fexceptions \ diff --git a/source/ubl-settings-usergroups-group.c b/source/ubl-settings-usergroups-group.c index 94a39ea..feb5058 100644 --- a/source/ubl-settings-usergroups-group.c +++ b/source/ubl-settings-usergroups-group.c @@ -156,11 +156,15 @@ void on_group_save(GtkWidget *self, dictionary *dict){ { GtkTreeIter iter; GtkTreeModel *model = GTK_TREE_MODEL(widgets->GroupsList); + // char *edit_status = g_object_get_data(G_OBJECT(window->CreateGroupWindow),"edit state"); for_iter(model,&iter){ char *cur; gtk_tree_model_get(model,&iter,1, &cur,-1); if (!yon_char_is_empty(cur)&&!strcmp(cur,group_name)){ - if (!gtk_tree_selection_iter_is_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GroupsTree)),&iter)){ + GtkTreeIter child,sort; + gtk_tree_model_filter_convert_child_iter_to_iter(GTK_TREE_MODEL_FILTER(widgets->ConfigGroupsFilter),&child,&iter); + gtk_tree_model_sort_convert_child_iter_to_iter(GTK_TREE_MODEL_SORT(widgets->ConfigGroupsSort),&sort,&child); + if (!gtk_tree_selection_iter_is_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GroupsTree)),&sort)){ yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),GROUP_EXIST_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_highlight_incorrect(window->userLoginEntry); diff --git a/source/ubl-settings-usergroups.c b/source/ubl-settings-usergroups.c index f24217e..864dea0 100644 --- a/source/ubl-settings-usergroups.c +++ b/source/ubl-settings-usergroups.c @@ -1595,8 +1595,10 @@ void on_main_edit(GtkWidget *, main_window *widgets){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck),0); gtk_entry_set_text(GTK_ENTRY(window->userUIDEntry), parsed_size>1?parameters[1]:""); } - if (!yon_char_is_empty(parameters[1])) + if (!yon_char_is_empty(parameters[1])){ window->last_uid=yon_char_new(parameters[1]); + g_object_set_data(G_OBJECT(window->CreateUserWindow),"edit state",yon_char_new(name)); + } } if (parsed_size>2){ if (!strcmp(parameters[2],"x")||!strcmp(parameters[2],"")) @@ -1741,6 +1743,7 @@ void on_main_edit(GtkWidget *, main_window *widgets){ model = GTK_TREE_MODEL(widgets->ConfigGroupsSort); if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GroupsTree)),&model,&iter)){ ubl_settings_usergroups_group_creation_window *window = yon_ubl_settings_usergroups_group_creation_new(); + gtk_widget_set_sensitive(window->userLoginEntry,0); gtk_window_set_title(GTK_WINDOW(window->CreateGroupWindow),CONFIGURE_GROUP_TITLE_LABEL); gtk_label_set_text(GTK_LABEL(window->userTitleNameLabel),CONFIGURE_GROUP_TITLE_LABEL); dictionary *dict = NULL; @@ -1766,7 +1769,8 @@ void on_main_edit(GtkWidget *, main_window *widgets){ g_signal_handlers_block_by_func(G_OBJECT(window->userUIDAutoCheck),G_CALLBACK(on_GID_update),window); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck),0); g_signal_handlers_unblock_by_func(G_OBJECT(window->userUIDAutoCheck),G_CALLBACK(on_GID_update),window); - window->last_gid=yon_char_new(parsed[1]); + window->last_gid=yon_char_new(name); + g_object_set_data(G_OBJECT(window->CreateGroupWindow),"edit state",yon_char_new(name)); } } if (size>2&&!yon_char_is_empty(parsed[2])){ diff --git a/ubl-settings-usergroups.desktop b/ubl-settings-usergroups.desktop old mode 100644 new mode 100755 -- 2.35.1 From f4c80e7c569c16cf2ee78b926f5c58c9ec011e74 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Wed, 18 Feb 2026 17:47:12 +0600 Subject: [PATCH 2/3] Fixed wiki link --- locale/ubl-settings-usergroups.pot | 5 +++++ locale/ubl-settings-usergroups_ru.po | 5 +++++ source/ubl-settings-usergroups.h | 1 - source/ubl-strings.h | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/locale/ubl-settings-usergroups.pot b/locale/ubl-settings-usergroups.pot index 06afdf3..8aa1b2f 100644 --- a/locale/ubl-settings-usergroups.pot +++ b/locale/ubl-settings-usergroups.pot @@ -17,6 +17,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +#: source/ubl-strings.h:3 +msgid "" +"https://wiki.ublinux.com/en/software/programs_and_utilities/all/ubl-settings-usergroups" +msgstr "" + #: source/ubl-strings.h:3 msgid "Users and groups" msgstr "" diff --git a/locale/ubl-settings-usergroups_ru.po b/locale/ubl-settings-usergroups_ru.po index 6ba7b67..868ae3d 100644 --- a/locale/ubl-settings-usergroups_ru.po +++ b/locale/ubl-settings-usergroups_ru.po @@ -17,6 +17,11 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +#: source/ubl-strings.h:3 +msgid "" +"https://wiki.ublinux.com/en/software/programs_and_utilities/all/ubl-settings-usergroups" +msgstr "https://wiki.ublinux.com/ru/software/programs_and_utilities/all/ubl-settings-usergroups" + #: source/ubl-strings.h:3 msgid "Users and groups" msgstr "Пользователи и группы" diff --git a/source/ubl-settings-usergroups.h b/source/ubl-settings-usergroups.h index 6cb8b55..91ee45d 100644 --- a/source/ubl-settings-usergroups.h +++ b/source/ubl-settings-usergroups.h @@ -20,7 +20,6 @@ #include "ubl-strings.h" #include "pwquality.h" -#define WIKI_LINK "https://wiki.ublinux.ru/software/programs_and_utilities/all/ubl-settings-usergroups" #define _(String) gettext(String) diff --git a/source/ubl-strings.h b/source/ubl-strings.h index e41a3a9..21d2c8d 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -2,6 +2,7 @@ #define TITLE_LABEL _("Users and groups") #define TITLE_INFO_LABEL _("System users and groups configuration") +#define WIKI_LINK "https://wiki.ublinux.com/en/software/programs_and_utilities/all/ubl-settings-usergroups" #define DEFAULT_USER_GROUPS_LABEL _("Default user groups:") #define DEFAULT_USER_NAME_LABEL _("Default user name (if there's no another):") -- 2.35.1 From 348b6769dba9ede1c8a962d6e8cb094eca4c9a58 Mon Sep 17 00:00:00 2001 From: Ivan Dmitrievich Yartsev Date: Wed, 18 Feb 2026 17:53:39 +0600 Subject: [PATCH 3/3] Fixed group window search --- ubl-settings-usergroups-group.glade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubl-settings-usergroups-group.glade b/ubl-settings-usergroups-group.glade index 999ca94..9a936d2 100644 --- a/ubl-settings-usergroups-group.glade +++ b/ubl-settings-usergroups-group.glade @@ -73,7 +73,7 @@ True True - 2 + 1 vertical -- 2.35.1