[gtk+/wip/baedert/drawing: 119/186] scrolledwindow: Remove last argument from allocate_child



commit 638c6b3ab29f6ae6b0fe6db5f9b6be2091982a24
Author: Timm Bäder <mail baedert org>
Date:   Sat May 6 11:11:48 2017 +0200

    scrolledwindow: Remove last argument from allocate_child
    
    We never use that when calling gtk_scrolled_window_allocate_child.

 gtk/gtkscrolledwindow.c |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index e807ada..ee484df 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -340,8 +340,7 @@ static void     gtk_scrolled_window_inner_allocation   (GtkWidget         *widge
 static void     gtk_scrolled_window_allocate_scrollbar (GtkScrolledWindow *scrolled_window,
                                                         GtkWidget         *scrollbar,
                                                         GtkAllocation     *allocation);
-static void     gtk_scrolled_window_allocate_child     (GtkScrolledWindow *swindow,
-                                                        GtkAllocation     *relative_allocation);
+static void     gtk_scrolled_window_allocate_child     (GtkScrolledWindow *swindow);
 static void     gtk_scrolled_window_adjustment_changed (GtkAdjustment     *adjustment,
                                                         gpointer           data);
 static void     gtk_scrolled_window_adjustment_value_changed (GtkAdjustment     *adjustment,
@@ -1582,7 +1581,7 @@ gtk_scrolled_window_size_allocate (GtkWidget     *widget,
        {
          previous_hvis = priv->hscrollbar_visible;
          previous_vvis = priv->vscrollbar_visible;
-         gtk_scrolled_window_allocate_child (scrolled_window, &relative_allocation);
+         gtk_scrolled_window_allocate_child (scrolled_window);
 
          /* Explicitly force scrollbar visibility checks.
           *
@@ -1609,7 +1608,7 @@ gtk_scrolled_window_size_allocate (GtkWidget     *widget,
              priv->hscrollbar_visible = TRUE;
              priv->vscrollbar_visible = TRUE;
 
-             gtk_scrolled_window_allocate_child (scrolled_window, &relative_allocation);
+             gtk_scrolled_window_allocate_child (scrolled_window);
 
              break;
            }
@@ -3047,20 +3046,20 @@ _gtk_scrolled_window_get_overshoot (GtkScrolledWindow *scrolled_window,
 }
 
 static void
-gtk_scrolled_window_allocate_child (GtkScrolledWindow *swindow,
-                                   GtkAllocation     *relative_allocation)
+gtk_scrolled_window_allocate_child (GtkScrolledWindow *swindow)
 {
   GtkWidget     *widget = GTK_WIDGET (swindow), *child;
   GtkAllocation  child_allocation;
+  GtkAllocation  relative_allocation;
 
   child = gtk_bin_get_child (GTK_BIN (widget));
 
-  gtk_scrolled_window_relative_allocation (widget, relative_allocation);
+  gtk_scrolled_window_relative_allocation (widget, &relative_allocation);
 
-  child_allocation.x = relative_allocation->x;
-  child_allocation.y = relative_allocation->y;
-  child_allocation.width = relative_allocation->width;
-  child_allocation.height = relative_allocation->height;
+  child_allocation.x = relative_allocation.x;
+  child_allocation.y = relative_allocation.y;
+  child_allocation.width = relative_allocation.width;
+  child_allocation.height = relative_allocation.height;
 
   gtk_widget_size_allocate (child, &child_allocation);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]