[gnome-boxes] Change how the selection toolbar is built



commit 75358ff39935e668aae247c361ade565e324c64c
Author: Alexander Larsson <alexl redhat com>
Date:   Thu Oct 25 18:55:51 2012 +0200

    Change how the selection toolbar is built
    
    Instead of hardcoding offsets on each item we pack them in
    order by appending at the end (offset=-1).
    
    This means we don't have to change all offsets when we add
    a new button.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686777

 src/selectionbar.vala |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/selectionbar.vala b/src/selectionbar.vala
index 76ab107..05a22ec 100644
--- a/src/selectionbar.vala
+++ b/src/selectionbar.vala
@@ -28,7 +28,7 @@ private class Boxes.Selectionbar: GLib.Object {
         gtk_actor.y_align = Clutter.ActorAlign.END;
 
         favorite_btn = new Gtk.ToggleToolButton ();
-        toolbar.insert (favorite_btn, 0);
+        toolbar.insert (favorite_btn, -1);
         favorite_btn.icon_name = "emblem-favorite-symbolic";
         favorite_btn.clicked.connect (() => {
            foreach (var item in App.app.selected_items) {
@@ -40,10 +40,10 @@ private class Boxes.Selectionbar: GLib.Object {
         });
 
         var separator = new Gtk.SeparatorToolItem();
-        toolbar.insert(separator, 1);
+        toolbar.insert(separator, -1);
 
         remove_btn = new Gtk.ToggleToolButton ();
-        toolbar.insert (remove_btn, 2);
+        toolbar.insert (remove_btn, -1);
         remove_btn.icon_name = "edit-delete-symbolic";
         remove_btn.clicked.connect (() => {
             App.app.remove_selected_items ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]