|
|
|
@ -190,27 +190,6 @@ template_saving_window *yon_save_proceed(char *path,YON_CONFIG_TYPE type, ...){
|
|
|
|
struct loaded_config loaded;
|
|
|
|
struct loaded_config loaded;
|
|
|
|
loaded.dict = yon_dictionary_new();
|
|
|
|
loaded.dict = yon_dictionary_new();
|
|
|
|
dictionary *dct;
|
|
|
|
dictionary *dct;
|
|
|
|
// for_dictionaries(dct,section_commands){
|
|
|
|
|
|
|
|
// char *command = yon_char_unite(ubconfig_load_command," default get ", dct->key," ", yon_dictionary_get_data(dct,char*),NULL);
|
|
|
|
|
|
|
|
// FILE *output = popen(command, "r");
|
|
|
|
|
|
|
|
// char **output_strings = NULL;
|
|
|
|
|
|
|
|
// output_strings = malloc(sizeof(char*));
|
|
|
|
|
|
|
|
// int i = 0;
|
|
|
|
|
|
|
|
// char str[4096];
|
|
|
|
|
|
|
|
// memset(str, 0, 4096);
|
|
|
|
|
|
|
|
// while (fgets(str, 4096, output))
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// if (!yon_char_is_empty(str)&& strcmp(str,"(null)\n")!=0)
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// char *final_str = yon_char_new(str);
|
|
|
|
|
|
|
|
// char *key =yon_char_divide_search(final_str,"=",-1);
|
|
|
|
|
|
|
|
// if (final_str[strlen(final_str)-1]=='\n')final_str[strlen(final_str)-1]='\0';
|
|
|
|
|
|
|
|
// yon_dictionary_add_or_create_if_exists_with_data(loaded.dict,NULL,yon_char_new(dct->key));
|
|
|
|
|
|
|
|
// yon_dictionary_add_or_create_if_exists_with_data(loaded.dict,key,yon_char_new(final_str));
|
|
|
|
|
|
|
|
// yon_char_parsed_add_or_create_if_exists(config_compare,&compare_size,yon_char_new(str));
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
for_dictionaries(dct,section_commands){
|
|
|
|
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," ", config_to_save," get ", dct->key," ", yon_dictionary_get_data(dct,char*),NULL);
|
|
|
|
FILE *output = popen(command, "r");
|
|
|
|
FILE *output = popen(command, "r");
|
|
|
|
@ -288,7 +267,7 @@ template_saving_window *yon_save_proceed(char *path,YON_CONFIG_TYPE type, ...){
|
|
|
|
if(config_compare[j][strlen(config_compare[j])-1]=='\n') config_compare[j][strlen(config_compare[j])-1]='\0';
|
|
|
|
if(config_compare[j][strlen(config_compare[j])-1]=='\n') config_compare[j][strlen(config_compare[j])-1]='\0';
|
|
|
|
char *compare_value = yon_char_new(config_compare[j]);
|
|
|
|
char *compare_value = yon_char_new(config_compare[j]);
|
|
|
|
char *compare_name = yon_char_divide_search(compare_value,"=",-1);
|
|
|
|
char *compare_name = yon_char_divide_search(compare_value,"=",-1);
|
|
|
|
if (!strcmp(compare_name,compare_keys[i])){ //&&strcmp((char*)yon_dictionary_get(&loaded.dict,compare_name)->data,compare_value)
|
|
|
|
if (!strcmp(compare_name,compare_keys[i])){
|
|
|
|
char *cur_section = (char*)yon_dictionary_get(&loaded.dict->first,compare_keys[i])->prev->data;
|
|
|
|
char *cur_section = (char*)yon_dictionary_get(&loaded.dict->first,compare_keys[i])->prev->data;
|
|
|
|
gtk_list_store_set(window->list,&iter,2,compare_value,4,rgba_string,6,cur_section,-1);
|
|
|
|
gtk_list_store_set(window->list,&iter,2,compare_value,4,rgba_string,6,cur_section,-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -393,7 +372,6 @@ template_main_window *setup_window(){
|
|
|
|
widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL);
|
|
|
|
widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL);
|
|
|
|
|
|
|
|
|
|
|
|
gtk_window_set_icon_name(GTK_WINDOW(widgets->Window),yon_char_append("com.ublinux.",template_app_information.app_tech_name));
|
|
|
|
gtk_window_set_icon_name(GTK_WINDOW(widgets->Window),yon_char_append("com.ublinux.",template_app_information.app_tech_name));
|
|
|
|
// gtk_image_set_from_icon_name(widgets->HeadImage,)
|
|
|
|
|
|
|
|
gtk_image_set_from_pixbuf(GTK_IMAGE(HeadImage),gtk_icon_theme_load_icon_for_scale(gtk_icon_theme_get_default(),yon_char_append("com.ublinux.",template_app_information.app_tech_name),32,1,GTK_ICON_LOOKUP_FORCE_SIZE,NULL));
|
|
|
|
gtk_image_set_from_pixbuf(GTK_IMAGE(HeadImage),gtk_icon_theme_load_icon_for_scale(gtk_icon_theme_get_default(),yon_char_append("com.ublinux.",template_app_information.app_tech_name),32,1,GTK_ICON_LOOKUP_FORCE_SIZE,NULL));
|
|
|
|
gtk_image_set_from_pixbuf(GTK_IMAGE(HatIcon),gtk_icon_theme_load_icon_for_scale(gtk_icon_theme_get_default(),yon_char_append("com.ublinux.",template_app_information.app_tech_name),64,1,GTK_ICON_LOOKUP_FORCE_SIZE,NULL));
|
|
|
|
gtk_image_set_from_pixbuf(GTK_IMAGE(HatIcon),gtk_icon_theme_load_icon_for_scale(gtk_icon_theme_get_default(),yon_char_append("com.ublinux.",template_app_information.app_tech_name),64,1,GTK_ICON_LOOKUP_FORCE_SIZE,NULL));
|
|
|
|
gtk_window_set_title(GTK_WINDOW(widgets->Window),template_app_information.app_title);
|
|
|
|
gtk_window_set_title(GTK_WINDOW(widgets->Window),template_app_information.app_title);
|
|
|
|
|