Package: pavucontrol / 2.0-3

Metadata

Package Version Patches format
pavucontrol 2.0-3 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
0001 Don t crash if pa_stream_peek returns NULL.patch | (download)

src/mainwindow.cc | 5 5 + 0 - 0 !
1 file changed, 5 insertions(+)

 don't crash if pa_stream_peek returns null


0003 Reference the widget before returning it from create.patch | (download)

src/cardwidget.cc | 1 1 + 0 - 0 !
src/channelwidget.cc | 1 1 + 0 - 0 !
src/devicewidget.cc | 1 1 + 0 - 0 !
src/mainwindow.cc | 6 6 + 0 - 0 !
src/rolewidget.cc | 1 1 + 0 - 0 !
src/sinkinputwidget.cc | 1 1 + 0 - 0 !
src/sinkwidget.cc | 1 1 + 0 - 0 !
src/sourceoutputwidget.cc | 1 1 + 0 - 0 !
src/sourcewidget.cc | 1 1 + 0 - 0 !
src/streamwidget.cc | 1 1 + 0 - 0 !
10 files changed, 15 insertions(+)

 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>

0004 Do not instantiate cardwidget devicewidget and rolew.patch | (download)

src/pavucontrol.glade | 12 6 + 6 - 0 !
1 file changed, 6 insertions(+), 6 deletions(-)

 do not instantiate cardwidget,
 devicewidget and rolewidget with a type of EventBox

RoleWidget::create contains:
    x->get_widget_derived("streamWidget", w);

But streamWidget is defined as following in the glade file:
<object class="GtkEventBox" id="streamWidget">

Where as RoleWidget is derived from [Minimal]StreamWidget, which is derived
from Gtk::VBox, so this is clearly wrong.

Adding:
printf("rolewidget type: %s\n", g_type_name(G_TYPE_FROM_INSTANCE(w->gobj())));
for debugging shows that this really leads to RoleWidget being instantiated
as an EventBox (yet things still work due to sheer luck).

This commit fixes this, by putting the streamWidget id at the right level of
the hierarchy in the glade file (and likewise for cardWidget and deviceWidget).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>

0005 pavucontrol Handle IO errors in icon setting code.patch | (download)

src/mainwindow.cc | 2 2 + 0 - 0 !
1 file changed, 2 insertions(+)

 pavucontrol: handle io errors in icon setting code

If gtk cannot load the file, it will throw a Gio::Error. In that case
fall back to setting the name.