Optimized size_allocate method in views.

Removed some debug instructions.
This commit is contained in:
Erick Pérez Castellanos
2012-12-01 15:28:58 -05:00
committed by Rene A. Viant Moran
parent 14fe503ece
commit ef08a2a45f
2 changed files with 22 additions and 4 deletions
+11
View File
@@ -454,6 +454,17 @@ gcal_month_view_size_allocate (GtkWidget *widget,
{ {
gtk_widget_hide (child->widget); gtk_widget_hide (child->widget);
child->hidden_by_me = TRUE; child->hidden_by_me = TRUE;
l = l->next;
for (; l != NULL; l = l->next)
{
child = (GcalViewChild*) l->data;
gtk_widget_hide (child->widget);
child->hidden_by_me = TRUE;
}
break;
} }
else else
{ {
+11 -4
View File
@@ -394,7 +394,6 @@ gcal_year_view_size_allocate (GtkWidget *widget,
vertical_block = (allocation->height - start_grid_y) / 2; vertical_block = (allocation->height - start_grid_y) / 2;
vertical_cell_margin = padding.top + font_height; vertical_cell_margin = padding.top + font_height;
g_debug ("handling children sizes");
for (i = 0; i < 12; i++) for (i = 0; i < 12; i++)
{ {
added_height = 0; added_height = 0;
@@ -407,9 +406,6 @@ gcal_year_view_size_allocate (GtkWidget *widget,
gint natural_height; gint natural_height;
GtkAllocation child_allocation; GtkAllocation child_allocation;
g_debug ("list length for %s is %d",
gcal_get_month_name (i),
g_list_length (priv->months[i]));
child = (GcalViewChild*) l->data; child = (GcalViewChild*) l->data;
pos_x = ( i % 6 ) * horizontal_block; pos_x = ( i % 6 ) * horizontal_block;
@@ -431,6 +427,17 @@ gcal_year_view_size_allocate (GtkWidget *widget,
{ {
gtk_widget_hide (child->widget); gtk_widget_hide (child->widget);
child->hidden_by_me = TRUE; child->hidden_by_me = TRUE;
l = l->next;
for (; l != NULL; l = l->next)
{
child = (GcalViewChild*) l->data;
gtk_widget_hide (child->widget);
child->hidden_by_me = TRUE;
}
break;
} }
else else
{ {