[gnome-boxes] actions-popover: Don't open under-import VMs
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] actions-popover: Don't open under-import VMs
- Date: Wed, 4 May 2016 15:13:29 +0000 (UTC)
commit 313f5a8340296bd110e2da15a6044c7117eb90e5
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue May 3 18:02:58 2016 +0100
actions-popover: Don't open under-import VMs
If the VM is being imported, do not allow it to be launched from
actions popover. We already don't allow it to be launched via mouse
click.
https://bugzilla.gnome.org/show_bug.cgi?id=710307
src/actions-popover.vala | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/actions-popover.vala b/src/actions-popover.vala
index c8d8f37..815d1fa 100644
--- a/src/actions-popover.vala
+++ b/src/actions-popover.vala
@@ -34,9 +34,14 @@ private class Boxes.ActionsPopover: Gtk.Popover {
var menu = new GLib.Menu ();
var section = new GLib.Menu ();
+ var importing = (machine is LibvirtMachine && (machine as LibvirtMachine).importing);
+
// Open in new Window
- if (window.ui_state != UIState.DISPLAY)
+ if (window.ui_state != UIState.DISPLAY) {
section.append (_("Open in New Window"), "box.open-in-new-win");
+ var action = action_group.lookup_action ("open-in-new-win") as GLib.SimpleAction;
+ action.set_enabled (!importing);
+ }
// Favorite
if (("favorite" in machine.config.categories))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]