Test fix for saving crash

pull/170/head
parent 41f3709207
commit a0913dbc39

@ -1036,6 +1036,20 @@ void on_expiration_clicked(GtkWidget *self, ubl_settings_usergroups_user_window
}else {
yon_config_remove_by_key(HASHPASSWD_parameter);
}
char *sync = "";
int boot_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsersBootCheck));
int shutdown_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsersShutdownCheck));
if (!boot_active&&!shutdown_active){
yon_config_remove_by_key(USERADD_SYNC_parameter);
} else {
if (boot_active){
sync = "boot";
}
if (shutdown_active){
sync = yon_char_unite(sync,yon_char_is_empty(sync)?"":",","shutdown");
}
yon_config_register(USERADD_SYNC_parameter,USERADD_SYNC_parameter_command,sync);
}
}
void on_hash_changed(GtkWidget *self, ubl_settings_usergroups_additional_settings_window *window){
@ -1192,8 +1206,8 @@ ubl_settings_usergroups_additional_settings_window *yon_ubl_settings_usergroups_
g_signal_connect(G_OBJECT(window->PasswordHashCombo),"changed",G_CALLBACK(on_hash_changed),window);
g_signal_connect(G_OBJECT(window->UsersBootCheck),"toggled",G_CALLBACK(on_users_boot_toggled),NULL);
g_signal_connect(G_OBJECT(window->UsersShutdownCheck),"toggled",G_CALLBACK(on_users_shutdown_toggled),NULL);
// g_signal_connect(G_OBJECT(window->UsersBootCheck),"toggled",G_CALLBACK(on_users_boot_toggled),NULL);
// g_signal_connect(G_OBJECT(window->UsersShutdownCheck),"toggled",G_CALLBACK(on_users_shutdown_toggled),NULL);
return window;
}

Loading…
Cancel
Save