From d50a94bc30bc35eee71cccc8197a752cf435af47 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 17 Dec 2024 17:49:18 +0600 Subject: [PATCH 1/2] Fixed visual bug, causing wrong --shell parameter --- source/ubl-settings-usergroups.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/ubl-settings-usergroups.c b/source/ubl-settings-usergroups.c index 2fdb0b4..2efd6ae 100644 --- a/source/ubl-settings-usergroups.c +++ b/source/ubl-settings-usergroups.c @@ -2108,9 +2108,11 @@ void on_user_save(GtkWidget *self, dictionary *dict){ int user_shell_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->userShellCombo)); if (user_shell_active>0){ - user_shell = yon_char_unite("--shell ",(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo)),NULL); - if (!strcmp(user_shell,SET_LABEL)){ - user_shell = yon_char_unite("--shell ",(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo)),NULL); + char *shell_string = (char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo)); + if (strcmp(shell_string,SET_LABEL)){ + user_shell = yon_char_unite("--shell ",shell_string,NULL); + } else { + user_shell = yon_char_unite("--shell ",(char*)gtk_entry_get_text(GTK_ENTRY(window->userShellEntry)),NULL); } } else user_shell=""; From c543e08672e8cb6e3f7221376169fbb660d9d8bd Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 17 Dec 2024 17:58:20 +0600 Subject: [PATCH 2/2] Fixed gid saving --- source/ubl-settings-usergroups.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/ubl-settings-usergroups.c b/source/ubl-settings-usergroups.c index 2efd6ae..9d41bc1 100644 --- a/source/ubl-settings-usergroups.c +++ b/source/ubl-settings-usergroups.c @@ -2724,7 +2724,9 @@ void on_main_edit(GtkWidget *, main_window *widgets){ if (size>1){ if (strcmp(parsed[1],"")&&strcmp(parsed[1],"x")){ gtk_entry_set_text(GTK_ENTRY(window->userUIDEntry),parsed[1]); + 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]); } }