diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-09-03 23:55:25 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-09-03 23:55:25 +0000 |
commit | 41fe8530d1c1c83e1db207dae2f0be83e7426ce9 (patch) | |
tree | d705ea490b2927ad5f61d424028def22289e5b9a /src/SampleWindow.cc | |
parent | 2b3c1967c118346c1d73491877cc346e142191e3 (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/SampleWindow.cc')
-rw-r--r-- | src/SampleWindow.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/SampleWindow.cc b/src/SampleWindow.cc index b1ea149..5b254f0 100644 --- a/src/SampleWindow.cc +++ b/src/SampleWindow.cc @@ -11,6 +11,7 @@ SampleWindow::SampleWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Gl indexLabel(NULL), volumeLabel(NULL), sampleTypeLabel(NULL), + sizeLabel(NULL), durationLabel(NULL), closeButton(NULL) { @@ -19,6 +20,7 @@ SampleWindow::SampleWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Gl refGlade->get_widget("volumeLabel", volumeLabel); refGlade->get_widget("sampleTypeLabel", sampleTypeLabel); refGlade->get_widget("durationLabel", durationLabel); + refGlade->get_widget("sizeLabel", sizeLabel); refGlade->get_widget("closeButton", closeButton); closeButton->signal_clicked().connect(sigc::mem_fun(*this, &SampleWindow::onCloseButton)); @@ -32,7 +34,7 @@ SampleWindow* SampleWindow::create() { } void SampleWindow::updateInfo(const SampleInfo &i) { - char t[20], ss[PA_SAMPLE_SNPRINT_MAX_LENGTH]; + char t[60], ss[PA_SAMPLE_SNPRINT_MAX_LENGTH]; nameLabel->set_text(i.name); snprintf(t, sizeof(t), "#%u", i.index); @@ -46,6 +48,9 @@ void SampleWindow::updateInfo(const SampleInfo &i) { snprintf(t, sizeof(t), "%0.1fs", (double) i.duration/1000000); durationLabel->set_text(t); + + pa_bytes_snprint(t, sizeof(t), i.bytes); + sizeLabel->set_text(t); set_title("Sample: "+i.name); } |