[gtk/wip/baedert/for-master: 22/24] scrolledwindow: Remove useless local variables



commit cb2d6d8b579fe1855dcfb0dd507c56118be593f2
Author: Timm Bäder <mail baedert org>
Date:   Sun Feb 23 15:57:10 2020 +0100

    scrolledwindow: Remove useless local variables

 gtk/gtkscrolledwindow.c | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 71a8d2c53e..3a90ca7595 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -1404,14 +1404,11 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget,
 {
   GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (widget);
   GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
-  GtkBin *bin;
   GtkAllocation child_allocation;
   GtkWidget *child;
   gint sb_width;
   gint sb_height;
 
-  bin = GTK_BIN (scrolled_window);
-
   /* Get possible scrollbar dimensions */
   gtk_widget_measure (priv->vscrollbar, GTK_ORIENTATION_HORIZONTAL, -1,
                       &sb_width, NULL, NULL, NULL);
@@ -1430,7 +1427,7 @@ gtk_scrolled_window_size_allocate (GtkWidget *widget,
            priv->vscrollbar_policy == GTK_POLICY_EXTERNAL)
     priv->vscrollbar_visible = FALSE;
 
-  child = gtk_bin_get_child (bin);
+  child = gtk_bin_get_child (GTK_BIN (scrolled_window));
   if (child && gtk_widget_get_visible (child))
     {
       gint child_scroll_width;
@@ -2069,7 +2066,6 @@ gtk_scrolled_window_set_hadjustment (GtkScrolledWindow *scrolled_window,
                                      GtkAdjustment     *hadjustment)
 {
   GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
-  GtkBin *bin;
   GtkWidget *child;
 
   g_return_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window));
@@ -2079,8 +2075,6 @@ gtk_scrolled_window_set_hadjustment (GtkScrolledWindow *scrolled_window,
   else
     hadjustment = (GtkAdjustment*) g_object_new (GTK_TYPE_ADJUSTMENT, NULL);
 
-  bin = GTK_BIN (scrolled_window);
-
   if (!priv->hscrollbar)
     {
       priv->hscrollbar = gtk_scrollbar_new (GTK_ORIENTATION_HORIZONTAL, hadjustment);
@@ -2121,7 +2115,7 @@ gtk_scrolled_window_set_hadjustment (GtkScrolledWindow *scrolled_window,
   gtk_scrolled_window_adjustment_changed (hadjustment, scrolled_window);
   gtk_scrolled_window_adjustment_value_changed (hadjustment, scrolled_window);
 
-  child = gtk_bin_get_child (bin);
+  child = gtk_bin_get_child (GTK_BIN (scrolled_window));
   if (child)
     gtk_scrollable_set_hadjustment (GTK_SCROLLABLE (child), hadjustment);
 
@@ -2143,7 +2137,6 @@ gtk_scrolled_window_set_vadjustment (GtkScrolledWindow *scrolled_window,
                                      GtkAdjustment     *vadjustment)
 {
   GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
-  GtkBin *bin;
   GtkWidget *child;
 
   g_return_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window));
@@ -2153,8 +2146,6 @@ gtk_scrolled_window_set_vadjustment (GtkScrolledWindow *scrolled_window,
   else
     vadjustment = (GtkAdjustment*) g_object_new (GTK_TYPE_ADJUSTMENT, NULL);
 
-  bin = GTK_BIN (scrolled_window);
-
   if (!priv->vscrollbar)
     {
       priv->vscrollbar = gtk_scrollbar_new (GTK_ORIENTATION_VERTICAL, vadjustment);
@@ -2195,7 +2186,7 @@ gtk_scrolled_window_set_vadjustment (GtkScrolledWindow *scrolled_window,
   gtk_scrolled_window_adjustment_changed (vadjustment, scrolled_window);
   gtk_scrolled_window_adjustment_value_changed (vadjustment, scrolled_window);
 
-  child = gtk_bin_get_child (bin);
+  child = gtk_bin_get_child (GTK_BIN (scrolled_window));
   if (child)
     gtk_scrollable_set_vadjustment (GTK_SCROLLABLE (child), vadjustment);
 


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