[gtk+] toolbar: trivial code cleanup



commit 10c222649eb086d90de9b69ebfe743165c775b78
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]