diff --git a/source/ubinstall-gtk-advanced.c b/source/ubinstall-gtk-advanced.c index 99931b8..745d95c 100644 --- a/source/ubinstall-gtk-advanced.c +++ b/source/ubinstall-gtk-advanced.c @@ -731,6 +731,7 @@ void on_format_changed(GtkWidget *self, advanced_partition *part){ advanced_partition *yon_advanced_partition_new(){ advanced_partition *part = new(advanced_partition); GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_advanced_part); + yon_scroll_block_for_builder(builder); part->MainBox = yon_gtk_builder_get_widget(builder,"MainBox"); part->SectionLabel = yon_gtk_builder_get_widget(builder,"SectionLabel"); part->SystemSectionToggle = yon_gtk_builder_get_widget(builder,"SystemSectionToggle"); diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 8158699..ba19509 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -288,9 +288,21 @@ void yon_licence_load(main_window *widgets){ } } +void yon_scroll_block_for_builder(GtkBuilder *builder){ + GSList *list = gtk_builder_get_objects(builder); + GSList *iter; + for (iter = list; iter; iter=iter->next){ + if (GTK_IS_COMBO_BOX(iter->data)||GTK_IS_SPIN_BUTTON(iter->data)){ + yon_gtk_combo_box_block_scroll((GtkComboBox*)iter->data); + } + } + g_slist_free(list); +} + void yon_main_window_create(main_window *widgets){ __attribute__((unused)) char *locale = setlocale(LC_ALL, "en_US.UTF-8"); - GtkBuilder *builder = gtk_builder_new_from_resource(glade_path); + GtkBuilder *builder = gtk_builder_new_from_resource(glade_path); + yon_scroll_block_for_builder(builder); yon_translation_init(builder); gtk_builder_add_callback_symbol(builder,"yon_gtk_widget_set_sensitive_from_toggle_button",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button)); gtk_builder_add_callback_symbol(builder,"on_toggle_button_switch_on",G_CALLBACK(on_toggle_button_switch_on)); diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index 8b19523..c2e19b2 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -1525,4 +1525,5 @@ int yon_os_components_check_packages_size(GtkWidget *, main_window *widgets); void on_pacman_search_enter(GtkEntry *self, main_window *widgets); gboolean yon_log_scroll(log_window *window); gboolean on_log_window_exit(GtkWidget *,GdkEvent*, log_window *window); -void yon_modules_missed_func(main_window *widgets); \ No newline at end of file +void yon_modules_missed_func(main_window *widgets); +void yon_scroll_block_for_builder(GtkBuilder *builder); \ No newline at end of file