|
|
|
|
@ -367,8 +367,9 @@ void yon_hide_passwords(template_saving_window *window){
|
|
|
|
|
char *old_value;
|
|
|
|
|
char *new_value;
|
|
|
|
|
gtk_tree_model_get(model,&iter,1,&name,2,&old_value,3,&new_value,-1);
|
|
|
|
|
int status = yon_config_get_status(name);
|
|
|
|
|
if (strstr(name,USERADD_SEARCH_macro)){
|
|
|
|
|
if (!yon_char_is_empty(new_value)&&!yon_char_is_empty(old_value)&&strstr(new_value,old_value)&&new_value[0]==old_value[0]){
|
|
|
|
|
if ((!yon_char_is_empty(new_value)&&!yon_char_is_empty(old_value)&&strstr(new_value,old_value)&&new_value[0]==old_value[0])&&!status){
|
|
|
|
|
GtkTreeIter *iter_cur = gtk_tree_iter_copy(&iter);
|
|
|
|
|
gtk_list_store_remove(window->list,iter_cur);
|
|
|
|
|
if (!gtk_tree_model_get_iter_first(model,&iter)){
|
|
|
|
|
@ -572,36 +573,11 @@ void on_config_global_save(GtkWidget *, main_window *){
|
|
|
|
|
|
|
|
|
|
void on_config_local_save(GtkWidget *, main_window *){
|
|
|
|
|
main_config.save_config=1;
|
|
|
|
|
// int size;
|
|
|
|
|
// config_str keys = yon_config_get_all_by_key(USERADD_SEARCH_macro,&size);
|
|
|
|
|
// int passw_size;
|
|
|
|
|
// config_str passwords = NULL;
|
|
|
|
|
// for (int i=0;i<size;i++){
|
|
|
|
|
// int parsed_size;
|
|
|
|
|
// char *key,*value;
|
|
|
|
|
// yon_config_parse_parameter(keys[i],&key,&value);
|
|
|
|
|
// config_str parsed = yon_char_parse(value,&parsed_size,":");
|
|
|
|
|
// if (parsed_size>5&&!yon_char_is_empty(parsed[5])){
|
|
|
|
|
// yon_char_parsed_add_or_create_if_exists(passwords,&passw_size,yon_char_new(parsed[5]));
|
|
|
|
|
// parsed = yon_char_parsed_rip(parsed,&parsed_size,5);
|
|
|
|
|
// char *final_string = yon_char_parsed_to_string_include_empty(parsed,parsed_size,":");
|
|
|
|
|
// char *temp = yon_char_append(final_string,":");
|
|
|
|
|
// free(final_string);
|
|
|
|
|
// final_string=temp;
|
|
|
|
|
// yon_config_set(key,final_string);
|
|
|
|
|
// }
|
|
|
|
|
// free(key);
|
|
|
|
|
// free(value);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
template_saving_window *window = yon_save_proceed("system",YON_CONFIG_LOCAL,config_get_command("system"),NULL);
|
|
|
|
|
if (window){
|
|
|
|
|
yon_hide_passwords(window);
|
|
|
|
|
}
|
|
|
|
|
// for (int i=0;i<size;i++){
|
|
|
|
|
// char *key,*value;
|
|
|
|
|
// yon_config_parse_parameter(keys[i],&key,&value);
|
|
|
|
|
// yon_config_set(key,value);
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_config_custom_save(GtkWidget *, main_window *){
|
|
|
|
|
|