[gtk+/wip/cosimoc/toolbar-gadget: 2/7] toolbar: trivial code cleanup



commit 3046a30f325bb280c0df280271d7773e2872f724
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Dec 28 12:37:56 2015 -0800

    toolbar: trivial code cleanup

 gtk/gtktoolbar.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 7900857..e9059f3 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -676,12 +676,14 @@ static void
 gtk_toolbar_init (GtkToolbar *toolbar)
 {
   GtkToolbarPrivate *priv;
+  GtkWidget *widget;
 
+  widget = GTK_WIDGET (toolbar);
   toolbar->priv = gtk_toolbar_get_instance_private (toolbar);
   priv = toolbar->priv;
 
-  gtk_widget_set_can_focus (GTK_WIDGET (toolbar), FALSE);
-  gtk_widget_set_has_window (GTK_WIDGET (toolbar), FALSE);
+  gtk_widget_set_can_focus (widget, FALSE);
+  gtk_widget_set_has_window (widget, FALSE);
 
   priv->orientation = GTK_ORIENTATION_HORIZONTAL;
   priv->style = DEFAULT_TOOLBAR_STYLE;
@@ -705,7 +707,7 @@ gtk_toolbar_init (GtkToolbar *toolbar)
   gtk_widget_show (priv->arrow);
   gtk_container_add (GTK_CONTAINER (priv->arrow_button), priv->arrow);
   
-  gtk_widget_set_parent (priv->arrow_button, GTK_WIDGET (toolbar));
+  gtk_widget_set_parent (priv->arrow_button, widget);
   
   /* which child position a drop will occur at */
   priv->menu = NULL;


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