Fixed filtering canceling while updating

pull/12/head
parent c5ebcbc846
commit f8ec5d9e6a

@ -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;
}

@ -1,4 +1,5 @@
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gtk/gtkx.h>
#include <locale.h>
#include <stdio.h>

Loading…
Cancel
Save