[gnome-boxes] actions-popover: Add option to clone boxes



commit 9f53acb4959af593a46ce6f48568cb1dc139ebea
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue May 3 22:02:25 2016 +0100

    actions-popover: Add option to clone boxes
    
    https://bugzilla.gnome.org/show_bug.cgi?id=710307

 src/actions-popover.vala |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/actions-popover.vala b/src/actions-popover.vala
index 927076b..c1c460f 100644
--- a/src/actions-popover.vala
+++ b/src/actions-popover.vala
@@ -7,6 +7,7 @@ private class Boxes.ActionsPopover: Gtk.Popover {
         {"pause",           pause_activated},
         {"force_shutdown",  force_shutdown_activated},
         {"delete",          delete_activated},
+        {"clone",           clone_activated},
         {"properties",      properties_activated},
         {"restart",         restart_activated}
     };
@@ -65,6 +66,11 @@ private class Boxes.ActionsPopover: Gtk.Popover {
             var action = action_group.lookup_action ("pause") as GLib.SimpleAction;
             action.set_enabled (machine.can_save);
 
+            // Clone
+            section.append (_("Clone"), "box.clone");
+            action = action_group.lookup_action ("clone") as GLib.SimpleAction;
+            action.set_enabled (machine.can_clone);
+
             // Delete
             section.append (_("Delete"), "box.delete");
             action = action_group.lookup_action ("delete") as GLib.SimpleAction;
@@ -129,6 +135,10 @@ private class Boxes.ActionsPopover: Gtk.Popover {
         App.app.delete_machines_undoable ((owned) items);
     }
 
+    private void clone_activated () {
+        (window.current_item as Machine).clone.begin ();
+    }
+
     private void properties_activated () {
         window.show_properties ();
     }


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