From e548b027d4f520dc95b74e76171a8ebadbd4f05f Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 23 Apr 2024 13:35:24 +0600 Subject: [PATCH 1/4] Fixed unchecking status of domain at startup --- source/ubl-settings-system.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/ubl-settings-system.c b/source/ubl-settings-system.c index a0dcb41..6b2d56d 100644 --- a/source/ubl-settings-system.c +++ b/source/ubl-settings-system.c @@ -747,6 +747,7 @@ main_window *yon_main_window_complete(main_window *widgets){ gtk_widget_set_size_request(widgets->Window,800,440); // g_timeout_add(1000,(GSourceFunc)on_check_domain_connected,widgets); + on_check_domain_connected(NULL, widgets); main_config.localeslist = gtk_list_store_new(3,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_BOOLEAN); int size; From 639dc122b0ade0174225a03710ae6860f431c8ce Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 23 Apr 2024 14:28:41 +0600 Subject: [PATCH 2/4] Fixed update thread --- source/ubl-settings-system.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/ubl-settings-system.c b/source/ubl-settings-system.c index 6b2d56d..18b926b 100644 --- a/source/ubl-settings-system.c +++ b/source/ubl-settings-system.c @@ -534,7 +534,7 @@ gboolean on_main_window_domain_status_update(connection_window *window){ return 1; } -gboolean yon_update_thread(connection_window *window){ +gboolean yon_update_thread(GtkWidget *self, GdkEvent *event, connection_window *window){ pthread_t thread_id; pthread_create(&thread_id, NULL, (void *)on_main_window_domain_status_update,window); return 1; @@ -561,7 +561,8 @@ 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)yon_update_thread,window); + g_signal_connect(G_OBJECT(window->AdressEntry),"focus-out",G_CALLBACK(yon_update_thread),window); + yon_update_thread(NULL,NULL,window); return window; } @@ -748,7 +749,7 @@ main_window *yon_main_window_complete(main_window *widgets){ // g_timeout_add(1000,(GSourceFunc)on_check_domain_connected,widgets); on_check_domain_connected(NULL, widgets); - + main_config.localeslist = gtk_list_store_new(3,G_TYPE_STRING,G_TYPE_STRING,G_TYPE_BOOLEAN); int size; config_str locales = yon_file_open(get_locales_command,&size); From 5433bdc1fd4ffb352c8775958818fb42ec94dd0e Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 23 Apr 2024 14:31:29 +0600 Subject: [PATCH 3/4] Fixed update thread --- source/ubl-settings-system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ubl-settings-system.c b/source/ubl-settings-system.c index 18b926b..ec356ce 100644 --- a/source/ubl-settings-system.c +++ b/source/ubl-settings-system.c @@ -561,7 +561,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); - g_signal_connect(G_OBJECT(window->AdressEntry),"focus-out",G_CALLBACK(yon_update_thread),window); + g_signal_connect(G_OBJECT(window->AdressEntry),"focus-out-event",G_CALLBACK(yon_update_thread),window); yon_update_thread(NULL,NULL,window); return window; From 7922a0fe7a1d61ecd8aa336b82f0885d0270e147 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Tue, 23 Apr 2024 14:34:01 +0600 Subject: [PATCH 4/4] Fixed update thread --- source/ubl-settings-system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ubl-settings-system.c b/source/ubl-settings-system.c index ec356ce..047ac4c 100644 --- a/source/ubl-settings-system.c +++ b/source/ubl-settings-system.c @@ -531,7 +531,7 @@ gboolean on_main_window_domain_status_update(connection_window *window){ } else { gtk_entry_set_icon_from_icon_name(GTK_ENTRY(window->AdressEntry),GTK_ENTRY_ICON_SECONDARY,domain_disconnected_icon); } - return 1; + return GDK_EVENT_PROPAGATE; } gboolean yon_update_thread(GtkWidget *self, GdkEvent *event, connection_window *window){