Bug 83229

Summary: Patch: Do not instantiate cardwidget, devicewidget and rolewidget with a type of EventBox
Product: PulseAudio Reporter: Hans de Goede <jwrdegoede>
Component: pavucontrolAssignee: pulseaudio-bugs
Status: RESOLVED FIXED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: [PATCH] Do not instantiate cardwidget, devicewidget and rolewidget with a type of EventBox

Description Hans de Goede 2014-08-29 07:50:23 UTC
Created attachment 105412 [details]
[PATCH] 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).
Comment 1 Tanu Kaskinen 2014-09-07 10:59:41 UTC
Thanks! I applied the patch now.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.