Added GtkCellArea classes to gtk.h and fixed a remainig rendering bug.

This commit is contained in:
Tristan Van Berkom 2010-11-09 01:25:45 +09:00
parent 92b9f432dd
commit e5e507e1d4
2 changed files with 3 additions and 10 deletions

View File

@ -52,6 +52,9 @@
#include <gtk/gtkbuilder.h> #include <gtk/gtkbuilder.h>
#include <gtk/gtkbutton.h> #include <gtk/gtkbutton.h>
#include <gtk/gtkcalendar.h> #include <gtk/gtkcalendar.h>
#include <gtk/gtkcellarea.h>
#include <gtk/gtkcellareabox.h>
#include <gtk/gtkcellareaiter.h>
#include <gtk/gtkcelleditable.h> #include <gtk/gtkcelleditable.h>
#include <gtk/gtkcelllayout.h> #include <gtk/gtkcelllayout.h>
#include <gtk/gtkcellrenderer.h> #include <gtk/gtkcellrenderer.h>

View File

@ -586,8 +586,6 @@ get_allocated_cells (GtkCellAreaBox *box,
return NULL; return NULL;
} }
g_print ("Allocating cells for rendering, group allocs %d\n", n_allocs);
for (i = 0; i < n_allocs; i++) for (i = 0; i < n_allocs; i++)
{ {
/* We dont always allocate all groups, sometimes the requested group has only invisible /* We dont always allocate all groups, sometimes the requested group has only invisible
@ -679,8 +677,6 @@ get_allocated_cells (GtkCellAreaBox *box,
position += sizes[j].minimum_size; position += sizes[j].minimum_size;
position += priv->spacing; position += priv->spacing;
j++;
} }
g_free (sizes); g_free (sizes);
@ -1059,9 +1055,6 @@ gtk_cell_area_box_render (GtkCellArea *area,
* of alignments and pack order etc. */ * of alignments and pack order etc. */
allocated_cells = get_allocated_cells (box, box_iter, widget); allocated_cells = get_allocated_cells (box, box_iter, widget);
g_print ("Rendering an area with allocated cells %d\n",
g_slist_length (allocated_cells));
for (l = allocated_cells; l; l = l->next) for (l = allocated_cells; l; l = l->next)
{ {
AllocatedCell *cell = l->data; AllocatedCell *cell = l->data;
@ -1083,9 +1076,6 @@ gtk_cell_area_box_render (GtkCellArea *area,
/* XXX We have to do some per-cell considerations for the 'flags' /* XXX We have to do some per-cell considerations for the 'flags'
* for focus handling */ * for focus handling */
g_print ("Rendering a cell at x: %d y: %d width %d height %d\n",
inner_area.x, inner_area.y, inner_area.width, inner_area.height);
gtk_cell_renderer_render (cell->renderer, cr, widget, gtk_cell_renderer_render (cell->renderer, cr, widget,
&background_area, &inner_area, &background_area, &inner_area,
flags); flags);