[gnome-boxes] Revert "machine: Ensure 'status' property is always set"



commit 61cc6b3f6a0210c240035e9e388813b633c1fe6f
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Aug 28 14:54:18 2015 +0100

    Revert "machine: Ensure 'status' property is always set"
    
    This reverts commit 63b978a880f8e72d8353a5b5c50223bbf09a489e.
    
    This retioanale for the reverted commit was the fact that 'status'
    property is (indirectly) bound 'accessible-name' property of AppWindow
    and that is non-nullable so we end-up with a warning on console. This
    issue will be solved in a following patch in a different way but we
    can't have Machine.name being permanently mapped to it's 'status'
    anymore as we are about to expand the role of 'status' property and show
    it's contents also in collection view.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753888

 src/libvirt-machine.vala |    2 --
 src/machine.vala         |    3 +--
 src/ovirt-machine.vala   |    2 --
 src/remote-machine.vala  |    2 --
 4 files changed, 1 insertions(+), 8 deletions(-)
---
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 44ce2c3..5f38784 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -95,8 +95,6 @@ private class Boxes.LibvirtMachine: Boxes.Machine {
             show_display ();
             display.set_enable_audio (true);
         }
-
-        status = name;
     }
 
     struct MachineStat {
diff --git a/src/machine.vala b/src/machine.vala
index b60c4a4..4a26276 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -11,7 +11,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
     public MachineThumbnailer thumbnailer { get; private set; }
     public bool stay_on_display;
     public string? info { get; protected set; }
-    public string status { get; set; }
+    public string? status { get; set; }
     public virtual bool suspend_at_exit { get { return false; } }
 
     public virtual bool can_save { get { return false; } }
@@ -255,7 +255,6 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
                 set_screenshot_enable (true);
         });
 
-        status = this.name;
         notify["name"].connect (() => {
             status = this.name;
         });
diff --git a/src/ovirt-machine.vala b/src/ovirt-machine.vala
index fe81951..ebe5068 100644
--- a/src/ovirt-machine.vala
+++ b/src/ovirt-machine.vala
@@ -58,8 +58,6 @@ private class Boxes.OvirtMachine: Boxes.Machine {
         } catch (GLib.Error e) {
             throw new Boxes.Error.INVALID ("Error opening display: %s", e.message);
         }
-
-        status = name;
     }
 
     public override List<Boxes.Property> get_properties (Boxes.PropertiesPage page, ref PropertyCreationFlag 
flags) {
diff --git a/src/remote-machine.vala b/src/remote-machine.vala
index 3f7a615..6e61b7a 100644
--- a/src/remote-machine.vala
+++ b/src/remote-machine.vala
@@ -46,8 +46,6 @@ private class Boxes.RemoteMachine: Boxes.Machine, Boxes.IPropertiesProvider {
             show_display ();
             display.set_enable_audio (true);
         }
-
-        status = name;
     }
 
     public override List<Boxes.Property> get_properties (Boxes.PropertiesPage page, ref PropertyCreationFlag 
flags) {


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