diff --git a/source/ubl-settings-usergroups.c b/source/ubl-settings-usergroups.c index b9b19b4..cb274aa 100644 --- a/source/ubl-settings-usergroups.c +++ b/source/ubl-settings-usergroups.c @@ -1822,9 +1822,9 @@ void on_parameter_changed(GtkWidget *self,ubl_settings_usergroups_user_window *w 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); + 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); + user_shell = yon_char_unite("--shell ",(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo)),NULL); } } else user_shell=""; @@ -1840,7 +1840,7 @@ void on_parameter_changed(GtkWidget *self,ubl_settings_usergroups_user_window *w int system_user_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateSystemCheck)); if (system_user_active) - create_system_user = " --system"; + create_system_user = "--system"; int create_ununique_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateUnuniqueCheck)); if (create_ununique_active) @@ -1855,7 +1855,7 @@ void on_parameter_changed(GtkWidget *self,ubl_settings_usergroups_user_window *w main_group = ""; } char *final_string = user_home; - final_string = yon_char_unite(user_home,!yon_char_is_empty(final_string)?" ":"", + final_string = yon_char_unite(final_string,!yon_char_is_empty(final_string)?" ":"", yon_char_return_if_exist(user_shell,""), !yon_char_is_empty(user_shell)?" ":"", yon_char_return_if_exist(create_system_user,""), @@ -1866,6 +1866,7 @@ void on_parameter_changed(GtkWidget *self,ubl_settings_usergroups_user_window *w !yon_char_is_empty(do_not_check)?" ":"", yon_char_return_if_exist(no_user_group,""), NULL); + if (final_string[strlen(final_string)-1]==' ') final_string[strlen(final_string)-1]='\0'; gtk_entry_set_text(GTK_ENTRY(window->userExtraOptionsEntry),final_string); free(final_string); }