[gnome-boxes] list-view-row: Show Machine.status when available



commit 99dc000f7e3d04a80aac3a905d3251538504ef4b
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Sat Aug 29 13:35:04 2015 +0100

    list-view-row: Show Machine.status when available
    
    If Machine.status is non-null, show that in the status label instead of
    machine's state since former is now more important than latter.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753888

 src/list-view-row.vala |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/list-view-row.vala b/src/list-view-row.vala
index db702dc..f4fe2b7 100644
--- a/src/list-view-row.vala
+++ b/src/list-view-row.vala
@@ -76,6 +76,7 @@ private class Boxes.ListViewRow: Gtk.Box {
         machine.notify["under-construction"].connect (update_thumbnail);
         machine.notify["info"].connect (update_info);
         machine.notify["state"].connect (update_status);
+        machine.notify["status"].connect (update_status);
 
         update_thumbnail ();
         update_favorite ();
@@ -112,6 +113,13 @@ private class Boxes.ListViewRow: Gtk.Box {
     }
 
     private void update_status () {
+        if (machine.status != null) {
+            status_label.label = machine.status;
+            update_status_label_style (false);
+
+            return;
+        }
+
         if (machine is RemoteMachine) {
             status_label.label = machine.is_connected ? _("connected"): _("disconnected");
             update_status_label_style (!machine.is_connected);


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