summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-06-30 15:21:20 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2009-06-30 15:21:20 -0300
commitdefc7d63be7701b956e764e0e4f3ddfb3762950f (patch)
tree516d01e664aa84767e2e1768d0ef5eb00a64d69b
parent5d72a221ae7d231143d63f4f0096db76bdce0a5d (diff)
downloadtuna-defc7d63be7701b956e764e0e4f3ddfb3762950f.tar.gz
cpuview: Fix non multiple of columns case
The last hbox was not being added. I.e. on a 8 socket machine (virtual machine with 8 VCPUs) only the first 6 sockets were being displayed. Reported-by: Mark Wagner <mwagner@redhat.com> Tested-by: Mark Wagner <mwagner@redhat.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tuna/gui/cpuview.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tuna/gui/cpuview.py b/tuna/gui/cpuview.py
index 3a93c62..09b1a8b 100644
--- a/tuna/gui/cpuview.py
+++ b/tuna/gui/cpuview.py
@@ -259,6 +259,7 @@ class cpuview:
columns = math.ceil(math.sqrt(self.nr_sockets))
rows = math.ceil(self.nr_sockets / columns)
box = gtk.HBox()
+ vbox.pack_start(box, True, True)
else:
box = vbox
@@ -271,8 +272,8 @@ class cpuview:
self.socket_frames[socket_id] = frame
if self.nr_sockets > 1:
if column == columns:
- vbox.pack_start(box, True, True)
box = gtk.HBox()
+ vbox.pack_start(box, True, True)
column = 1
else:
column += 1