diff --git a/source/ubl-settings-system.c b/source/ubl-settings-system.c index a9ef47e..2cba00a 100644 --- a/source/ubl-settings-system.c +++ b/source/ubl-settings-system.c @@ -296,6 +296,13 @@ void yon_config_global_save(){ void yon_config_custom_save(){ template_saving_window *window = yon_save_proceed(NULL,YON_CONFIG_CUSTOM,config_get_command("system"),NULL); } + + void on_domain_address_save(GtkEntry *self){ + char *adress = (char*)gtk_entry_get_text(self); + if (!yon_char_is_empty(adress)){ + yon_config_register(DOMAIN,DOMAIN_get_command,adress); + } + } void yon_gtk_windget_set_sensitive_from_entry_emptiness(GtkEntry *self, GtkWidget *target){ if (yon_char_is_empty(gtk_entry_get_text(self))){ @@ -743,6 +750,8 @@ main_window *yon_main_window_complete(main_window *widgets){ g_signal_connect(G_OBJECT(widgets->DomainEntry),"icon-press",G_CALLBACK(on_main_window_domain_status_clicked),widgets); g_signal_connect(G_OBJECT(widgets->DomainEntry),"changed",G_CALLBACK(yon_gtk_windget_set_sensitive_from_entry_emptiness),widgets->DomainButton); + g_signal_connect(G_OBJECT(widgets->DomainEntry),"focus-out-event",G_CALLBACK(on_domain_address_save),NULL); + g_timeout_add(1000,(GSourceFunc)on_check_domain_connected,widgets); gtk_widget_set_size_request(widgets->Window,800,-1);