summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2003-07-18 23:08:51 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2003-07-18 23:08:51 +0000
commit1fd4cd2fa4dd1a99d259ce58c1454d0cd630f4ae (patch)
tree7b0ceeb9e7ab1a529767ac38cca22e88b07fd205
parent0c8511d269b70279eafe6619f297c13f2a07ad85 (diff)
downloadgtk+-1fd4cd2fa4dd1a99d259ce58c1454d0cd630f4ae.tar.gz
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)
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.pre-2-105
-rw-r--r--ChangeLog.pre-2-45
-rw-r--r--ChangeLog.pre-2-65
-rw-r--r--ChangeLog.pre-2-85
-rw-r--r--docs/reference/ChangeLog4
-rw-r--r--docs/reference/gtk/gtk-sections.txt1
-rw-r--r--gtk/gtkbbox.c56
-rw-r--r--gtk/gtkbbox.h2
9 files changed, 72 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 797174305f..9556d15e88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 797174305f..9556d15e88 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -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
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 797174305f..9556d15e88 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -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
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 797174305f..9556d15e88 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -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
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 797174305f..9556d15e88 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -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
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog
index c1109954ad..e2ea33b9bf 100644
--- a/docs/reference/ChangeLog
+++ b/docs/reference/ChangeLog
@@ -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().
diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt
index d6b64b172e..818fb03169 100644
--- a/docs/reference/gtk/gtk-sections.txt
+++ b/docs/reference/gtk/gtk-sections.txt
@@ -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
diff --git a/gtk/gtkbbox.c b/gtk/gtkbbox.c
index 15fe55a88e..fade4783ac 100644
--- a/gtk/gtkbbox.c
+++ b/gtk/gtkbbox.c
@@ -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);
@@ -339,6 +326,43 @@ gtk_button_box_get_layout (GtkButtonBox *widget)
}
/**
+ * 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
* @child: a child of @widget
diff --git a/gtk/gtkbbox.h b/gtk/gtkbbox.h
index d69c44dfca..2773b69827 100644
--- a/gtk/gtkbbox.h
+++ b/gtk/gtkbbox.h
@@ -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);