Commit 0d9ebb50 authored by Matthias Clasen's avatar Matthias Clasen

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.
parent ce5a29bc
......@@ -2751,10 +2751,6 @@ gtk_scrollable_get_hadjustment
gtk_scrollable_set_hadjustment
gtk_scrollable_get_vadjustment
gtk_scrollable_set_vadjustment
gtk_scrollable_get_min_display_width
gtk_scrollable_set_min_display_width
gtk_scrollable_get_min_display_height
gtk_scrollable_set_min_display_height
<SUBSECTION Standard>
GtkScrollableIface
......@@ -2804,6 +2800,16 @@ gtk_scrolled_window_set_vadjustment
gtk_scrolled_window_get_placement
gtk_scrolled_window_get_policy
gtk_scrolled_window_get_shadow_type
gtk_scrolled_window_get_min_content_width
gtk_scrolled_window_set_min_content_width
gtk_scrolled_window_get_min_content_height
gtk_scrolled_window_set_min_content_height
GtkScrollablePolicy
gtk_scrolled_window_get_hscroll_policy
gtk_scrolled_window_set_hscroll_policy
gtk_scrolled_window_get_vscroll_policy
gtk_scrolled_window_set_vscroll_policy
<SUBSECTION Standard>
GTK_SCROLLED_WINDOW
GTK_IS_SCROLLED_WINDOW
......
......@@ -2893,15 +2893,11 @@ gtk_scale_button_get_popup
#if IN_HEADER(__GTK_SCROLLABLE_H__)
#if IN_FILE(__GTK_SCROLLABLE_C__)
gtk_scrollable_get_hadjustment
gtk_scrollable_get_type G_GNUC_CONST
gtk_scrollable_get_hadjustment
gtk_scrollable_get_vadjustment
gtk_scrollable_set_hadjustment
gtk_scrollable_set_vadjustment
gtk_scrollable_get_min_display_width
gtk_scrollable_set_min_display_width
gtk_scrollable_get_min_display_height
gtk_scrollable_set_min_display_height
#endif
#endif
......@@ -2930,6 +2926,14 @@ gtk_scrolled_window_set_policy
gtk_scrolled_window_set_shadow_type
gtk_scrolled_window_set_vadjustment
gtk_scrolled_window_unset_placement
gtk_scrolled_window_get_min_content_width
gtk_scrolled_window_set_min_content_width
gtk_scrolled_window_get_min_content_height
gtk_scrolled_window_set_min_content_height
gtk_scrolled_window_get_hscroll_policy
gtk_scrolled_window_set_hscroll_policy
gtk_scrolled_window_get_vscroll_policy
gtk_scrolled_window_set_vscroll_policy
#endif
#endif
......
......@@ -543,4 +543,19 @@ typedef enum
G_END_DECLS
/**
* GtkScrollablePolicy:
* @GTK_SCROLL_MINIMUM: Scrollable adjustments are based on the minimum size
* @GTK_SCROLL_NATURAL: Scrollable adjustments are based on the natural size
*
* Defines the policy to be used in a scrollable widget when updating
* the scrolled window adjustments in a given orientation.
*/
typedef enum
{
GTK_SCROLL_MINIMUM = 0,
GTK_SCROLL_NATURAL
} GtkScrollablePolicy;
#endif /* __GTK_ENUMS_H__ */
......@@ -135,8 +135,6 @@ struct _GtkIconViewPrivate
GtkAdjustment *hadjustment;
GtkAdjustment *vadjustment;
gint min_display_width;
gint min_display_height;
guint layout_idle_id;
......@@ -245,9 +243,7 @@ enum
/* For scrollable interface */
PROP_HADJUSTMENT,
PROP_VADJUSTMENT,
PROP_MIN_DISPLAY_WIDTH,
PROP_MIN_DISPLAY_HEIGHT
PROP_VADJUSTMENT
};
/* GObject vfuncs */
......@@ -800,9 +796,6 @@ gtk_icon_view_class_init (GtkIconViewClass *klass)
/* Scrollable interface properties */
g_object_class_override_property (gobject_class, PROP_HADJUSTMENT, "hadjustment");
g_object_class_override_property (gobject_class, PROP_VADJUSTMENT, "vadjustment");
g_object_class_override_property (gobject_class, PROP_MIN_DISPLAY_WIDTH, "min-display-width");
g_object_class_override_property (gobject_class, PROP_MIN_DISPLAY_HEIGHT, "min-display-height");
/* Style properties */
gtk_widget_class_install_style_property (widget_class,
......@@ -1133,9 +1126,6 @@ gtk_icon_view_init (GtkIconView *icon_view)
icon_view->priv->margin = 6;
icon_view->priv->item_padding = 6;
icon_view->priv->min_display_width = -1;
icon_view->priv->min_display_height = -1;
icon_view->priv->draw_focus = TRUE;
}
......@@ -1215,12 +1205,6 @@ gtk_icon_view_set_property (GObject *object,
case PROP_VADJUSTMENT:
gtk_icon_view_set_vadjustment (icon_view, g_value_get_object (value));
break;
case PROP_MIN_DISPLAY_WIDTH:
icon_view->priv->min_display_width = g_value_get_int (value);
break;
case PROP_MIN_DISPLAY_HEIGHT:
icon_view->priv->min_display_height = g_value_get_int (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
......@@ -1293,12 +1277,6 @@ gtk_icon_view_get_property (GObject *object,
case PROP_VADJUSTMENT:
g_value_set_object (value, icon_view->priv->vadjustment);
break;
case PROP_MIN_DISPLAY_WIDTH:
g_value_set_int (value, icon_view->priv->min_display_width);
break;
case PROP_MIN_DISPLAY_HEIGHT:
g_value_set_int (value, icon_view->priv->min_display_height);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
......
......@@ -52,8 +52,6 @@ struct _GtkLayoutPrivate
GtkAdjustment *hadjustment;
GtkAdjustment *vadjustment;
gint min_display_width;
gint min_display_height;
/* Properties */
......@@ -78,8 +76,6 @@ enum {
PROP_0,
PROP_HADJUSTMENT,
PROP_VADJUSTMENT,
PROP_MIN_DISPLAY_WIDTH,
PROP_MIN_DISPLAY_HEIGHT,
PROP_WIDTH,
PROP_HEIGHT
};
......@@ -622,18 +618,8 @@ gtk_layout_class_init (GtkLayoutClass *class)
GTK_PARAM_READWRITE));
/* Scrollable interface */
g_object_class_override_property (gobject_class,
PROP_HADJUSTMENT,
"hadjustment");
g_object_class_override_property (gobject_class,
PROP_VADJUSTMENT,
"vadjustment");
g_object_class_override_property (gobject_class,
PROP_MIN_DISPLAY_WIDTH,
"min-display-width");
g_object_class_override_property (gobject_class,
PROP_MIN_DISPLAY_HEIGHT,
"min-display-height");
g_object_class_override_property (gobject_class, PROP_HADJUSTMENT, "hadjustment");
g_object_class_override_property (gobject_class, PROP_VADJUSTMENT, "vadjustment");
g_object_class_install_property (gobject_class,
PROP_WIDTH,
......@@ -685,12 +671,6 @@ gtk_layout_get_property (GObject *object,
case PROP_VADJUSTMENT:
g_value_set_object (value, priv->vadjustment);
break;
case PROP_MIN_DISPLAY_WIDTH:
g_value_set_int (value, priv->min_display_width);
break;
case PROP_MIN_DISPLAY_HEIGHT:
g_value_set_int (value, priv->min_display_height);
break;
case PROP_WIDTH:
g_value_set_uint (value, priv->width);
break;
......@@ -722,12 +702,6 @@ gtk_layout_set_property (GObject *object,
gtk_layout_set_vadjustment (layout,
(GtkAdjustment*) g_value_get_object (value));
break;
case PROP_MIN_DISPLAY_WIDTH:
priv->min_display_width = g_value_get_int (value);
break;
case PROP_MIN_DISPLAY_HEIGHT:
priv->min_display_height = g_value_get_int (value);
break;
case PROP_WIDTH:
gtk_layout_set_size (layout, g_value_get_uint (value),
priv->height);
......@@ -811,8 +785,6 @@ gtk_layout_init (GtkLayout *layout)
priv->hadjustment = NULL;
priv->vadjustment = NULL;
priv->min_display_width = -1;
priv->min_display_height = -1;
priv->bin_window = NULL;
......
......@@ -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);
}
......@@ -49,12 +49,6 @@ void gtk_scrollable_set_hadjustment (GtkScrollable *scrollable,
GtkAdjustment *gtk_scrollable_get_vadjustment (GtkScrollable *scrollable);
void gtk_scrollable_set_vadjustment (GtkScrollable *scrollable,
GtkAdjustment *vadjustment);
gint gtk_scrollable_get_min_display_width (GtkScrollable *scrollable);
void gtk_scrollable_set_min_display_width (GtkScrollable *scrollable,
gint width);
gint gtk_scrollable_get_min_display_height (GtkScrollable *scrollable);
void gtk_scrollable_set_min_display_height (GtkScrollable *scrollable,
gint height);
G_END_DECLS
......
......@@ -134,6 +134,11 @@ struct _GtkScrolledWindowPrivate
guint vscrollbar_visible : 1;
guint window_placement : 2;
guint focus_out : 1; /* Flag used by ::move-focus-out implementation */
guint hscroll_policy : 1;
guint vscroll_policy : 1;
gint min_content_width;
gint min_content_height;
};
......@@ -143,9 +148,13 @@ enum {
PROP_VADJUSTMENT,
PROP_HSCROLLBAR_POLICY,
PROP_VSCROLLBAR_POLICY,
PROP_HSCROLL_POLICY,
PROP_VSCROLL_POLICY,
PROP_WINDOW_PLACEMENT,
PROP_WINDOW_PLACEMENT_SET,
PROP_SHADOW_TYPE
PROP_SHADOW_TYPE,
PROP_MIN_CONTENT_WIDTH,
PROP_MIN_CONTENT_HEIGHT
};
/* Signals */
......@@ -372,6 +381,37 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class)
DEFAULT_SCROLLBAR_SPACING,
GTK_PARAM_READABLE));
g_object_class_install_property (gobject_class,
PROP_HSCROLL_POLICY,
g_param_spec_enum ("hscroll-policy",
P_("Horizontal Scrollable Policy"),
P_("How the size of the content should be determined"),
GTK_TYPE_SCROLLABLE_POLICY,
GTK_SCROLL_NATURAL,
GTK_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_VSCROLL_POLICY,
g_param_spec_enum ("vscroll-policy",
P_("Vertical Scrollable Policy"),
P_("How the size of the content should be determined"),
GTK_TYPE_SCROLLABLE_POLICY,
GTK_SCROLL_NATURAL,
GTK_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_MIN_CONTENT_WIDTH,
g_param_spec_int ("min-content-width",
P_("Minimum Content Width"),
P_("The minimum width that the scrolled window will allocate to its content"),
-1, G_MAXINT, -1,
GTK_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_MIN_CONTENT_HEIGHT,
g_param_spec_int ("min-content-height",
P_("Minimum Content Height"),
P_("The minimum height that the scrolled window will allocate to its content"),
-1, G_MAXINT, -1,
GTK_PARAM_READWRITE));
/**
* GtkScrolledWindow::scroll-child:
* @scrolled_window: a #GtkScrolledWindow
......@@ -467,6 +507,10 @@ gtk_scrolled_window_init (GtkScrolledWindow *scrolled_window)
priv->focus_out = FALSE;
priv->window_placement = GTK_CORNER_TOP_LEFT;
gtk_scrolled_window_update_real_placement (scrolled_window);
priv->hscroll_policy = GTK_SCROLL_NATURAL;
priv->vscroll_policy = GTK_SCROLL_NATURAL;
priv->min_content_width = -1;
priv->min_content_height = -1;
}
/**
......@@ -1037,6 +1081,22 @@ gtk_scrolled_window_set_property (GObject *object,
gtk_scrolled_window_set_shadow_type (scrolled_window,
g_value_get_enum (value));
break;
case PROP_HSCROLL_POLICY:
gtk_scrolled_window_set_hscroll_policy (scrolled_window,
g_value_get_enum (value));
break;
case PROP_VSCROLL_POLICY:
gtk_scrolled_window_set_vscroll_policy (scrolled_window,
g_value_get_enum (value));
break;
case PROP_MIN_CONTENT_WIDTH:
gtk_scrolled_window_set_min_content_width (scrolled_window,
g_value_get_int (value));
break;
case PROP_MIN_CONTENT_HEIGHT:
gtk_scrolled_window_set_min_content_height (scrolled_window,
g_value_get_int (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -1062,12 +1122,6 @@ gtk_scrolled_window_get_property (GObject *object,
g_value_set_object (value,
G_OBJECT (gtk_scrolled_window_get_vadjustment (scrolled_window)));
break;
case PROP_HSCROLLBAR_POLICY:
g_value_set_enum (value, priv->hscrollbar_policy);
break;
case PROP_VSCROLLBAR_POLICY:
g_value_set_enum (value, priv->vscrollbar_policy);
break;
case PROP_WINDOW_PLACEMENT:
g_value_set_enum (value, priv->window_placement);
break;
......@@ -1077,6 +1131,24 @@ gtk_scrolled_window_get_property (GObject *object,
case PROP_SHADOW_TYPE:
g_value_set_enum (value, priv->shadow_type);
break;
case PROP_HSCROLLBAR_POLICY:
g_value_set_enum (value, priv->hscrollbar_policy);
break;
case PROP_VSCROLLBAR_POLICY:
g_value_set_enum (value, priv->vscrollbar_policy);
break;
case PROP_HSCROLL_POLICY:
g_value_set_enum (value, priv->hscroll_policy);
break;
case PROP_VSCROLL_POLICY:
g_value_set_enum (value, priv->vscroll_policy);
break;
case PROP_MIN_CONTENT_WIDTH:
g_value_set_int (value, priv->min_content_width);
break;
case PROP_MIN_CONTENT_HEIGHT:
g_value_set_int (value, priv->min_content_height);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -2015,13 +2087,12 @@ gtk_scrolled_window_get_preferred_size (GtkWidget *widget,
}
else
{
gint min_display_width =
gtk_scrollable_get_min_display_width (GTK_SCROLLABLE (child));
gint min_content_width = priv->min_content_width;
if (min_display_width > 0)
if (min_content_width >= 0)
{
minimum_req.width += min_display_width;
natural_req.width += min_display_width;
minimum_req.width = MAX (minimum_req.width, min_content_width);
natural_req.width = MAX (natural_req.width, min_content_width);
extra_width = -1;
}
else
......@@ -2044,13 +2115,12 @@ gtk_scrolled_window_get_preferred_size (GtkWidget *widget,
}
else
{
gint min_display_height =
gtk_scrollable_get_min_display_height (GTK_SCROLLABLE (child));
gint min_content_height = priv->min_content_height;
if (min_display_height > 0)
if (min_content_height >= 0)
{
minimum_req.height += min_display_height;
natural_req.height += min_display_height;
minimum_req.height = MAX (minimum_req.height, min_content_height);
natural_req.height = MAX (natural_req.height, min_content_height);
extra_height = -1;
}
else
......@@ -2147,3 +2217,115 @@ gtk_scrolled_window_get_preferred_width_for_height (GtkWidget *widget,
GTK_WIDGET_GET_CLASS (widget)->get_preferred_width (widget, minimum_width, natural_width);
}
gint
gtk_scrolled_window_get_min_content_width (GtkScrolledWindow *scrolled_window)
{
g_return_val_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window), 0);
return scrolled_window->priv->min_content_width;
}
void
gtk_scrolled_window_set_min_content_width (GtkScrolledWindow *scrolled_window,
gint min_content_width)
{
GtkScrolledWindowPrivate *priv;
g_return_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window));
priv = scrolled_window->priv;
if (priv->min_content_width != min_content_width)
{
priv->min_content_width = min_content_width;
gtk_widget_queue_resize (GTK_WIDGET (scrolled_window));
g_object_notify (G_OBJECT (scrolled_window), "min-content-width");
}
}
gint
gtk_scrolled_window_get_min_content_height (GtkScrolledWindow *scrolled_window)
{
g_return_val_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window), 0);
return scrolled_window->priv->min_content_height;
}
void
gtk_scrolled_window_set_min_content_height (GtkScrolledWindow *scrolled_window,
gint min_content_height)
{
GtkScrolledWindowPrivate *priv;
g_return_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window));
priv = scrolled_window->priv;
if (priv->min_content_height != min_content_height)
{
priv->min_content_height = min_content_height;
gtk_widget_queue_resize (GTK_WIDGET (scrolled_window));
g_object_notify (G_OBJECT (scrolled_window), "min-content-height");
}
}
GtkScrollablePolicy
gtk_scrolled_window_get_hscroll_policy (GtkScrolledWindow *scrolled_window)
{
g_return_val_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window), 0);
return scrolled_window->priv->hscroll_policy;
}
void
gtk_scrolled_window_set_hscroll_policy (GtkScrolledWindow *scrolled_window,
GtkScrollablePolicy policy)
{
GtkScrolledWindowPrivate *priv;
g_return_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window));
priv = scrolled_window->priv;
if (priv->hscroll_policy != policy)
{
priv->hscroll_policy = policy;
gtk_widget_queue_resize (GTK_WIDGET (scrolled_window));
g_object_notify (G_OBJECT (scrolled_window), "hscroll-policy");
}
}
GtkScrollablePolicy
gtk_scrolled_window_get_vscroll_policy (GtkScrolledWindow *scrolled_window)
{
g_return_val_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window), 0);
return scrolled_window->priv->vscroll_policy;
}
void
gtk_scrolled_window_set_vscroll_policy (GtkScrolledWindow *scrolled_window,
GtkScrollablePolicy policy)
{
GtkScrolledWindowPrivate *priv;
g_return_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window));
priv = scrolled_window->priv;
if (priv->vscroll_policy != policy)
{
priv->vscroll_policy = policy;
gtk_widget_queue_resize (GTK_WIDGET (scrolled_window));
g_object_notify (G_OBJECT (scrolled_window), "vscroll-policy");
}
}
......@@ -115,6 +115,19 @@ GtkShadowType gtk_scrolled_window_get_shadow_type (GtkScrolledWindow *scrolle
void gtk_scrolled_window_add_with_viewport (GtkScrolledWindow *scrolled_window,
GtkWidget *child);
gint gtk_scrolled_window_get_min_content_width (GtkScrolledWindow *scrolled_window);
void gtk_scrolled_window_set_min_content_width (GtkScrolledWindow *scrolled_window,
gint width);
gint gtk_scrolled_window_get_min_content_height (GtkScrolledWindow *scrolled_window);
void gtk_scrolled_window_set_min_content_height (GtkScrolledWindow *scrolled_window,
gint height);
GtkScrollablePolicy gtk_scrolled_window_get_hscroll_policy (GtkScrolledWindow *scrolled_window);
void gtk_scrolled_window_set_hscroll_policy (GtkScrolledWindow *scrolled_window,
GtkScrollablePolicy policy);
GtkScrollablePolicy gtk_scrolled_window_get_vscroll_policy (GtkScrolledWindow *scrolled_window);
void gtk_scrolled_window_set_vscroll_policy (GtkScrolledWindow *scrolled_window,
GtkScrollablePolicy policy);
gint _gtk_scrolled_window_get_scrollbar_spacing (GtkScrolledWindow *scrolled_window);
......
......@@ -129,8 +129,6 @@ struct _GtkTextViewPrivate
GtkAdjustment *hadjustment;
GtkAdjustment *vadjustment;
gint min_display_width;
gint min_display_height;
gint xoffset; /* Offsets between widget coordinates and buffer coordinates */
gint yoffset;
......@@ -262,9 +260,7 @@ enum
PROP_ACCEPTS_TAB,
PROP_IM_MODULE,
PROP_HADJUSTMENT,
PROP_VADJUSTMENT,
PROP_MIN_DISPLAY_WIDTH,
PROP_MIN_DISPLAY_HEIGHT
PROP_VADJUSTMENT
};
static void gtk_text_view_finalize (GObject *object);
......@@ -777,8 +773,6 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
/* GtkScrollable interface */
g_object_class_override_property (gobject_class, PROP_HADJUSTMENT, "hadjustment");
g_object_class_override_property (gobject_class, PROP_VADJUSTMENT, "vadjustment");
g_object_class_override_property (gobject_class, PROP_MIN_DISPLAY_WIDTH, "min-display-width");
g_object_class_override_property (gobject_class, PROP_MIN_DISPLAY_HEIGHT, "min-display-height");
/*
* Style properties
......@@ -1394,9 +1388,6 @@ gtk_text_view_init (GtkTextView *text_view)
priv->pending_place_cursor_button = 0;
priv->min_display_width = -1;
priv->min_display_height = -1;
/* We handle all our own redrawing */
gtk_widget_set_redraw_on_allocate (widget, FALSE);
}
......@@ -3101,14 +3092,6 @@ gtk_text_view_set_property (GObject *object,
gtk_text_view_set_vadjustment (text_view, g_value_get_object (value));
break;
case PROP_MIN_DISPLAY_WIDTH:
priv->min_display_width = g_value_get_int (value);
break;
case PROP_MIN_DISPLAY_HEIGHT:
priv->min_display_height = g_value_get_int (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -3197,14 +3180,6 @@ gtk_text_view_get_property (GObject *object,
g_value_set_object (value, priv->vadjustment);
break;
case PROP_MIN_DISPLAY_WIDTH:
g_value_set_int (value, priv->min_display_width);
break;
case PROP_MIN_DISPLAY_HEIGHT:
g_value_set_int (value, priv->min_display_height);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......
......@@ -122,9 +122,7 @@ enum
PROP_ORIENTATION,
PROP_TOOLBAR_STYLE,
PROP_HADJUSTMENT,
PROP_VADJUSTMENT,
PROP_MIN_DISPLAY_WIDTH,
PROP_MIN_DISPLAY_HEIGHT
PROP_VADJUSTMENT
};
enum
......@@ -150,8 +148,6 @@ struct _GtkToolPalettePrivate
GtkAdjustment *hadjustment;
GtkAdjustment *vadjustment;
gint min_display_width;
gint min_display_height;
GtkIconSize icon_size;