GtkAllocation *allocation);
-static const GtkButtonBoxStyle default_layout_style = GTK_BUTTONBOX_EDGE;
GType
psppire_hbutton_box_get_type (void)
bbox = GTK_BUTTON_BOX (widget);
spacing = gtk_box_get_spacing (box);
- layout = gtk_button_box_get_layout (bbox) != GTK_BUTTONBOX_DEFAULT_STYLE
- ? gtk_button_box_get_layout (bbox) : default_layout_style;
+ layout = gtk_button_box_get_layout (bbox) ;
_psppire_button_box_child_requisition (widget,
&nvis_children,
requisition->width =
nvis_children*child_width + ((nvis_children+1)*spacing);
break;
+ default:
case GTK_BUTTONBOX_EDGE:
case GTK_BUTTONBOX_START:
case GTK_BUTTONBOX_END:
requisition->width = nvis_children*child_width + ((nvis_children-1)*spacing);
break;
- default:
- g_assert_not_reached();
- break;
}
requisition->height = child_height;
base_box = GTK_BOX (widget);
box = GTK_BUTTON_BOX (widget);
spacing = gtk_box_get_spacing (base_box);
- layout = gtk_button_box_get_layout (box) != GTK_BUTTONBOX_DEFAULT_STYLE
- ? gtk_button_box_get_layout (box) : default_layout_style;
+ layout = gtk_button_box_get_layout (box) ;
_psppire_button_box_child_requisition (widget,
&nvis_children,
&n_secondaries,
x = allocation->x + gtk_container_get_border_width (GTK_CONTAINER (box)) + childspacing;
secondary_x = x + ((nvis_children - n_secondaries) * (child_width + childspacing));
break;
+ default:
case GTK_BUTTONBOX_EDGE:
if (nvis_children >= 2)
{
- gtk_container_get_border_width (GTK_CONTAINER (box));
secondary_x = allocation->x + gtk_container_get_border_width (GTK_CONTAINER (box));
break;
- default:
- g_assert_not_reached();
- break;
}
GtkAllocation *allocation);
-static const GtkButtonBoxStyle default_layout_style = GTK_BUTTONBOX_EDGE;
-
GType
psppire_vbutton_box_get_type (void)
{
bbox = GTK_BUTTON_BOX (widget);
spacing = gtk_box_get_spacing (box);
- layout = gtk_button_box_get_layout (bbox) != GTK_BUTTONBOX_DEFAULT_STYLE
- ? gtk_button_box_get_layout (bbox) : default_layout_style;
+ layout = gtk_button_box_get_layout (bbox);
_psppire_button_box_child_requisition (widget,
&nvis_children,
case GTK_BUTTONBOX_EDGE:
case GTK_BUTTONBOX_START:
case GTK_BUTTONBOX_END:
+ default:
requisition->height =
nvis_children*child_height + ((nvis_children-1)*spacing);
break;
- default:
- g_assert_not_reached();
- break;
}
requisition->width = child_width;
}
base_box = GTK_BOX (widget);
box = GTK_BUTTON_BOX (widget);
spacing = gtk_box_get_spacing (base_box);
- layout = gtk_button_box_get_layout (box) != GTK_BUTTONBOX_DEFAULT_STYLE
- ? gtk_button_box_get_layout (box) : default_layout_style;
+ layout = gtk_button_box_get_layout (box) ;
_psppire_button_box_child_requisition (widget,
&nvis_children,
&n_secondaries,
secondary_y = y + ((nvis_children - n_secondaries) * (child_height + childspacing));
break;
case GTK_BUTTONBOX_EDGE:
+ default:
if (nvis_children >= 2)
{
childspacing = (height - (nvis_children*child_height)) / (nvis_children-1);
- gtk_container_get_border_width (GTK_CONTAINER (box));
secondary_y = allocation->y + gtk_container_get_border_width (GTK_CONTAINER (box));
break;
- default:
- g_assert_not_reached();
- break;
}
x = allocation->x + (allocation->width - child_width) / 2;