|
|
|
|
@ -36,6 +36,7 @@ void on_config_reload(GtkWidget *,main_window *widgets){
|
|
|
|
|
} else if (main_config.load_mode==1){
|
|
|
|
|
yon_config_local_load(NULL,widgets);
|
|
|
|
|
}
|
|
|
|
|
yon_interface_update(widgets);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int yon_load_proceed(YON_CONFIG_TYPE type){
|
|
|
|
|
@ -122,6 +123,7 @@ void yon_interface_update(main_window *widgets){
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->HostnameEntry),"");
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->IDEntry),"");
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->LocaleEntry),DEFAULT_LABEL);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->DomainEntry),"");
|
|
|
|
|
int size;
|
|
|
|
|
GtkTreeIter iter;
|
|
|
|
|
config_str rtn = yon_file_open(get_id_command,&size);
|
|
|
|
|
@ -150,6 +152,11 @@ void yon_interface_update(main_window *widgets){
|
|
|
|
|
gtk_widget_set_sensitive(widgets->IDEntry,0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char *domain = config(DOMAIN);
|
|
|
|
|
if (!yon_char_is_empty(domain)){
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->DomainEntry),domain);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
char *code;
|
|
|
|
|
char *cons_font = yon_config_get_by_key(console_font_parameter);
|
|
|
|
|
if (cons_font){
|
|
|
|
|
@ -414,9 +421,12 @@ void on_language_changed(GtkComboBox *self, main_window *widgets){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void on_terminal_done(VteTerminal *terminal, gint status, GtkWidget *window){
|
|
|
|
|
if (!status){
|
|
|
|
|
gtk_widget_destroy(window);
|
|
|
|
|
void on_terminal_done(VteTerminal *terminal, gint status, dictionary *dict){
|
|
|
|
|
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
|
|
|
|
|
GtkWidget *window = yon_dictionary_get_data(dict->first->next,GtkWidget*);
|
|
|
|
|
if (!status){
|
|
|
|
|
gtk_widget_destroy(window);
|
|
|
|
|
on_config_reload(NULL,widgets);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -472,7 +482,10 @@ void on_domain_connect(GtkWidget *self, dictionary *dict){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(dialog->HeadLabel),DOMAIN_CONNECTING_LABEL);
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(dialog->Window),DOMAIN_CONNECTING_LABEL);
|
|
|
|
|
yon_terminal_integrated_start(dialog->ExecuteTerminal,domain_connect_command(adress,login,password,final));
|
|
|
|
|
g_signal_connect(G_OBJECT(dialog->ExecuteTerminal),"child-exited",G_CALLBACK(on_terminal_done),window->Window);
|
|
|
|
|
dictionary *dc = NULL;
|
|
|
|
|
yon_dictionary_add_or_create_if_exists_with_data(dc,"widgets",widgets);
|
|
|
|
|
yon_dictionary_add_or_create_if_exists_with_data(dc,"window",window->Window);
|
|
|
|
|
g_signal_connect(G_OBJECT(dialog->ExecuteTerminal),"child-exited",G_CALLBACK(on_terminal_done),dc);
|
|
|
|
|
gtk_widget_show(dialog->Window);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->DomainEntry),adress);
|
|
|
|
|
|
|
|
|
|
@ -591,10 +604,12 @@ void on_domain_disconnect(GtkWidget *self, dictionary *dict){
|
|
|
|
|
gtk_label_set_text(GTK_LABEL(dialog->HeadLabel),DISCONNECTION_LABEL);
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(dialog->Window),DISCONNECTION_LABEL);
|
|
|
|
|
yon_terminal_integrated_start(dialog->ExecuteTerminal,domain_disconnect_command(adress,login,password));
|
|
|
|
|
g_signal_connect(G_OBJECT(dialog->ExecuteTerminal),"child-exited",G_CALLBACK(on_terminal_done),window->Window);
|
|
|
|
|
dictionary *dc = NULL;
|
|
|
|
|
yon_dictionary_add_or_create_if_exists_with_data(dc,"widgets",widgets);
|
|
|
|
|
yon_dictionary_add_or_create_if_exists_with_data(dc,"window",window->Window);
|
|
|
|
|
g_signal_connect(G_OBJECT(dialog->ExecuteTerminal),"child-exited",G_CALLBACK(on_terminal_done),dc);
|
|
|
|
|
gtk_entry_set_text(GTK_ENTRY(widgets->DomainEntry),adress);
|
|
|
|
|
gtk_widget_show(dialog->Window);
|
|
|
|
|
on_config_reload(NULL,widgets);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
domain_window *yon_domain_window_new(){
|
|
|
|
|
|