diff --git a/source/ubl-settings-services.c b/source/ubl-settings-services.c index 50a3d17..c12d032 100644 --- a/source/ubl-settings-services.c +++ b/source/ubl-settings-services.c @@ -15,6 +15,13 @@ void on_config_local_load(GtkWidget *self,main_window *widgets){ if (!main_config.update_thread_active){ main_config.update_thread_active=1; if (self){}; + g_signal_handlers_block_by_func(G_OBJECT(widgets->ServiceTypeCombo),on_type_changed,widgets); + g_signal_handlers_block_by_func(G_OBJECT(widgets->ServiceSourceCombo),on_source_changed,widgets); + gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ServiceTypeCombo),0); + gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ServiceSourceCombo),0); + + g_signal_handlers_unblock_by_func(G_OBJECT(widgets->ServiceTypeCombo),on_type_changed,widgets); + g_signal_handlers_unblock_by_func(G_OBJECT(widgets->ServiceSourceCombo),on_source_changed,widgets); yon_load_proceed(YON_CONFIG_LOCAL); yon_ubl_status_box_render(LIST_LOAD_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); g_thread_new("",(GThreadFunc)yon_interface_update,widgets); @@ -26,6 +33,13 @@ void on_config_global_load(GtkWidget *self,main_window *widgets){ if (!main_config.update_thread_active){ main_config.update_thread_active=1; if (self){}; + g_signal_handlers_block_by_func(G_OBJECT(widgets->ServiceTypeCombo),on_type_changed,widgets); + g_signal_handlers_block_by_func(G_OBJECT(widgets->ServiceSourceCombo),on_source_changed,widgets); + gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ServiceTypeCombo),0); + gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ServiceSourceCombo),0); + + g_signal_handlers_unblock_by_func(G_OBJECT(widgets->ServiceTypeCombo),on_type_changed,widgets); + g_signal_handlers_unblock_by_func(G_OBJECT(widgets->ServiceSourceCombo),on_source_changed,widgets); yon_load_proceed(YON_CONFIG_GLOBAL); yon_ubl_status_box_render(LIST_LOAD_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE); g_thread_new("",(GThreadFunc)yon_interface_update,widgets); @@ -480,7 +494,6 @@ void *yon_interface_update(main_window *widgets){ } if (!(type_active=gtk_combo_box_get_active(GTK_COMBO_BOX(widgets->ServiceTypeCombo)))){ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->ServiceTypeCombo),type_active); } - // gdk_threads_add_idle() return NULL; } diff --git a/source/ubl-settings-services.h b/source/ubl-settings-services.h index 77313df..f0801d7 100644 --- a/source/ubl-settings-services.h +++ b/source/ubl-settings-services.h @@ -1,4 +1,5 @@ #include +#include #include #include #include