[gnome-boxes/wip/clone: 16/16] actions-popover: Add option to clone boxes
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/clone: 16/16] actions-popover: Add option to clone boxes
- Date: Tue, 3 May 2016 23:18:19 +0000 (UTC)
commit 7ae65cf18b391a4f0f5188b6d493dbc87652b8ca
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue May 3 22:02:25 2016 +0100
actions-popover: Add option to clone boxes
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]