New function. (#64562)

2003-07-19  Matthias Clasen  <maclas@gmx.de>

	* gtk/gtkbbox.h:
	* gtk/gtkbbox.c (gtk_button_box_get_child_secondary): New function. (#64562)
This commit is contained in:
Matthias Clasen 2003-07-18 23:08:51 +00:00 committed by Matthias Clasen
parent 0c8511d269
commit 1fd4cd2fa4
9 changed files with 72 additions and 16 deletions

View File

@ -1,3 +1,8 @@
2003-07-19 Matthias Clasen <maclas@gmx.de>
* gtk/gtkbbox.h:
* gtk/gtkbbox.c (gtk_button_box_get_child_secondary): New function. (#64562)
Sat Jul 19 00:18:40 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkwindow.c (gtk_window_set_default_icon): Fix C99

View File

@ -1,3 +1,8 @@
2003-07-19 Matthias Clasen <maclas@gmx.de>
* gtk/gtkbbox.h:
* gtk/gtkbbox.c (gtk_button_box_get_child_secondary): New function. (#64562)
Sat Jul 19 00:18:40 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkwindow.c (gtk_window_set_default_icon): Fix C99

View File

@ -1,3 +1,8 @@
2003-07-19 Matthias Clasen <maclas@gmx.de>
* gtk/gtkbbox.h:
* gtk/gtkbbox.c (gtk_button_box_get_child_secondary): New function. (#64562)
Sat Jul 19 00:18:40 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkwindow.c (gtk_window_set_default_icon): Fix C99

View File

@ -1,3 +1,8 @@
2003-07-19 Matthias Clasen <maclas@gmx.de>
* gtk/gtkbbox.h:
* gtk/gtkbbox.c (gtk_button_box_get_child_secondary): New function. (#64562)
Sat Jul 19 00:18:40 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkwindow.c (gtk_window_set_default_icon): Fix C99

View File

@ -1,3 +1,8 @@
2003-07-19 Matthias Clasen <maclas@gmx.de>
* gtk/gtkbbox.h:
* gtk/gtkbbox.c (gtk_button_box_get_child_secondary): New function. (#64562)
Sat Jul 19 00:18:40 2003 Soeren Sandmann <sandmann@daimi.au.dk>
* gtk/gtkwindow.c (gtk_window_set_default_icon): Fix C99

View File

@ -1,3 +1,7 @@
2003-07-19 Matthias Clasen <maclas@gmx.de>
* gtk/gtk-sections.txt: Add gtk_button_box_get_child_secondary().
2003-07-18 Matthias Clasen <maclas@gmx.de>
* gtk/gtk-sections.txt: Add gtk_message_dialog_new_with_markup() and gtk_window_set_default_icon().

View File

@ -181,6 +181,7 @@ gtk_button_box_get_spacing
gtk_button_box_get_layout
gtk_button_box_get_child_size
gtk_button_box_get_child_ipadding
gtk_button_box_get_child_secondary
gtk_button_box_set_spacing
gtk_button_box_set_layout
gtk_button_box_set_child_size

View File

@ -239,25 +239,12 @@ gtk_button_box_get_child_property (GtkContainer *container,
GValue *value,
GParamSpec *pspec)
{
GList *list;
GtkBoxChild *child_info = NULL;
list = GTK_BOX (container)->children;
while (list)
{
child_info = list->data;
if (child_info->widget == child)
break;
list = list->next;
}
g_assert (list != NULL);
switch (property_id)
{
case CHILD_PROP_SECONDARY:
g_value_set_boolean (value, child_info->is_secondary);
g_value_set_boolean (value,
gtk_button_box_get_child_secondary (GTK_BUTTON_BOX (container),
child));
break;
default:
GTK_CONTAINER_WARN_INVALID_CHILD_PROPERTY_ID (container, property_id, pspec);
@ -338,6 +325,43 @@ gtk_button_box_get_layout (GtkButtonBox *widget)
return widget->layout_style;
}
/**
* gtk_button_box_get_child_secondary:
* @widget: a #GtkButtonBox
* @child: a child of @widget
*
* Returns whether @child should appear in a secondary group of children.
*
* Return value: whether @child should appear in a secondary group of children.
*
* Since: 2.4
**/
gboolean
gtk_button_box_get_child_secondary (GtkButtonBox *widget,
GtkWidget *child)
{
GList *list;
GtkBoxChild *child_info;
g_return_if_fail (GTK_IS_BUTTON_BOX (widget));
g_return_if_fail (GTK_IS_WIDGET (child));
child_info = NULL;
list = GTK_BOX (widget)->children;
while (list)
{
child_info = list->data;
if (child_info->widget == child)
break;
list = list->next;
}
g_return_val_if_fail (list != NULL, FALSE);
return child_info->is_secondary;
}
/**
* gtk_button_box_set_child_secondary
* @widget: a #GtkButtonBox

View File

@ -69,6 +69,8 @@ GType gtk_button_box_get_type (void) G_GNUC_CONST;
GtkButtonBoxStyle gtk_button_box_get_layout (GtkButtonBox *widget);
void gtk_button_box_set_layout (GtkButtonBox *widget,
GtkButtonBoxStyle layout_style);
gboolean gtk_button_box_get_child_secondary (GtkButtonBox *widget,
GtkWidget *child);
void gtk_button_box_set_child_secondary (GtkButtonBox *widget,
GtkWidget *child,
gboolean is_secondary);