[gnome-boxes] list-view-row: Don't show empty info label



commit 111988a54f19d2884f65582d2c90a9652a16baf1
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Aug 25 18:05:42 2015 +0100

    list-view-row: Don't show empty info label

 data/ui/list-view-row.ui |    2 +-
 src/list-view-row.vala   |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/data/ui/list-view-row.ui b/data/ui/list-view-row.ui
index c8552c1..98f0e5e 100644
--- a/data/ui/list-view-row.ui
+++ b/data/ui/list-view-row.ui
@@ -98,7 +98,7 @@
 
         <child>
           <object class="GtkLabel" id="info_label">
-            <property name="visible">True</property>
+            <property name="visible">False</property> <!-- Only show when non-empty -->
             <property name="max-width-chars">32</property>
             <property name="justify">left</property>
             <property name="hexpand">True</property>
diff --git a/src/list-view-row.vala b/src/list-view-row.vala
index 5ad5987..55a6a7d 100644
--- a/src/list-view-row.vala
+++ b/src/list-view-row.vala
@@ -106,6 +106,8 @@ private class Boxes.ListViewRow: Gtk.Box {
 
     private void update_info () {
         info_label.label = machine.info;
+
+        info_label.visible = (info_label.label != "");
     }
 
     private void update_state () {


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