[gnome-boxes/wip/inhibit: 13/13] libvirt-machine: Inhibit while clonning machine
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/wip/inhibit: 13/13] libvirt-machine: Inhibit while clonning machine
- Date: Mon, 9 Apr 2018 10:06:06 +0000 (UTC)
commit 45a5ff32d3e10d8f0fd3dbcf931304bc9d10601e
Author: Felipe Borges <felipeborges gnome org>
Date: Wed Apr 4 15:17:10 2018 +0200
libvirt-machine: Inhibit while clonning machine
Fixes #193
src/libvirt-machine.vala | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index a09a8f50..097780f8 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -686,6 +686,9 @@ public override async void clone () {
debug ("Cloning '%s'..", domain_config.name);
can_delete = false;
+ var inhibit_reason = _("Cloning '%s'..").printf (domain_config.name);
+ App.app.inhibit (null, null, inhibit_reason);
+
try {
// Any better way of cloning the config?
var xml = domain_config.to_xml ();
@@ -702,6 +705,8 @@ public override async void clone () {
if (!clone_machine.under_construction) {
can_delete = true;
clone_machine.disconnect (under_construct_id);
+
+ App.app.uninhibit ();
}
});
} catch (GLib.Error error) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]