summaryrefslogtreecommitdiffstats
path: root/src/SampleWindow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/SampleWindow.cc')
-rw-r--r--src/SampleWindow.cc7
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);
}