From 0d9ebb501df60cf1803858efcd1c79542588abd8 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 22 Oct 2010 18:46:33 +0200 Subject: Move min-display-width/height to GtkScrolledWindow It is just too annoying to have to implement these properties in every scrollable. Instead, we now have ::min-content-height/width in GtkScrolledWindow. We also add GtkScrollablePolicy to determine how to size the scrollable content. --- gtk/gtkscrollable.c | 122 ---------------------------------------------------- 1 file changed, 122 deletions(-) (limited to 'gtk/gtkscrollable.c') diff --git a/gtk/gtkscrollable.c b/gtk/gtkscrollable.c index 12e7379e3f..3e19c79ca6 100644 --- a/gtk/gtkscrollable.c +++ b/gtk/gtkscrollable.c @@ -106,41 +106,6 @@ gtk_scrollable_default_init (GtkScrollableInterface *iface) GTK_TYPE_ADJUSTMENT, GTK_PARAM_READWRITE | G_PARAM_CONSTRUCT); g_object_interface_install_property (iface, pspec); - - - /** - * GtkScrollable:min-display-width: - * - * Minimum width to display in the parent scrolled window, this - * can be greater or less than the scrollable widget's real minimum - * width. - * - * Since: 3.0 - */ - pspec = g_param_spec_int ("min-display-width", - P_("Minimum Display Width"), - P_("Minimum width to display in the parent scrolled window"), - -1, G_MAXINT, -1, - GTK_PARAM_READWRITE); - g_object_interface_install_property (iface, pspec); - - - /** - * GtkScrollable:min-display-height: - * - * Minimum height to display in the parent scrolled window, this - * can be greater or less than the scrollable widget's real minimum - * height. - * - * Since: 3.0 - */ - pspec = g_param_spec_int ("min-display-height", - P_("Minimum Display Height"), - P_("Minimum height to display in the parent scrolled window"), - -1, G_MAXINT, -1, - GTK_PARAM_READWRITE); - g_object_interface_install_property (iface, pspec); - } /** @@ -238,90 +203,3 @@ gtk_scrollable_set_vadjustment (GtkScrollable *scrollable, g_object_set (scrollable, "vadjustment", vadjustment, NULL); } - - -/** - * gtk_scrollable_get_min_display_width: - * @scrollable: a #GtkScrollable - * - * Retrieves the minimum width of content to display in the - * parent scrolled window. - * - * Return value: The minimum display width. - * - * Since: 3.0 - **/ -gint -gtk_scrollable_get_min_display_width (GtkScrollable *scrollable) -{ - gint width; - - g_return_val_if_fail (GTK_IS_SCROLLABLE (scrollable), 0); - - g_object_get (scrollable, "min-display-width", &width, NULL); - - return width; -} - -/** - * gtk_scrollable_set_min_display_width: - * @scrollable: a #GtkScrollable - * @width: the minimum width of scrollable content to display - * - * Sets the minimum width of content to display in the parent scrolled window, - * this can be greater or less than the scrollable widget's real minimum - * width. - * - * Since: 3.0 - **/ -void -gtk_scrollable_set_min_display_width (GtkScrollable *scrollable, - gint width) -{ - g_return_if_fail (GTK_IS_SCROLLABLE (scrollable)); - - g_object_set (scrollable, "min-display-width", width, NULL); -} - -/** - * gtk_scrollable_get_min_display_height: - * @scrollable: a #GtkScrollable - * - * Retrieves the minimum height of content to display in the - * parent scrolled window. - * - * Return value: The minimum display height. - * - * Since: 3.0 - **/ -gint -gtk_scrollable_get_min_display_height (GtkScrollable *scrollable) -{ - gint height; - - g_return_val_if_fail (GTK_IS_SCROLLABLE (scrollable), 0); - - g_object_get (scrollable, "min-display-height", &height, NULL); - - return height; -} - -/** - * gtk_scrollable_set_min_display_height: - * @scrollable: a #GtkScrollable - * @height: the minimum height of scrollable content to display - * - * Sets the minimum height of content to display in the parent scrolled window, - * this can be greater or less than the scrollable widget's real minimum - * height. - * - * Since: 3.0 - **/ -void -gtk_scrollable_set_min_display_height (GtkScrollable *scrollable, - gint height) -{ - g_return_if_fail (GTK_IS_SCROLLABLE (scrollable)); - - g_object_set (scrollable, "min-display-height", height, NULL); -} -- cgit v1.2.1