[node-patches] Change in ovirt-node[master]: urwid: Only show Label if table label is given

fabiand at fedoraproject.org fabiand at fedoraproject.org
Wed Aug 21 16:04:49 UTC 2013


Fabian Deutsch has uploaded a new change for review.

Change subject: urwid: Only show Label if table label is given
......................................................................

urwid: Only show Label if table label is given

This saves on row at runtime, when no label is given.

Change-Id: I25f978a42b78a1e82f46c3a1a8ca2964ab38e631
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M src/ovirt/node/ui/widgets.py
1 file changed, 8 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/81/18381/1

diff --git a/src/ovirt/node/ui/widgets.py b/src/ovirt/node/ui/widgets.py
index 9883d1e..3e7faf5 100644
--- a/src/ovirt/node/ui/widgets.py
+++ b/src/ovirt/node/ui/widgets.py
@@ -183,10 +183,14 @@
         self.__box = urwid.BoxAdapter(self.__columns, height)
         self.__box_attrmap = urwid.AttrMap(self.__box, self._table_attr)
 
-        self.__pile = urwid.Pile([self.__label_attrmap,
-                                  self.__header_attrmap,
-                                  self.__box,
-                                  self.__position_label_attrmap])
+        pile_children = []
+        if label:
+            pile_children.append(self.__label_attrmap)
+        pile_children += [self.__header_attrmap,
+                          self.__box,
+                          self.__position_label_attrmap]
+
+        self.__pile = urwid.Pile(pile_children)
 
         self._update_scrollbar()
 


-- 
To view, visit http://gerrit.ovirt.org/18381
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25f978a42b78a1e82f46c3a1a8ca2964ab38e631
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list