|
|
|
|
@ -30,6 +30,14 @@ void on_save_done(main_window *widgets, config_str output, int size){
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_config_reload(GtkWidget *,main_window *widgets){
|
|
|
|
|
if (main_config.load_mode==0){
|
|
|
|
|
yon_config_global_load(NULL,widgets);
|
|
|
|
|
} else if (main_config.load_mode==1){
|
|
|
|
|
yon_config_local_load(NULL,widgets);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int yon_load_proceed(YON_CONFIG_TYPE type){
|
|
|
|
|
if (type!=YON_CONFIG_CUSTOM){
|
|
|
|
|
yon_config_clean();
|
|
|
|
|
@ -163,13 +171,21 @@ void yon_interface_update(main_window *widgets){
|
|
|
|
|
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->languagelist),&iter);
|
|
|
|
|
for(;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->languagelist),&iter)){
|
|
|
|
|
gtk_tree_model_get(GTK_TREE_MODEL(widgets->languagelist),&iter,0,&loc_name,1,&code,2,&is_active,-1);
|
|
|
|
|
if (code&&!strcmp(code,lang)) gtk_combo_box_set_active_iter(GTK_COMBO_BOX(widgets->LanguageCombo),&iter);
|
|
|
|
|
if (avlocale)
|
|
|
|
|
for (int i=0;i<locsize;i++)
|
|
|
|
|
if (avlocale){
|
|
|
|
|
for (int i=0;i<locsize;i++){
|
|
|
|
|
if (!strcmp(code,locale_parsed[i])) {
|
|
|
|
|
gtk_list_store_set(widgets->languagelist,&iter,2,1,-1);
|
|
|
|
|
locale_string = yon_char_unite(strcmp(locale_string,"") ? yon_char_append(locale_string,"; ") : locale_string, loc_name,NULL);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (code&&!strcmp(code,lang)) {
|
|
|
|
|
GtkTreeIter filter_iter;
|
|
|
|
|
gtk_tree_model_filter_refilter(GTK_TREE_MODEL_FILTER(main_config.localefilter));
|
|
|
|
|
while(gtk_events_pending()) gtk_main_iteration();
|
|
|
|
|
gtk_tree_model_filter_convert_child_iter_to_iter(GTK_TREE_MODEL_FILTER(main_config.localefilter),&filter_iter,&iter);
|
|
|
|
|
gtk_combo_box_set_active_iter(GTK_COMBO_BOX(widgets->LanguageCombo),&filter_iter);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (strcmp(locale_string,"")) gtk_entry_set_text(GTK_ENTRY(widgets->LocaleEntry),locale_string);
|
|
|
|
|
}
|
|
|
|
|
@ -458,6 +474,7 @@ void on_domain_connect(GtkWidget *self, dictionary *dict){
|
|
|
|
|
gtk_widget_destroy(window->Window);
|
|
|
|
|
free(window);
|
|
|
|
|
|
|
|
|
|
on_config_reload(NULL,widgets);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_status_clicked(GtkWidget *self, connection_window *window){
|
|
|
|
|
@ -576,6 +593,7 @@ void on_domain_disconnect(GtkWidget *self, dictionary *dict){
|
|
|
|
|
gtk_widget_show(dialog->Window);
|
|
|
|
|
gtk_widget_destroy(window->Window);
|
|
|
|
|
free(window);
|
|
|
|
|
on_config_reload(NULL,widgets);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
domain_window *yon_domain_window_new(){
|
|
|
|
|
|