[gnome-boxes] libvirt-machine: use existing update_display() function



commit 76d801e38bf2000a59544152feab992e85331c54
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date:   Tue Sep 4 13:07:40 2012 +0200

    libvirt-machine: use existing update_display() function
    
    There is already a similar function and it is much nicer to have only
    a single point of display creation. Also comment a bit why this call
    is needed.

 src/libvirt-machine.vala |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index e59f380..2579de3 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -293,13 +293,9 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
     public override List<Boxes.Property> get_properties (Boxes.PropertiesPage page) {
         var list = new List<Boxes.Property> ();
 
-        var display = this.display;
+        // the wizard may want to modify display properties, before connect_display()
         if (display == null)
-            try {
-                display = create_display ();
-            } catch (GLib.Error error) {
-                warning (error.message);
-            }
+            update_display ();
 
         switch (page) {
         case PropertiesPage.LOGIN:



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