diff --git a/source/ubl-settings-usergroups.c b/source/ubl-settings-usergroups.c index d40984e..1b116fb 100644 --- a/source/ubl-settings-usergroups.c +++ b/source/ubl-settings-usergroups.c @@ -411,6 +411,9 @@ void on_save_done(main_window *widgets, config_str output, int size){ textdomain(LocaleName); } +void on_save_failed(main_window *, config_str , int ){ + yon_samba_sync_proceed(); +} void on_config_save(GtkWidget *, main_window *){ @@ -2660,6 +2663,10 @@ void on_main_edit(GtkWidget *, main_window *widgets){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userDeactivatedCheck),1); } if (!yon_char_is_empty(parameters[5])){ + if (check_is_password_hash(parameters[5])){ + gtk_widget_set_sensitive(window->userSyncSAMBAPasswordCheck,0); + g_signal_handlers_block_by_func(G_OBJECT(window->userSyncSAMBACheck),G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->userSyncSAMBAPasswordCheck); + } if (!strcmp(parameters[5],"!*")){ gtk_combo_box_set_active(GTK_COMBO_BOX(window->userPasswordCombo),1); } else { @@ -3150,6 +3157,7 @@ main_window *yon_main_window_complete(main_window *widgets){ } g_list_free(list); yon_save_window_set_postsave_function(on_save_done,widgets); + yon_save_window_set_postsave_failure_function(on_save_failed,widgets); return widgets; } diff --git a/source/ubl-settings-usergroups.h b/source/ubl-settings-usergroups.h index e75ed76..20a3662 100644 --- a/source/ubl-settings-usergroups.h +++ b/source/ubl-settings-usergroups.h @@ -400,6 +400,7 @@ void yon_samba_sync_proceed(); void yon_accept_changes(); void yon_hide_passwords(template_saving_window *window); void on_save_done(main_window *widgets, config_str output, int size); +void on_save_failed(main_window *, config_str , int ); void on_config_save(GtkWidget *self, main_window *widgets); void on_config_global_save(GtkWidget *self, main_window *widgets); void on_config_local_save(GtkWidget *self, main_window *widgets);