Commit Graph

14 Commits

Author SHA1 Message Date
Karl Ove Hufthammer ce36a44a1d channelwidget: Make volume strings translatable and add missing space
The volume strings (e.g. ‘86% (-3.81dB)’) shown to the right of each
volume slider is now translatable/localisable. (The similar string
‘100% (0dB)’, centred *below* each slider, was already translatable.)
Also, the English strings now include a space between the decibel value
and the unit, e.g. ‘-3.81 dB’ instead of ‘-3.81dB’.

Fixes: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/issues/52
2019-02-25 18:25:09 +02:00
Hans de Goede b2362f2223 Reference the widget before returning it from ::create methods
Widgets (unlike Windows and Dialogs) returned by Gtk::Builder::get_widget*
start owned by the GtkBuilder object, the idea being that they will get
added to a container before the scope of the GtkBuilder object ends, and it
thus automatically gets destroyed.

But in the various ::create methods in pavucontrol, a pointer to the widget
gets returned, so that it can be added to a cointainer by the caller.
However as soon as the ::create method exits the GtkBuilder object owning
the widget, and thus also the widget gets destroyed, and we end up returning
free-ed memory.

This commit fixes this by making all ::create methods take a reference on
the widget before returning it, and having all the callers unreference the
widget after adding it to a container.

https://bugs.freedesktop.org/show_bug.cgi?id=83144
https://bugzilla.redhat.com/show_bug.cgi?id=1133339

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2014-09-07 13:51:27 +03:00
Colin Guthrie c70b048c98 volume: Don't bother setting the steps.
The number of volume steps doesn't really affect our scale, so there
is little value in setting it.
2011-03-09 21:54:05 +00:00
Colin Guthrie 297af52ae5 volume: Support volumes up to 11.
This allows us to set volumes up to ~153% aka +11dB.

Also show the current dB value in the UI - as pavucontrol is a bit more
developer-friendly than other volume UIs displaying this by default makes
sense.
2011-03-09 21:50:29 +00:00
Rafał Mużyło 9ce0e0a380 Drop the need to use libglademm 2011-03-03 14:31:14 +00:00
Colin Guthrie d4f1a7622b volume: Set the scale properly for delta changes via mouse/keyboard. 2009-10-03 13:09:37 +01:00
Lennart Poettering 8a11d0f781 fix event sound generation for volume changes 2009-08-27 05:41:11 +02:00
Lennart Poettering 5143fa8dae only assume that the minimal volume is silence for devices that can do dB volumes 2009-08-27 05:40:47 +02:00
Colin Guthrie 7b7a12f1d2 Adapt to new UI
The actual wiring up of events and clearing out of old, unused elements is
not complete yet, so this is completely non-functional at present.
2009-06-17 08:54:10 +01:00
Lennart Poettering feff1f6f05 configure steps for scales 2009-03-21 03:49:19 +01:00
Lennart Poettering 7116369503 visualize base volume 2009-03-21 03:27:25 +01:00
Colin Guthrie c6b73de308 Move config.h inclusion to the .cc files 2009-03-18 20:58:17 +00:00
Colin Guthrie a8357b3dc2 Move common setup into a shared header 2009-03-15 13:08:22 +00:00
Colin Guthrie f6af4f80b8 Split channelwidget into separate files. Also separate out the definition of streamwidget into it's own header 2009-03-15 12:54:56 +00:00