[gnome-boxes] list-view-row: state_label -> status_label



commit 7cf3a739c517fc10364d5316e731811082d2b861
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Sat Aug 29 13:40:10 2015 +0100

    list-view-row: state_label -> status_label
    
    We are about to extend the role of state_label to also show
    Machine.status so better give it and associated update_state() a more
    generic name.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753888

 data/ui/list-view-row.ui |    2 +-
 src/list-view-row.vala   |   24 ++++++++++++------------
 2 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/data/ui/list-view-row.ui b/data/ui/list-view-row.ui
index 696f720..b49d909 100644
--- a/data/ui/list-view-row.ui
+++ b/data/ui/list-view-row.ui
@@ -118,7 +118,7 @@
     </child>
 
     <child>
-      <object class="GtkLabel" id="state_label">
+      <object class="GtkLabel" id="status_label">
         <property name="visible">True</property>
         <property name="width-request">192</property>
         <property name="max-width-chars">0</property>
diff --git a/src/list-view-row.vala b/src/list-view-row.vala
index d57bf4e..314cf2a 100644
--- a/src/list-view-row.vala
+++ b/src/list-view-row.vala
@@ -51,7 +51,7 @@ private class Boxes.ListViewRow: Gtk.Box {
     [GtkChild]
     private Gtk.Label info_label;
     [GtkChild]
-    private Gtk.Label state_label;
+    private Gtk.Label status_label;
 
     private Boxes.MachineThumbnailer thumbnailer;
 
@@ -75,12 +75,12 @@ private class Boxes.ListViewRow: Gtk.Box {
         machine.config.notify["categories"].connect (update_favorite);
         machine.notify["under-construction"].connect (update_thumbnail);
         machine.notify["info"].connect (update_info);
-        machine.notify["state"].connect (update_state);
+        machine.notify["state"].connect (update_status);
 
         update_thumbnail ();
         update_favorite ();
         update_info ();
-        update_state ();
+        update_status ();
 
         machine.bind_property ("name", machine_name, "label", BindingFlags.SYNC_CREATE);
     }
@@ -111,29 +111,29 @@ private class Boxes.ListViewRow: Gtk.Box {
         info_label.visible = (info != "");
     }
 
-    private void update_state () {
+    private void update_status () {
         if (machine is RemoteMachine) {
-            state_label.label = machine.is_connected ? _("connected"): _("disconnected");
-            state_label.sensitive = machine.is_connected;
+            status_label.label = machine.is_connected ? _("connected"): _("disconnected");
+            status_label.sensitive = machine.is_connected;
 
             return;
         }
 
         if (machine.is_running) {
-            state_label.label = _("running");
-            state_label.sensitive = true;
+            status_label.label = _("running");
+            status_label.sensitive = true;
 
             return;
         }
 
         if (machine.is_on) {
-            state_label.label = _("paused");
-            state_label.sensitive = false;
+            status_label.label = _("paused");
+            status_label.sensitive = false;
 
             return;
         }
 
-        state_label.label = _("powered off");
-        state_label.sensitive = false;
+        status_label.label = _("powered off");
+        status_label.sensitive = false;
     }
 }


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