/**
* gtk_scrolled_window_new:
- * @hadjustment: horizontal adjustment
- * @vadjustment: vertical adjustment
- *
- * Creates a new scrolled window.
+ * @hadjustment: (allow-none): horizontal adjustment
+ * @vadjustment: (allow-none): vertical adjustment
+ *
+ * Creates a new scrolled window.
*
- * The two arguments are the scrolled window's adjustments; these will be
+ * The two arguments are the scrolled window's adjustments; these will be
* shared with the scrollbars and the child widget to keep the bars in sync
* with the child. Usually you want to pass %NULL for the adjustments, which
* will cause the scrolled window to create them for you.
if (scrolled_window->hscrollbar)
{
+ g_signal_handlers_disconnect_by_func (gtk_range_get_adjustment (GTK_RANGE (scrolled_window->hscrollbar)),
+ gtk_scrolled_window_adjustment_changed,
+ scrolled_window);
gtk_widget_unparent (scrolled_window->hscrollbar);
gtk_widget_destroy (scrolled_window->hscrollbar);
g_object_unref (scrolled_window->hscrollbar);
}
if (scrolled_window->vscrollbar)
{
+ g_signal_handlers_disconnect_by_func (gtk_range_get_adjustment (GTK_RANGE (scrolled_window->vscrollbar)),
+ gtk_scrolled_window_adjustment_changed,
+ scrolled_window);
gtk_widget_unparent (scrolled_window->vscrollbar);
gtk_widget_destroy (scrolled_window->vscrollbar);
g_object_unref (scrolled_window->vscrollbar);
* a flag, then propagating the focus motion to the notebook.
*/
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (scrolled_window));
- if (!GTK_WIDGET_TOPLEVEL (toplevel))
+ if (!gtk_widget_is_toplevel (toplevel))
return;
g_object_ref (scrolled_window);