summaryrefslogtreecommitdiffstats
path: root/src/StatWindow.cc
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-09-03 23:55:25 +0000
committerLennart Poettering <lennart@poettering.net>2004-09-03 23:55:25 +0000
commit41fe8530d1c1c83e1db207dae2f0be83e7426ce9 (patch)
treed705ea490b2927ad5f61d424028def22289e5b9a /src/StatWindow.cc
parent2b3c1967c118346c1d73491877cc346e142191e3 (diff)
show size of sample cache in stat window
show size in sample window git-svn-id: file:///home/lennart/svn/public/paman/trunk@28 cdefa82f-4ce1-0310-97f5-ab6066f37c3c
Diffstat (limited to 'src/StatWindow.cc')
-rw-r--r--src/StatWindow.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/StatWindow.cc b/src/StatWindow.cc
index 7adb752..6e0c4b8 100644
--- a/src/StatWindow.cc
+++ b/src/StatWindow.cc
@@ -9,6 +9,7 @@ StatWindow::StatWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
totalSizeLabel(NULL),
allocatedLabel(NULL),
allocatedSizeLabel(NULL),
+ sampleCacheLabel(NULL),
closeButton(NULL),
refreshButton(NULL),
operation(NULL) {
@@ -17,6 +18,7 @@ StatWindow::StatWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
refGlade->get_widget("totalSizeLabel", totalSizeLabel);
refGlade->get_widget("allocatedLabel", allocatedLabel);
refGlade->get_widget("allocatedSizeLabel", allocatedSizeLabel);
+ refGlade->get_widget("sampleCacheLabel", sampleCacheLabel);
refGlade->get_widget("closeButton", closeButton);
refGlade->get_widget("refreshButton", refreshButton);
@@ -51,12 +53,14 @@ static void stat_cb(struct pa_context *c, const struct pa_stat_info *i, void *us
snprintf(t, sizeof(t), "%u", i->memblock_total);
s->totalLabel->set_text(t);
- snprintf(t, sizeof(t), "%u bytes", i->memblock_total_size);
+ pa_bytes_snprint(t, sizeof(t), i->memblock_total_size);
s->totalSizeLabel->set_text(t);
snprintf(t, sizeof(t), "%u", i->memblock_allocated);
s->allocatedLabel->set_text(t);
- snprintf(t, sizeof(t), "%u bytes", i->memblock_allocated_size);
+ pa_bytes_snprint(t, sizeof(t), i->memblock_allocated_size);
s->allocatedSizeLabel->set_text(t);
+ pa_bytes_snprint(t, sizeof(t), i->scache_size);
+ s->sampleCacheLabel->set_text(t);
pa_operation_unref(s->operation);
s->operation = NULL;