Saving reworks beginning

pull/14/head
parent 22205c553b
commit d77641625c

@ -113,6 +113,13 @@ void on_about(GtkWidget *self, char *version_application){
}
//functions
void (*save_success_function)(void*)=NULL;
void *save_success_argument=NULL;
void yon_save_window_set_postsave_function(void *function, void *data){
save_success_function=function;
save_success_argument=data;
}
void on_save_window_parameter_switched(GtkCellRendererToggle *self, gchar *path, template_saving_window *window){
GtkTreeIter iter,itar;
@ -238,7 +245,6 @@ void on_save_parameters(GtkWidget *self, template_saving_window *window){
for_dictionaries(dict,final_remove){
char *final_command = yon_char_unite(remove_command," ",dict->key," ",(char*)dict->data,NULL);
system(final_command);
if (debug_output)
printf("%s\n",final_command);
free(final_command);
}
@ -247,7 +253,6 @@ void on_save_parameters(GtkWidget *self, template_saving_window *window){
for_dictionaries(dict,final_append){
char *final_command = yon_char_unite(append_command," ",dict->key," ",(char*)dict->data,NULL);
system(final_command);
if (debug_output)
printf("%s\n",final_command);
free(final_command);
}
@ -316,7 +321,7 @@ template_saving_window *yon_save_proceed(char *path,YON_CONFIG_TYPE type, ...){
loaded.dict = yon_dictionary_new();
dictionary *dct;
for_dictionaries(dct,section_commands){
char *command = yon_char_unite(ubconfig_load_command," ", config_to_save," get ", dct->key," ", yon_dictionary_get_data(dct,char*),NULL);
char *command = yon_char_unite(ubconfig_load_command_old," ", config_to_save," get ", dct->key," ", yon_dictionary_get_data(dct,char*),NULL);
FILE *output = popen(command, "r");
char **output_strings = NULL;
output_strings = malloc(sizeof(char*));
@ -717,8 +722,6 @@ int yon_ubl_setup_arguments(int argc, char *argv[],config_str *unfound_arguments
break;
case 'c': if (system(remove_config_dir_command)){};
break;
case 'd': debug_output = 1;
break;
case 1:
template_config->lock_help=1;
break;

@ -215,10 +215,10 @@ typedef struct {
char *action_text;
} dialog_confirmation_data;
static int debug_output;
int yon_confirmation_dialog_call(GtkWidget *self,dialog_confirmation_data *data);
void yon_save_window_set_postsave_function(void *function, void *data);
template_saving_window *yon_save_proceed(char *path,YON_CONFIG_TYPE type, ...);
/**yon_open_browser(GtkWidget *self, char *link)

Loading…
Cancel
Save