Use gtk grid instead of box

Bug #1014387 reported by Danielle Foré
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Granite
Fix Released
Medium
Tom Beckmann

Bug Description

Granite is still using v/h.box (deprecated) instead of gtk.box

Tags: bitesize gtk

Related branches

tags: added: bitesize
Changed in granite:
status: New → Confirmed
assignee: nobody → Tristan Cormier (tristanc)
Revision history for this message
Tristan Cormier (tristanc) wrote :

Has it been fixed yet? There is a patch inside the lib directory and everything seems to be fixed. Maybe I did something wrong?

Changed in granite:
status: Confirmed → New
Changed in granite:
status: New → In Progress
Changed in granite:
status: In Progress → Fix Committed
Cody Garver (codygarver)
Changed in granite:
status: Fix Committed → In Progress
Revision history for this message
Corentin Noël (tintou) wrote :

We should use Gtk.Grid because the reference doc say that Gtk.Box could be deprecated in the future :

"gtk_hbox_new has been deprecated since version 3.2 and should not be used in newly-written code. You can use gtk_box_new() with GTK_ORIENTATION_HORIZONTAL instead, which is a quick and easy change. But the recommendation is to switch to GtkGrid, since GtkBox is going to go away eventually. See Migrating from other containers to GtkGrid."

Cody Garver (codygarver)
Changed in granite:
assignee: Tristan Cormier (tristanc) → nobody
status: In Progress → Confirmed
summary: - Use gtk.box
+ Use gtk grid instead of box
Cody Garver (codygarver)
Changed in granite:
status: Confirmed → Fix Committed
status: Fix Committed → Confirmed
status: Confirmed → Fix Committed
assignee: nobody → Tom Beckmann (tombeckmann)
importance: Undecided → Medium
Changed in granite:
milestone: none → luna-beta2
Revision history for this message
Julien Spautz (julien-spautz) wrote :

I don't think this is fixed. Grepping through granite searching for '\bBox\b' gives me this:

Box content_area = (Box)get_content_area();
        Box action_area = (Box)get_action_area();
        var content_hbox = new Box(Orientation.HORIZONTAL, 12);
        var content_right_box = new Box(Orientation.VERTICAL, 0);
        var content_scrolled_vbox = new Box(Orientation.VERTICAL, 0);
        var title_vbox = new Box(Orientation.VERTICAL, 0);
        var logo_vbox = new Box(Orientation.VERTICAL, 0);
        logo_vbox.pack_end(new Box(Orientation.VERTICAL, 0), true, true, 0);
        content_hbox.pack_start(new Box(Orientation.VERTICAL, 0), false, false, 0);
        content_hbox.pack_end(new Box(Orientation.VERTICAL, 0), false, false, 0);
        content_right_box.pack_end(new Box(Orientation.VERTICAL, 0), false, false, 6);
     * Box for action items
    protected Gtk.Box options;
        Gtk.Box content = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
        // Box properties
        content.pack_start (new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0), true, true, 0);
        this.options = new Gtk.Box (Gtk.Orientation.VERTICAL, 8);
        var options_wrapper = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
        options_wrapper.pack_start (new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0), true, true, 0); // left padding
        options_wrapper.pack_end (new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0), true, true, 0); // right padding
        content.pack_end (new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0), true, true, 0);
        var button_contents = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 7);
        var text_wrapper = new Gtk.Box (Gtk.Orientation.VERTICAL, 3);
        text_wrapper.pack_start (new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0), true, true, 0);
        text_wrapper.pack_end (new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0), true, true, 0);
    public class StaticNotebook : Gtk.Box {
        private Gtk.Box switcher_box;
            switcher_box = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 0);
    private Gtk.Box left_box;
    private Gtk.Box right_box;
        left_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
        right_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 0);
            Box action_area = (Box) get_action_area ();
    Gtk.Box hbox;
    Gtk.Box abox;
        hbox = get_content_area() as Gtk.Box;
        abox = get_action_area() as Gtk.Box;
    public class ModeButton : Gtk.Box {
    public class Tab : Gtk.Box {
    public class Tab : Gtk.Box {
        protected Gtk.Box box { get; private set; }
            this.box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
            ((Gtk.Box)popover.get_content_area()).add(dropdown);

Cody Garver (codygarver)
Changed in granite:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.