<property name="shadow_type">none</property>
<property name="margin-right">6</property>
<property name="margin-bottom">6</property>
- <signal name="size-allocate" handler="presets_frame_size_allocate_cb" swapped="no"/>
<child>
<object class="GtkScrolledWindow" id="presets_scroll">
<property name="visible">True</property>
if (gtk_tree_model_get_iter_first(store, &iter))
gtk_tree_selection_select_iter (selection, &iter);
}
+ // Make the selection visible in scroll window if it is not.
+ gtk_tree_view_scroll_to_cell(treeview, path, NULL, FALSE, 0, 0);
gtk_tree_path_free(path);
}
}
ghb_settings_set_boolean(ud->settings, "preset_modified", TRUE);
}
-G_MODULE_EXPORT void
-presets_frame_size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation, signal_user_data_t *ud)
-{
- GtkTreeView *treeview;
- GtkTreeSelection *selection;
- GtkTreeModel *store;
- GtkTreeIter iter;
-
- treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list"));
- selection = gtk_tree_view_get_selection(treeview);
- if (gtk_tree_selection_get_selected(selection, &store, &iter))
- {
- GtkTreePath *path;
- path = gtk_tree_model_get_path (store, &iter);
- // Make the parent visible in scroll window if it is not.
- gtk_tree_view_scroll_to_cell (treeview, path, NULL, FALSE, 0, 0);
- gtk_tree_path_free(path);
- }
-}
-
G_MODULE_EXPORT void
presets_default_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud)
{