[gtk+/wip/otte/gtk4: 76/127] scrolledwindow: Remove _add_with_viewport
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/gtk4: 76/127] scrolledwindow: Remove _add_with_viewport
- Date: Sat, 8 Oct 2016 03:39:08 +0000 (UTC)
commit 310cf94b37fa8d17a15406fa610a47d0a400a410
Author: Timm Bäder <mail baedert org>
Date: Tue Oct 4 16:33:05 2016 +0200
scrolledwindow: Remove _add_with_viewport
Replaced by a normal gtk_container_add
docs/reference/gtk/gtk3-sections.txt | 1 -
gtk/gtkscrolledwindow.c | 63 ----------------------------------
gtk/gtkscrolledwindow.h | 3 --
3 files changed, 0 insertions(+), 67 deletions(-)
---
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index 2dc4571..3da8927 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -2944,7 +2944,6 @@ gtk_scrolled_window_get_hscrollbar
gtk_scrolled_window_get_vscrollbar
GtkPolicyType
gtk_scrolled_window_set_policy
-gtk_scrolled_window_add_with_viewport
GtkCornerType
gtk_scrolled_window_set_placement
gtk_scrolled_window_unset_placement
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 8beb8c8..2cbff7c 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -3992,69 +3992,6 @@ gtk_scrolled_window_remove (GtkContainer *container,
priv->auto_added_viewport = FALSE;
}
-/**
- * gtk_scrolled_window_add_with_viewport:
- * @scrolled_window: a #GtkScrolledWindow
- * @child: the widget you want to scroll
- *
- * Used to add children without native scrolling capabilities. This
- * is simply a convenience function; it is equivalent to adding the
- * unscrollable child to a viewport, then adding the viewport to the
- * scrolled window. If a child has native scrolling, use
- * gtk_container_add() instead of this function.
- *
- * The viewport scrolls the child by moving its #GdkWindow, and takes
- * the size of the child to be the size of its toplevel #GdkWindow.
- * This will be very wrong for most widgets that support native scrolling;
- * for example, if you add a widget such as #GtkTreeView with a viewport,
- * the whole widget will scroll, including the column headings. Thus,
- * widgets with native scrolling support should not be used with the
- * #GtkViewport proxy.
- *
- * A widget supports scrolling natively if it implements the
- * #GtkScrollable interface.
- *
- * Deprecated: 3.8: gtk_container_add() will automatically add
- * a #GtkViewport if the child doesn’t implement #GtkScrollable.
- */
-void
-gtk_scrolled_window_add_with_viewport (GtkScrolledWindow *scrolled_window,
- GtkWidget *child)
-{
- GtkBin *bin;
- GtkWidget *viewport;
- GtkWidget *child_widget;
-
- g_return_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window));
- g_return_if_fail (GTK_IS_WIDGET (child));
- g_return_if_fail (gtk_widget_get_parent (child) == NULL);
-
- bin = GTK_BIN (scrolled_window);
- child_widget = gtk_bin_get_child (bin);
-
- if (child_widget)
- {
- g_return_if_fail (GTK_IS_VIEWPORT (child_widget));
- g_return_if_fail (gtk_bin_get_child (GTK_BIN (child_widget)) == NULL);
-
- viewport = child_widget;
- }
- else
- {
- viewport =
- gtk_viewport_new (gtk_scrolled_window_get_hadjustment (scrolled_window),
- gtk_scrolled_window_get_vadjustment (scrolled_window));
- gtk_container_set_focus_hadjustment (GTK_CONTAINER (viewport),
- gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW
(scrolled_window)));
- gtk_container_set_focus_vadjustment (GTK_CONTAINER (viewport),
- gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW
(scrolled_window)));
- gtk_container_add (GTK_CONTAINER (scrolled_window), viewport);
- }
-
- gtk_widget_show (viewport);
- gtk_container_add (GTK_CONTAINER (viewport), child);
-}
-
static void
gtk_scrolled_window_get_preferred_width (GtkWidget *widget,
gint *minimum_size,
diff --git a/gtk/gtkscrolledwindow.h b/gtk/gtkscrolledwindow.h
index 1b8d5cd..55c3f27 100644
--- a/gtk/gtkscrolledwindow.h
+++ b/gtk/gtkscrolledwindow.h
@@ -182,9 +182,6 @@ void gtk_scrolled_window_set_shadow_type (GtkScrolledWindow *scrolle
GtkShadowType type);
GDK_AVAILABLE_IN_ALL
GtkShadowType gtk_scrolled_window_get_shadow_type (GtkScrolledWindow *scrolled_window);
-GDK_DEPRECATED_IN_3_8_FOR(gtk_container_add)
-void gtk_scrolled_window_add_with_viewport (GtkScrolledWindow *scrolled_window,
- GtkWidget *child);
GDK_AVAILABLE_IN_ALL
gint gtk_scrolled_window_get_min_content_width (GtkScrolledWindow *scrolled_window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]