From 41fe8530d1c1c83e1db207dae2f0be83e7426ce9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 3 Sep 2004 23:55:25 +0000 Subject: 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 --- src/StatWindow.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/StatWindow.cc') 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::RefPtrget_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; -- cgit