[gtk+] Merge two if-blocks with same condition



commit 84ebafc3051db91409d57c37d88b4f6f51638d75
Author: Kristian Rietveld <kris gtk org>
Date:   Sat Apr 16 20:16:03 2011 +0200

    Merge two if-blocks with same condition

 gtk/gtktreeview.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index ad951c3..cb6cfe8 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2826,6 +2826,8 @@ gtk_tree_view_size_allocate (GtkWidget     *widget,
   
   if (gtk_widget_get_realized (widget))
     {
+      gboolean has_expand_column = FALSE;
+
       gdk_window_move_resize (gtk_widget_get_window (widget),
 			      allocation->x, allocation->y,
 			      allocation->width, allocation->height);
@@ -2842,11 +2844,7 @@ gtk_tree_view_size_allocate (GtkWidget     *widget,
 
       if (tree_view->priv->tree == NULL)
         invalidate_empty_focus (tree_view);
-    }
 
-  if (gtk_widget_get_realized (widget))
-    {
-      gboolean has_expand_column = FALSE;
       for (tmp_list = tree_view->priv->columns; tmp_list; tmp_list = tmp_list->next)
 	{
 	  if (gtk_tree_view_column_get_expand (GTK_TREE_VIEW_COLUMN (tmp_list->data)))



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