[gnome-boxes] libvirt-machine-props: Separate out 'System' page buttons



commit ab6aabc93c6f1b66c7f00fd04f911ed8e0ab82c4
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Apr 28 16:15:23 2015 +0100

    libvirt-machine-props: Separate out 'System' page buttons
    
    "Troubleshooting log" button doesn't exact fit next to "Restart" and
    "Shutdown" so let's put the former far away from latter.

 src/libvirt-machine-properties.vala |   27 +++++++++++++++++----------
 1 files changed, 17 insertions(+), 10 deletions(-)
---
diff --git a/src/libvirt-machine-properties.vala b/src/libvirt-machine-properties.vala
index 4db8d3b..35a6388 100644
--- a/src/libvirt-machine-properties.vala
+++ b/src/libvirt-machine-properties.vala
@@ -405,21 +405,20 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
         var grid = new Gtk.Grid ();
         grid.margin_top = 5;
         grid.column_spacing = 5;
-        grid.halign = Gtk.Align.START;
+        grid.hexpand = true;
 
-        var button = new Gtk.Button.with_label (_("Troubleshooting log"));
-        grid.attach (button, 0, 0, 1, 1);
-        button.clicked.connect (() => {
-            var log = collect_logs ();
-            machine.window.props_window.show_troubleshoot_log (log);
-        });
+        var inner_grid = new Gtk.Grid ();
+        inner_grid.column_spacing = 5;
+        inner_grid.halign = Gtk.Align.START;
+        inner_grid.hexpand = true;
+        grid.attach (inner_grid, 0, 0, 1, 1);
 
-        button = new Gtk.Button.with_label (_("Restart"));
+        var button = new Gtk.Button.with_label (_("Restart"));
         button.clicked.connect (() => {
             machine.restart ();
             machine.window.props_window.revert_state ();
         });
-        grid.attach (button, 1, 0, 1, 1);
+        inner_grid.attach (button, 1, 0, 1, 1);
 
         button = new Gtk.Button.with_label (_("Force Shutdown"));
         button.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION);
@@ -427,13 +426,21 @@ private class Boxes.LibvirtMachineProperties: GLib.Object, Boxes.IPropertiesProv
             machine.force_shutdown ();
             machine.window.props_window.revert_state ();
         });
-        grid.attach (button, 2, 0, 1, 1);
+        inner_grid.attach (button, 2, 0, 1, 1);
 
         button.sensitive = machine.is_running ();
         var state_notify_id = machine.notify["state"].connect (() => {
             button.sensitive = machine.is_running ();
         });
 
+        button = new Gtk.Button.with_label (_("Troubleshooting log"));
+        button.halign = Gtk.Align.END;
+        grid.attach (button, 1, 0, 1, 1);
+        button.clicked.connect (() => {
+            var log = collect_logs ();
+            machine.window.props_window.show_troubleshoot_log (log);
+        });
+
         var prop = add_property (ref list, null, grid);
         ulong flushed_id = 0;
         flushed_id = prop.flushed.connect (() => {


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