Fix warning about uninitialized variable plus spacing and indentation cleanup

This commit is contained in:
Michael Natterer
2009-06-25 13:30:15 +02:00
parent 99b42cf006
commit f35c317b68

View File

@ -559,14 +559,10 @@ gtk_button_box_size_request (GtkWidget *widget,
}
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
requisition->height = child_height;
}
else
{
requisition->width = child_width;
}
}
requisition->width += GTK_CONTAINER (box)->border_width * 2;
requisition->height += GTK_CONTAINER (box)->border_width * 2;
@ -589,8 +585,8 @@ gtk_button_box_size_allocate (GtkWidget *widget,
gint y = 0;
gint secondary_x = 0;
gint secondary_y = 0;
gint width;
gint height;
gint width = 0;
gint height = 0;
gint childspace;
gint childspacing = 0;
GtkButtonBoxStyle layout;
@ -735,8 +731,8 @@ gtk_button_box_size_allocate (GtkWidget *widget,
x = allocation->x +
(allocation->width
- (child_width * (nvis_children - n_secondaries)
+ spacing * (nvis_children - n_secondaries - 1)))/2
+ (n_secondaries * child_width + n_secondaries * spacing)/2;
+ spacing * (nvis_children - n_secondaries - 1))) / 2
+ (n_secondaries * child_width + n_secondaries * spacing) / 2;
secondary_x = allocation->x + GTK_CONTAINER (box)->border_width;
}
else
@ -745,15 +741,15 @@ gtk_button_box_size_allocate (GtkWidget *widget,
y = allocation->y +
(allocation->height
- (child_height * (nvis_children - n_secondaries)
+ spacing * (nvis_children - n_secondaries - 1)))/2
+ (n_secondaries * child_height + n_secondaries * spacing)/2;
+ spacing * (nvis_children - n_secondaries - 1))) / 2
+ (n_secondaries * child_height + n_secondaries * spacing) / 2;
secondary_y = allocation->y + GTK_CONTAINER (box)->border_width;
}
break;
default:
g_assert_not_reached();
g_assert_not_reached ();
break;
}