|
|
|
|
@ -197,27 +197,7 @@ void yon_load_proceed(YON_CONFIG_TYPE type){
|
|
|
|
|
} else if (type==YON_CONFIG_LOCAL){
|
|
|
|
|
yon_config_load_config(type,config_get_local_command,NULL);
|
|
|
|
|
} else if (type==YON_CONFIG_CUSTOM){
|
|
|
|
|
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);
|
|
|
|
|
textdomain(LocaleName);
|
|
|
|
|
gtk_window_set_icon_name(GTK_WINDOW(dialog),"com.ublinux.ubl-settings-services");
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(dialog),TITLE_LABEL);
|
|
|
|
|
GtkFileFilter *filter = gtk_file_filter_new();
|
|
|
|
|
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_widget_show(dialog);
|
|
|
|
|
int response = gtk_dialog_run(GTK_DIALOG(dialog));
|
|
|
|
|
if (response == GTK_RESPONSE_ACCEPT){
|
|
|
|
|
char *file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
|
|
|
|
|
if (!yon_char_is_empty(file)){
|
|
|
|
|
path=file;
|
|
|
|
|
}
|
|
|
|
|
gtk_widget_destroy(dialog);
|
|
|
|
|
} else {
|
|
|
|
|
gtk_widget_destroy(dialog);
|
|
|
|
|
}
|
|
|
|
|
char *path=yon_custom_config_init(GTK_FILE_CHOOSER_ACTION_OPEN);
|
|
|
|
|
char *command = yon_config_get_custom_command(path);
|
|
|
|
|
yon_config_load_config(type,command,NULL);
|
|
|
|
|
}
|
|
|
|
|
|