Fixed users loading

pull/326/head
parent 7643ff70d9
commit 09aa0b178e

@ -58,7 +58,6 @@ void yon_read_log(GFileMonitor *,GFile *,GFile *,GFileMonitorEvent ,log_window *
gtk_text_buffer_get_end_iter(gtk_text_view_get_buffer(GTK_TEXT_VIEW(window->LogTextView)),&end_iter); gtk_text_buffer_get_end_iter(gtk_text_view_get_buffer(GTK_TEXT_VIEW(window->LogTextView)),&end_iter);
gtk_text_buffer_delete(gtk_text_view_get_buffer(GTK_TEXT_VIEW(window->LogTextView)),&start_iter,&end_iter); gtk_text_buffer_delete(gtk_text_view_get_buffer(GTK_TEXT_VIEW(window->LogTextView)),&start_iter,&end_iter);
gtk_text_buffer_set_text(gtk_text_view_get_buffer(GTK_TEXT_VIEW(window->LogTextView)),final,strlen(final)); gtk_text_buffer_set_text(gtk_text_view_get_buffer(GTK_TEXT_VIEW(window->LogTextView)),final,strlen(final));
// gtk_label_set_text(GTK_LABEL(window->LogTextView),final);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->ScrollToEndCheck))){ if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->ScrollToEndCheck))){
if (!window->timer_id){ if (!window->timer_id){
window->timer_id = g_idle_add((GSourceFunc)yon_log_scroll,window); window->timer_id = g_idle_add((GSourceFunc)yon_log_scroll,window);

@ -137,9 +137,21 @@ void yon_user_init(main_window *widgets){
if (!main_config.configure_mode){ if (!main_config.configure_mode){
int size = 0; int size = 0;
config_str users = yon_config_get_all_by_key(USERADD_parameter_search,&size); config_str users = yon_config_get_all_by_key(USERADD_parameter_search,&size);
for(int i=0;i<size;i++){
if (strstr(users[i],"=")){
char *temp = yon_char_divide_search(users[i],"=",-1);
free(users[i]);
users[i] = temp;
}
}
yon_config_remove_by_list(users,size); yon_config_remove_by_list(users,size);
yon_config_update_by_args(autologin_parameter,root_password_parameter,NULL); yon_config_update_by_args(autologin_parameter,root_password_parameter,NULL);
yon_config_load_config(YON_CONFIG_CUSTOM,ubconfig_load_command(main_config.config_load_path),USERADD_parameter_all,NULL); config_str parameters = yon_config_load(config_get_command(main_config.config_load_path),&size);
for (int i=0;i<size;i++){
if (strstr(parameters[i],USERADD_parameter_search)){
yon_config_import_string(main_config.configure_mode,parameters[i]);
}
}
} }
gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->UserRootPasswordCombo)); gtk_combo_box_text_remove_all(GTK_COMBO_BOX_TEXT(widgets->UserRootPasswordCombo));
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->UserRootPasswordCombo),NULL,DEFAULT_LABEL); gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(widgets->UserRootPasswordCombo),NULL,DEFAULT_LABEL);

@ -151,7 +151,8 @@ NULL)
#define CONFIGURATION_SAVE_LABEL _("You can safely exit configurator or return and create new configuration file.") #define CONFIGURATION_SAVE_LABEL _("You can safely exit configurator or return and create new configuration file.")
#define SCROLL_TO_END_LABEL _("Scroll to the end") #define SCROLL_TO_END_LABEL _("Scroll to the end")
#define ADMINISTRATOR_LABEL _("Administrator") #define ADMINISTRATOR_LABEL _("Empty default user")
// #define ADMINISTRATOR_LABEL _("Administrator")
#define DEFAULT_LOCALES_LABEL _("English, U.S.A.; Russian, Russia") #define DEFAULT_LOCALES_LABEL _("English, U.S.A.; Russian, Russia")
#define READ_INSTALL_LOG_LABEL _("Read installation log") #define READ_INSTALL_LOG_LABEL _("Read installation log")

Loading…
Cancel
Save