[gtk+/combo-refactor: 40/50] Fixed combo-refactor branch for recent switch to gtk_cell_area_context_reset() api.



commit 30dfdedd6c059087098ff7741e829e0fd2bea723
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sat Nov 27 16:32:36 2010 +0900

    Fixed combo-refactor branch for recent switch to gtk_cell_area_context_reset() api.

 gtk/gtkcellview.c |   10 +++++-----
 gtk/gtktreemenu.c |    4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c
index 22eb1d0..4701a15 100644
--- a/gtk/gtkcellview.c
+++ b/gtk/gtkcellview.c
@@ -419,7 +419,7 @@ gtk_cell_view_set_property (GObject      *object,
     case PROP_ORIENTATION:
       view->priv->orientation = g_value_get_enum (value);
       if (view->priv->context)
-	gtk_cell_area_context_flush (view->priv->context);
+	gtk_cell_area_context_reset (view->priv->context);
       break;
     case PROP_BACKGROUND:
       {
@@ -547,9 +547,9 @@ gtk_cell_view_size_allocate (GtkWidget     *widget,
    */
   if (priv->fit_model)
     gtk_cell_area_context_allocate (priv->context, allocation->width, allocation->height);
-  else if (alloc_width <= 0 && priv->orientation == GTK_ORIENTATION_HORIZONTAL)
+  else if (alloc_width != allocation->width && priv->orientation == GTK_ORIENTATION_HORIZONTAL)
     gtk_cell_area_context_allocate (priv->context, allocation->width, -1);
-  else if (alloc_height <= 0 && priv->orientation == GTK_ORIENTATION_VERTICAL)
+  else if (alloc_height != allocation->height && priv->orientation == GTK_ORIENTATION_VERTICAL)
     gtk_cell_area_context_allocate (priv->context, -1, allocation->height);
 }
 
@@ -862,7 +862,7 @@ row_changed_cb (GtkTreeModel         *model,
 	{
 	  /* Resize everything in our context if our row changed */
 	  if (gtk_tree_path_compare (row_path, path) == 0)
-	    gtk_cell_area_context_flush (view->priv->context);
+	    gtk_cell_area_context_reset (view->priv->context);
 
 	  gtk_tree_path_free (row_path);
 	}
@@ -1343,7 +1343,7 @@ gtk_cell_view_set_fit_model (GtkCellView     *cell_view,
     {
       priv->fit_model = fit_model;
 
-      gtk_cell_area_context_flush (cell_view->priv->context);
+      gtk_cell_area_context_reset (cell_view->priv->context);
 
       g_object_notify (G_OBJECT (cell_view), "fit-model");
     }
diff --git a/gtk/gtktreemenu.c b/gtk/gtktreemenu.c
index 7c2d9df..bc21378 100644
--- a/gtk/gtktreemenu.c
+++ b/gtk/gtktreemenu.c
@@ -834,7 +834,7 @@ row_inserted_cb (GtkTreeModel     *model,
 	  gtk_menu_shell_insert (GTK_MENU_SHELL (menu), item, index);
 	  
 	  /* Resize everything */
-	  gtk_cell_area_context_flush (menu->priv->context);
+	  gtk_cell_area_context_reset (menu->priv->context);
 	}
     }
   else
@@ -875,7 +875,7 @@ row_deleted_cb (GtkTreeModel     *model,
 	  gtk_widget_destroy (item);
 	  
 	  /* Resize everything */
-	  gtk_cell_area_context_flush (menu->priv->context);
+	  gtk_cell_area_context_reset (menu->priv->context);
 	}
     }
   else 



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