Fixed additional parameters spaces

pull/133/head
parent df0dccf4b9
commit 2b748acd50

@ -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)); int user_shell_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->userShellCombo));
if (user_shell_active>0){ 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)){ 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=""; } 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)); int system_user_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateSystemCheck));
if (system_user_active) 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)); int create_ununique_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateUnuniqueCheck));
if (create_ununique_active) if (create_ununique_active)
@ -1855,7 +1855,7 @@ void on_parameter_changed(GtkWidget *self,ubl_settings_usergroups_user_window *w
main_group = ""; main_group = "";
} }
char *final_string = user_home; 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_return_if_exist(user_shell,""),
!yon_char_is_empty(user_shell)?" ":"", !yon_char_is_empty(user_shell)?" ":"",
yon_char_return_if_exist(create_system_user,""), 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_is_empty(do_not_check)?" ":"",
yon_char_return_if_exist(no_user_group,""), yon_char_return_if_exist(no_user_group,""),
NULL); 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); gtk_entry_set_text(GTK_ENTRY(window->userExtraOptionsEntry),final_string);
free(final_string); free(final_string);
} }

Loading…
Cancel
Save