[gnome-boxes/wip/inhibit: 12/13] machine: Inhibit during machine construction
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/inhibit: 12/13] machine: Inhibit during machine construction
- Date: Mon, 9 Apr 2018 10:06:01 +0000 (UTC)
commit c3a2225aa6bab9eb57fd189dc378abd3d875012c
Author: Felipe Borges <felipeborges gnome org>
Date: Wed Apr 4 13:41:01 2018 +0200
machine: Inhibit during machine construction
Since suspending during this operation will cause it to fail.
Fixes #193
src/machine.vala | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/src/machine.vala b/src/machine.vala
index 1c507fde..46d12b1f 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -271,6 +271,15 @@ public Machine (Boxes.CollectionSource source, string name, string? uuid = null)
SCREENSHOT_WIDTH, SCREENSHOT_HEIGHT,
CENTERED_EMBLEM_SIZE, EMBLEM_SIZE,
FRAME_BORDER_COLOR, FRAME_BACKGROUND_COLOR);
+
+ notify["under-construction"].connect (() => {
+ if (under_construction) {
+ var inhibit_reason = _("Machine is under construction");
+ App.app.inhibit (null, null, inhibit_reason);
+ } else {
+ App.app.uninhibit ();
+ }
+ });
}
protected void load_screenshot () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]