From ef565e2713c9a76c1b67dc7d1023dbba114109b7 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 16 Feb 2014 23:02:05 -0500 Subject: [PATCH] action bar: Use a regular box instead of GtkCenterBox GtkBox now supports a centered child, so GtkCenterBox is no longer needed here. --- gtk/gtkactionbar.c | 13 ++++++------- gtk/resources/ui/gtkactionbar.ui | 3 ++- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gtk/gtkactionbar.c b/gtk/gtkactionbar.c index 0075fc2cc0..9be1fe0777 100644 --- a/gtk/gtkactionbar.c +++ b/gtk/gtkactionbar.c @@ -24,7 +24,7 @@ #include "gtkaccessible.h" #include "gtkbuildable.h" #include "gtktypebuiltins.h" -#include "gtkcenterbox.h" +#include "gtkbox.h" #include "gtkrevealer.h" #include @@ -253,7 +253,7 @@ gtk_action_bar_buildable_add_child (GtkBuildable *buildable, GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (action_bar); if (type && strcmp (type, "center") == 0) - gtk_center_box_set_center_widget (GTK_CENTER_BOX (priv->center_box), GTK_WIDGET (child)); + gtk_box_set_center_widget (GTK_BOX (priv->center_box), GTK_WIDGET (child)); else if (!type) gtk_container_add (GTK_CONTAINER (buildable), GTK_WIDGET (child)); else @@ -285,7 +285,7 @@ gtk_action_bar_pack_start (GtkActionBar *action_bar, { GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (action_bar); - gtk_center_box_pack_start (GTK_CENTER_BOX (priv->center_box), child); + gtk_box_pack_start (GTK_BOX (priv->center_box), child, FALSE, TRUE, 0); } /** @@ -304,7 +304,7 @@ gtk_action_bar_pack_end (GtkActionBar *action_bar, { GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (action_bar); - gtk_center_box_pack_end (GTK_CENTER_BOX (priv->center_box), child); + gtk_box_pack_end (GTK_BOX (priv->center_box), child, FALSE, TRUE, 0); } /** @@ -322,8 +322,7 @@ gtk_action_bar_set_center_widget (GtkActionBar *action_bar, { GtkActionBarPrivate *priv = gtk_action_bar_get_instance_private (action_bar); - gtk_center_box_set_center_widget (GTK_CENTER_BOX (priv->center_box), - center_widget); + gtk_box_set_center_widget (GTK_BOX (priv->center_box), center_widget); } /** @@ -343,7 +342,7 @@ gtk_action_bar_get_center_widget (GtkActionBar *action_bar) g_return_val_if_fail (GTK_IS_ACTION_BAR (action_bar), NULL); - return gtk_center_box_get_center_widget (GTK_CENTER_BOX (priv->center_box)); + return gtk_box_get_center_widget (GTK_BOX (priv->center_box)); } /** diff --git a/gtk/resources/ui/gtkactionbar.ui b/gtk/resources/ui/gtkactionbar.ui index ed77a0761f..5a6a1982ef 100644 --- a/gtk/resources/ui/gtkactionbar.ui +++ b/gtk/resources/ui/gtkactionbar.ui @@ -8,8 +8,9 @@ True False - + True + horizontal False 0 6