diff options
author | Jonas Kümmerlin <rgcjonas@gmail.com> | 2015-08-05 21:46:05 +0200 |
---|---|---|
committer | Andre Miranda <andreldm@xfce.org> | 2017-08-14 21:06:47 -0300 |
commit | 5d25e291cd99db0a0870c4b31144dbb85b94517f (patch) | |
tree | 7154c213274146a4d50bbf0f4cfc246ca12abedf /thunarx | |
parent | 6dc933410958ba361583ab53b14c3e05447535f4 (diff) | |
download | thunar-5d25e291cd99db0a0870c4b31144dbb85b94517f.tar.gz |
Make it build with GSEAL
This is a prerequisite for Gtk3 which removes all the fields.
Diffstat (limited to 'thunarx')
-rw-r--r-- | thunarx/thunarx-property-page.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/thunarx/thunarx-property-page.c b/thunarx/thunarx-property-page.c index 6fb88f3d..1a6a0f2b 100644 --- a/thunarx/thunarx-property-page.c +++ b/thunarx/thunarx-property-page.c @@ -202,11 +202,12 @@ static void thunarx_property_page_size_request (GtkWidget *widget, GtkRequisition *requisition) { - GtkBin *bin = GTK_BIN (widget); + GtkBin *bin = GTK_BIN (widget); + GtkWidget *child = gtk_bin_get_child (bin); - if (G_LIKELY (bin->child != NULL && gtk_widget_get_visible (bin->child))) + if (G_LIKELY (child != NULL && gtk_widget_get_visible (child))) { - gtk_widget_size_request (bin->child, requisition); + gtk_widget_size_request (child, requisition); } else { @@ -214,8 +215,8 @@ thunarx_property_page_size_request (GtkWidget *widget, requisition->height = 0; } - requisition->width += 2 * (GTK_CONTAINER (bin)->border_width + widget->style->xthickness); - requisition->height += 2 * (GTK_CONTAINER (bin)->border_width + widget->style->ythickness); + requisition->width += 2 * (gtk_container_get_border_width (GTK_CONTAINER (bin)) + gtk_widget_get_style (widget)->xthickness); + requisition->height += 2 * (gtk_container_get_border_width (GTK_CONTAINER (bin)) + gtk_widget_get_style (widget)->ythickness); } @@ -226,21 +227,22 @@ thunarx_property_page_size_allocate (GtkWidget *widget, { GtkAllocation child_allocation; GtkBin *bin = GTK_BIN (widget); + GtkWidget *child = gtk_bin_get_child (bin); /* apply the allocation to the property page */ - widget->allocation = *allocation; + gtk_widget_set_allocation (widget, allocation); /* apply the child allocation if we have a child */ - if (G_LIKELY (bin->child != NULL && gtk_widget_get_visible (bin->child))) + if (G_LIKELY (child != NULL && gtk_widget_get_visible (child))) { /* calculate the allocation for the child widget */ - child_allocation.x = allocation->x + GTK_CONTAINER (bin)->border_width + widget->style->xthickness; - child_allocation.y = allocation->y + GTK_CONTAINER (bin)->border_width + widget->style->ythickness; - child_allocation.width = allocation->width - 2 * (GTK_CONTAINER (bin)->border_width + widget->style->xthickness); - child_allocation.height = allocation->height - 2 * (GTK_CONTAINER (bin)->border_width + widget->style->ythickness); + child_allocation.x = allocation->x + gtk_container_get_border_width (GTK_CONTAINER (bin)) + gtk_widget_get_style (widget)->xthickness; + child_allocation.y = allocation->y + gtk_container_get_border_width (GTK_CONTAINER (bin)) + gtk_widget_get_style (widget)->ythickness; + child_allocation.width = allocation->width - 2 * (gtk_container_get_border_width (GTK_CONTAINER (bin)) + gtk_widget_get_style (widget)->xthickness); + child_allocation.height = allocation->height - 2 * (gtk_container_get_border_width (GTK_CONTAINER (bin)) + gtk_widget_get_style (widget)->ythickness); /* apply the child allocation */ - gtk_widget_size_allocate (bin->child, &child_allocation); + gtk_widget_size_allocate (child, &child_allocation); } } @@ -367,7 +369,7 @@ thunarx_property_page_set_label_widget (ThunarxPropertyPage *property_page, GtkWidget *label_widget) { g_return_if_fail (THUNARX_IS_PROPERTY_PAGE (property_page)); - g_return_if_fail (label_widget == NULL || (GTK_IS_WIDGET (label_widget) && label_widget->parent == NULL)); + g_return_if_fail (label_widget == NULL || (GTK_IS_WIDGET (label_widget) && gtk_widget_get_parent (label_widget) == NULL)); if (G_UNLIKELY (label_widget == property_page->priv->label_widget)) return; |