|
|
|
|
@ -43,7 +43,7 @@ void yon_config_local_load(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->LocaleEntry),DEFAULT_LABEL);
|
|
|
|
|
int size;
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
config_str rtn = yon_config_load(get_id_command,&size);
|
|
|
|
|
config_str rtn = yon_file_open(get_id_command,&size);
|
|
|
|
|
rtn[0]=yon_char_divide_search(rtn[0],"\n",-1);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->IDEntry),*rtn);
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ConsoleFontCombo),0);
|
|
|
|
|
@ -117,7 +117,7 @@ void yon_config_global_load(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->LocaleEntry),DEFAULT_LABEL);
|
|
|
|
|
int size;
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
config_str rtn = yon_config_load(get_id_command,&size);
|
|
|
|
|
config_str rtn = yon_file_open(get_id_command,&size);
|
|
|
|
|
rtn[0]=yon_char_divide_search(rtn[0],"\n",-1);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->IDEntry),*rtn);
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ConsoleFontCombo),0);
|
|
|
|
|
@ -203,7 +203,7 @@ void yon_config_custom_load(GtkWidget *self, main_window *widgets){
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->LocaleEntry),DEFAULT_LABEL);
|
|
|
|
|
int size;
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
config_str rtn = yon_config_load(get_id_command,&size);
|
|
|
|
|
config_str rtn = yon_file_open(get_id_command,&size);
|
|
|
|
|
rtn[0]=yon_char_divide_search(rtn[0],"\n",-1);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->IDEntry),*rtn);
|
|
|
|
|
gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ConsoleFontCombo),0);
|
|
|
|
|
@ -497,10 +497,12 @@ void on_domain_connect(GtkWidget *self, dictionary *dict){
|
|
|
|
|
yon_terminal_integrated_start(dialog->ExecuteTerminal,domain_connect_command(adress,login,password,final),NULL,NULL);
|
|
|
|
|
if (main_config.debug_mode){
|
|
|
|
|
printf("%s\n",domain_connect_command(adress,login,password,final));
|
|
|
|
|
int size_;
|
|
|
|
|
config_str test = yon_config_load(domain_connect_command(adress,login,password,final),&size_);
|
|
|
|
|
printf("%s\n",yon_char_parsed_to_string(test,size_,"\n"));
|
|
|
|
|
}
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->DomainEntry),adress);
|
|
|
|
|
gtk_widget_show(dialog->Window);
|
|
|
|
|
on_subwindow_close(window->Window);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_status_clicked(GtkWidget *self, connection_window *window){
|
|
|
|
|
@ -510,6 +512,9 @@ void on_status_clicked(GtkWidget *self, connection_window *window){
|
|
|
|
|
yon_terminal_integrated_start(dialog->ExecuteTerminal,domain_info(target),NULL,NULL);
|
|
|
|
|
if (main_config.debug_mode){
|
|
|
|
|
printf("%s\n",domain_info(target));
|
|
|
|
|
int size_;
|
|
|
|
|
config_str test = yon_config_load(domain_info(target),&size_);
|
|
|
|
|
printf("%s\n",yon_char_parsed_to_string(test,size_,"\n"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
gtk_widget_show(dialog->Window);
|
|
|
|
|
@ -520,6 +525,9 @@ void on_find_domains_clicked(GtkWidget *self, connection_window *window){
|
|
|
|
|
yon_terminal_integrated_start(dialog->ExecuteTerminal,domains_seek_command,NULL,NULL);
|
|
|
|
|
if (main_config.debug_mode){
|
|
|
|
|
printf("%s\n",domains_seek_command);
|
|
|
|
|
int size_;
|
|
|
|
|
config_str test = yon_config_load(domains_seek_command,&size_);
|
|
|
|
|
printf("%s\n",yon_char_parsed_to_string(test,size_,"\n"));
|
|
|
|
|
}
|
|
|
|
|
gtk_widget_show(dialog->Window);
|
|
|
|
|
}
|
|
|
|
|
@ -534,6 +542,9 @@ void on_main_window_domain_status_clicked(GtkWidget *self, GtkEntryIconPosition
|
|
|
|
|
yon_terminal_integrated_start(window->ExecuteTerminal,get_domain_info_command,NULL,NULL);
|
|
|
|
|
if (main_config.debug_mode){
|
|
|
|
|
printf("%s\n",get_domain_info_command);
|
|
|
|
|
int size_;
|
|
|
|
|
config_str test = yon_config_load(get_domain_info_command,&size_);
|
|
|
|
|
printf("%s\n",yon_char_parsed_to_string(test,size_,"\n"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -581,7 +592,7 @@ connection_window *yon_connection_window_new(){
|
|
|
|
|
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->StatusEntry),"clicked",G_CALLBACK(on_status_clicked),window);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->FindEntry),"clicked",G_CALLBACK(on_find_domains_clicked),window);
|
|
|
|
|
window->timer_id = g_timeout_add(1000,(GSourceFunc)on_main_window_domain_status_update,window);
|
|
|
|
|
window->timer_id = g_timeout_add(1000,(GSourceFunc)yon_update_thread,window);
|
|
|
|
|
|
|
|
|
|
return window;
|
|
|
|
|
}
|
|
|
|
|
@ -604,6 +615,9 @@ void on_domain_disconnect(GtkWidget *self, dictionary *dict){
|
|
|
|
|
yon_terminal_integrated_start(dialog->ExecuteTerminal,domain_disconnect_command(adress,login,password),NULL,NULL);
|
|
|
|
|
if (main_config.debug_mode){
|
|
|
|
|
printf("%s\n",domain_disconnect_command(adress,login,password));
|
|
|
|
|
int size_;
|
|
|
|
|
config_str test = yon_config_load(domain_disconnect_command(adress,login,password),&size_);
|
|
|
|
|
printf("%s\n",yon_char_parsed_to_string(test,size_,"\n"));
|
|
|
|
|
}
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->DomainEntry),adress);
|
|
|
|
|
on_subwindow_close(window->Window);
|
|
|
|
|
@ -773,7 +787,7 @@ main_window *yon_main_window_complete(main_window *widgets){
|
|
|
|
|
|
|
|
|
|
main_config.localeslist = gtk_list_store_new(3,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_BOOLEAN);
|
|
|
|
|
int size;
|
|
|
|
|
config_str locales = yon_config_load(get_locales_command,&size);
|
|
|
|
|
config_str locales = yon_file_open(get_locales_command,&size);
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
for (int i=0;i<size;i++){
|
|
|
|
|
int locsize;
|
|
|
|
|
@ -782,7 +796,7 @@ main_window *yon_main_window_complete(main_window *widgets){
|
|
|
|
|
gtk_list_store_append(widgets->languagelist,&iter);
|
|
|
|
|
gtk_list_store_set(widgets->languagelist,&iter,0,_(loc_parsed[1]),1,loc_parsed[0],2,0,-1);
|
|
|
|
|
}
|
|
|
|
|
config_str fonts = yon_config_load(get_fonts_command,&size);
|
|
|
|
|
config_str fonts = yon_file_open(get_fonts_command,&size);
|
|
|
|
|
for (int i=0;i<size;i++){
|
|
|
|
|
fonts[i]=yon_char_divide_search(fonts[i],"\n",-1);
|
|
|
|
|
gtk_list_store_append(widgets->fontlist,&iter);
|
|
|
|
|
|