pull/28/head
parent d0e1890e2b
commit 7a91409466

@ -14,9 +14,12 @@ void yon_load_proceed(YON_CONFIG_TYPE type){
yon_config_load_config(type,config_get_local_command,NULL); yon_config_load_config(type,config_get_local_command,NULL);
} else if (type==YON_CONFIG_CUSTOM){ } else if (type==YON_CONFIG_CUSTOM){
char *path=""; char *path="";
textdomain(template_ui_LocaleName);
GtkWidget *dialog = gtk_file_chooser_dialog_new(template_app_information.app_title,NULL,GTK_FILE_CHOOSER_ACTION_SAVE,CANCEL_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL); GtkWidget *dialog = gtk_file_chooser_dialog_new(template_app_information.app_title,NULL,GTK_FILE_CHOOSER_ACTION_SAVE,CANCEL_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL);
textdomain(LocaleName);
GtkFileFilter *filter = gtk_file_filter_new(); GtkFileFilter *filter = gtk_file_filter_new();
gtk_file_filter_add_pattern(filter,"*.ini"); gtk_file_filter_add_pattern(filter,"*.ini");
gtk_file_filter_set_name(filter, "*.ini");
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog),filter); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog),filter);
gtk_widget_show(dialog); gtk_widget_show(dialog);
int response = gtk_dialog_run(GTK_DIALOG(dialog)); int response = gtk_dialog_run(GTK_DIALOG(dialog));
@ -186,7 +189,6 @@ void on_config_autostart_clicked(GtkWidget *self, main_window *widgets){
if (parsed) if (parsed)
yon_config_set("SERVICES_ENABLE",yon_char_parsed_to_string(parsed,size,",")); yon_config_set("SERVICES_ENABLE",yon_char_parsed_to_string(parsed,size,","));
else yon_config_remove_by_key("SERVICES_ENABLE"); else yon_config_remove_by_key("SERVICES_ENABLE");
yon_char_parsed_free(parsed,size);
} }
} }
} else { } else {
@ -195,7 +197,6 @@ void on_config_autostart_clicked(GtkWidget *self, main_window *widgets){
if (parsed) if (parsed)
yon_config_set("SERVICES_ENABLE",yon_char_parsed_to_string(parsed,size,",")); yon_config_set("SERVICES_ENABLE",yon_char_parsed_to_string(parsed,size,","));
else yon_config_remove_by_key("SERVICES_ENABLE"); else yon_config_remove_by_key("SERVICES_ENABLE");
yon_char_parsed_free(parsed,size);
} }
} }
yon_char_parsed_free(parsed,size); yon_char_parsed_free(parsed,size);
@ -243,7 +244,6 @@ void on_config_autostop_clicked(GtkWidget *self, main_window *widgets){
if (parsed) if (parsed)
yon_config_set("SERVICES_DISABLE",yon_char_parsed_to_string(parsed,size,",")); yon_config_set("SERVICES_DISABLE",yon_char_parsed_to_string(parsed,size,","));
else yon_config_remove_by_key("SERVICES_DISABLE"); else yon_config_remove_by_key("SERVICES_DISABLE");
yon_char_parsed_free(parsed,size);
} }
} }
} else { } else {
@ -252,7 +252,6 @@ void on_config_autostop_clicked(GtkWidget *self, main_window *widgets){
if (parsed) if (parsed)
yon_config_set("SERVICES_DISABLE",yon_char_parsed_to_string(parsed,size,",")); yon_config_set("SERVICES_DISABLE",yon_char_parsed_to_string(parsed,size,","));
else yon_config_remove_by_key("SERVICES_DISABLE"); else yon_config_remove_by_key("SERVICES_DISABLE");
yon_char_parsed_free(parsed,size);
} }
} }
yon_char_parsed_free(parsed,size); yon_char_parsed_free(parsed,size);
@ -301,7 +300,6 @@ void on_config_block_clicked(GtkWidget *self, main_window *widgets){
if (parsed) if (parsed)
yon_config_set("SERVICES_MASK",yon_char_parsed_to_string(parsed,size,",")); yon_config_set("SERVICES_MASK",yon_char_parsed_to_string(parsed,size,","));
else yon_config_remove_by_key("SERVICES_MASK"); else yon_config_remove_by_key("SERVICES_MASK");
yon_char_parsed_free(parsed,size);
} }
} }
} else { } else {
@ -310,7 +308,6 @@ void on_config_block_clicked(GtkWidget *self, main_window *widgets){
if (parsed) if (parsed)
yon_config_set("SERVICES_MASK",yon_char_parsed_to_string(parsed,size,",")); yon_config_set("SERVICES_MASK",yon_char_parsed_to_string(parsed,size,","));
else yon_config_remove_by_key("SERVICES_MASK"); else yon_config_remove_by_key("SERVICES_MASK");
yon_char_parsed_free(parsed,size);
} }
} }
yon_char_parsed_free(parsed,size); yon_char_parsed_free(parsed,size);

Loading…
Cancel
Save