|
|
|
|
@ -194,47 +194,52 @@ void on_save_parameters(GtkWidget *self, template_saving_window *window){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (debug_output==1){
|
|
|
|
|
template_debug_window *debug_window = template_debugger_window_new();
|
|
|
|
|
gtk_widget_show(debug_window->Window);
|
|
|
|
|
dictionary *dict = NULL;
|
|
|
|
|
char *final_command_line = "";
|
|
|
|
|
if (final_remove){
|
|
|
|
|
for_dictionaries(dict,final_remove){
|
|
|
|
|
char *final_command = yon_char_unite(remove_command," ",dict->key," ",(char*)dict->data,NULL);
|
|
|
|
|
char *temp = yon_char_unite(final_command_line,!yon_char_is_empty(final_command_line)?";echo \'":"echo \'",final_command,"\';",final_command,NULL);
|
|
|
|
|
if (!yon_char_is_empty(final_command_line))
|
|
|
|
|
free(final_command_line);
|
|
|
|
|
final_command_line=temp;
|
|
|
|
|
free(final_command);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (final_append){
|
|
|
|
|
for_dictionaries(dict,final_append){
|
|
|
|
|
char *final_command = yon_char_unite(append_command," ",dict->key," ",(char*)dict->data,NULL);
|
|
|
|
|
char *temp = yon_char_unite(final_command_line,!yon_char_is_empty(final_command_line)?";echo \'":"echo \'",final_command,"\';",final_command,NULL);
|
|
|
|
|
if (!yon_char_is_empty(final_command_line))
|
|
|
|
|
free(final_command_line);
|
|
|
|
|
final_command_line=temp;
|
|
|
|
|
free(final_command);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (window->type==YON_CONFIG_BOTH) {
|
|
|
|
|
if (template_config->load_mode==1){
|
|
|
|
|
yon_config_save_registered("system");
|
|
|
|
|
} else if (template_config->load_mode==0){
|
|
|
|
|
yon_config_save_registered("global");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!yon_char_is_empty(final_command_line)){
|
|
|
|
|
yon_terminal_integrated_start(debug_window->Vte,final_command_line,NULL,NULL);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
// if (debug_output==1){
|
|
|
|
|
// template_debug_window *debug_window = template_debugger_window_new();
|
|
|
|
|
// gtk_widget_show(debug_window->Window);
|
|
|
|
|
// dictionary *dict = NULL;
|
|
|
|
|
// char *final_command_line = "";
|
|
|
|
|
// if (final_remove){
|
|
|
|
|
// for_dictionaries(dict,final_remove){
|
|
|
|
|
// char *final_command = yon_char_unite(remove_command," ",dict->key," ",(char*)dict->data,NULL);
|
|
|
|
|
// char *temp = yon_char_unite(final_command_line,!yon_char_is_empty(final_command_line)?";echo \"":"echo \"",final_command,"\";",final_command,NULL);
|
|
|
|
|
// if (!yon_char_is_empty(final_command_line))
|
|
|
|
|
// free(final_command_line);
|
|
|
|
|
// final_command_line=temp;
|
|
|
|
|
// free(final_command);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if (final_append){
|
|
|
|
|
// for_dictionaries(dict,final_append){
|
|
|
|
|
// char *final_command = yon_char_unite(append_command," ",dict->key," ",(char*)dict->data,NULL);
|
|
|
|
|
// char *temp = yon_char_unite(final_command_line,!yon_char_is_empty(final_command_line)?";echo \"":"echo \"",final_command,"\";",final_command,NULL);
|
|
|
|
|
// if (!yon_char_is_empty(final_command_line))
|
|
|
|
|
// free(final_command_line);
|
|
|
|
|
// final_command_line=temp;
|
|
|
|
|
// free(final_command);
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if (window->type==YON_CONFIG_BOTH) {
|
|
|
|
|
// if (template_config->load_mode==1){
|
|
|
|
|
// yon_config_save_registered("system");
|
|
|
|
|
// } else if (template_config->load_mode==0){
|
|
|
|
|
// yon_config_save_registered("global");
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if (!yon_char_is_empty(final_command_line)){
|
|
|
|
|
// if (debug_output)
|
|
|
|
|
// printf("%s\n",final_command_line);
|
|
|
|
|
// yon_terminal_integrated_start(debug_window->Vte,final_command_line,NULL,NULL);
|
|
|
|
|
// }
|
|
|
|
|
// } else
|
|
|
|
|
{
|
|
|
|
|
dictionary *dict = NULL;
|
|
|
|
|
if (final_remove){
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -242,6 +247,8 @@ 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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|