GNOME Bugzilla – Bug 723929
Add a generic center box
Last modified: 2014-02-12 13:48:08 UTC
This turns GtkActionBar into GtkCenterBox and creates a new GtkActionBar that has an internal revealer.
Created attachment 268534 [details] [review] Rename GtkActionBar to GtkCenterBox
Created attachment 268535 [details] [review] Add new ActionBar
Created attachment 268536 [details] [review] tests: add a visibility toggle to the action bar test
Review of attachment 268535 [details] [review]: ::: gtk/gtkcenterbox.c @@ -37,3 @@ * @See_also: #GtkBox * - * GtkCenterBox is similar to a horizontal #GtkBox, it allows to place This should go into the first commit
Running testactionbar, I get (lt-testactionbar:12741): Gtk-WARNING **: GtkButton 0x1b6c350 is mapped but visible=1 child_visible=1 parent GtkCenterBox 0x1b42250 mapped=0
Created attachment 268843 [details] [review] Rename GtkActionBar to GtkCenterBox
Created attachment 268844 [details] [review] Add new ActionBar
Created attachment 268845 [details] [review] tests: add a visibility toggle to the action bar test
Review of attachment 268843 [details] [review]: I still hope that we can drop this and add the center widget to GtkBox, but for now this is ok. It is certainly a better name for this generic container
Review of attachment 268844 [details] [review]: ::: gtk/gtkactionbar.c @@ +41,3 @@ + * + * It allows placing children at the start or the end. In addition, it + * contains an internal centered box which is centered with respect to It is not really a box, and not really internal either (after all, you;re setting it with set_center_widget). @@ +48,3 @@ +struct _GtkActionBarPrivate +{ + GtkWidget *center_box; should rename this to center_widget, to match the setter, and the fact that it is not a box. @@ +157,3 @@ + pspec->name, + value); +} Not that it is very likely to occur in practice, but I think you need to just return the default value here, for the revealer. Compare gtkheaderbar
Review of attachment 268845 [details] [review]: sure
Attachment 268843 [details] pushed as c86ee05 - Rename GtkActionBar to GtkCenterBox Attachment 268844 [details] pushed as d0a654e - Add new ActionBar Attachment 268845 [details] pushed as 70a2772 - tests: add a visibility toggle to the action bar test