[gnome-boxes] actions-popover: Don't show "Delete" in display state
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] actions-popover: Don't show "Delete" in display state
- Date: Tue, 28 Apr 2015 13:59:22 +0000 (UTC)
commit 32d23ede083ccddbe13680ec58bb8a1dc93d5f41
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Mon Apr 27 18:39:45 2015 +0100
actions-popover: Don't show "Delete" in display state
Don't show "Delete" option in the hamburger menu. Showing it there when
box is in foreground, looks odd.
src/actions-popover.vala | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/actions-popover.vala b/src/actions-popover.vala
index f08a2f6..fdcf4be 100644
--- a/src/actions-popover.vala
+++ b/src/actions-popover.vala
@@ -47,10 +47,12 @@ private class Boxes.ActionsPopover: Gtk.Popover {
var action = action_group.lookup_action ("pause") as GLib.SimpleAction;
action.set_enabled (machine.can_save);
- // Delete
- section.append (_("Delete"), "box.delete");
- action = action_group.lookup_action ("delete") as GLib.SimpleAction;
- action.set_enabled (machine.can_delete);
+ if (window.ui_state != UIState.DISPLAY) {
+ // Delete
+ section.append (_("Delete"), "box.delete");
+ action = action_group.lookup_action ("delete") as GLib.SimpleAction;
+ action.set_enabled (machine.can_delete);
+ }
menu.append_section (null, section);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]