[gnome-boxes] Attempt to start Boxes pool if it's inactive



commit 759bda1520bc30074d005d73a311ee771c2d7c51
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Thu Oct 18 16:44:11 2012 +0200

    Attempt to start Boxes pool if it's inactive
    
    At startup, we try to refresh Boxes storage pool, but this will
    fail if it's inactive. This can happen if the user fiddled with
    libvirt storage pool outside of Boxes. It's easy to start it so
    let's do it if needed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=676340

 src/app.vala |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index 4c1df9e..194c65a 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -260,6 +260,8 @@ private class Boxes.App: Boxes.UI {
             yield connection.fetch_storage_pools_async (null);
             var pool = Boxes.get_storage_pool (connection);
             if (pool != null)
+                if (pool.get_info ().state == GVir.StoragePoolState.INACTIVE)
+                    yield pool.start_async (0, null);
                 // If default storage pool exists, we should refresh it already
                 yield pool.refresh_async (null);
         } catch (GLib.Error error) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]