<div dir="ltr"><div>Hi!</div><div><br></div><div>I would suggest continuing this conversation either in a GitLab issue or merge request (<a href="https://gitlab.xfce.org/panel-plugins/xfce4-pulseaudio-plugin/-/issues">https://gitlab.xfce.org/panel-plugins/xfce4-pulseaudio-plugin/-/issues</a>).</div><div><br></div><div>I've given you fork rights on <a href="http://gitlab.xfce.org">gitlab.xfce.org</a> so you can create a merge request.</div><div><br></div><div>Cheers</div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 5, 2022 at 9:14 AM Sparr <<a href="mailto:sparr0@gmail.com">sparr0@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello. This is my first post to the list, and my first time attempting<br>
to do development related to Xfce. For my first foray into the<br>
codebase, I am trying to implement a new feature in<br>
xfce4-pulseaudio-plugin, the panel plugin that commonly provides<br>
volume indication and control.<br>
<br>
My new feature will allow the user to configure the behavior when the<br>
panel icon is middle clicked. Specifically, instead of the current<br>
behavior of toggling the volume mute, I want to cycle through output<br>
devices. I was able to get that specific functionality working without<br>
much trouble, and while I would be open to code review now, I expect<br>
I'll get plenty of feedback on that when I have this all ready to<br>
submit a patch.<br>
<br>
Here's the code I have so far. The link goes directly to a problematic<br>
location, but the previous two commits cover all the code changes I've<br>
made so far. <a href="https://github.com/sparr/xfce4-pulseaudio-plugin/blob/8a8dc20f300ed86ed3abeb8b66b86fe9870b621c/panel-plugin/pulseaudio-dialog.c#L291" rel="noreferrer" target="_blank">https://github.com/sparr/xfce4-pulseaudio-plugin/blob/8a8dc20f300ed86ed3abeb8b66b86fe9870b621c/panel-plugin/pulseaudio-dialog.c#L291</a><br>
<br>
Where I've hit a roadblock is in trying to add a configuration<br>
property to choose between the two behaviors, and present that in the<br>
panel properties GUI. I chose to present the choices as radio buttons,<br>
although I understand that a menu or radiomenu could also work. I can<br>
see and interact with the radio buttons, but when I select them I see<br>
an error in the panel output:<br>
"(wrapper-2.0:492812): xfconf-CRITICAL **: 01:11:14.622:<br>
IA__xfconf_channel_set_property: assertion 'XFCONF_IS_CHANNEL(channel)<br>
&& property && G_IS_VALUE(value)' failed". I also note that<br>
xfconf-query does not show the existence of the new property<br>
("middle-click-action"). So, my first request for assistance is in<br>
figuring out what I've done wrong such that the property isn't being<br>
created or updated.<br>
<br>
My second concern is regarding the very brute force approach I've<br>
taken to the GBinding between the radio buttons and the enum property.<br>
I wasn't able to find an example of binding multiple UI elements to<br>
the same property. It feels like there should be a straightforward way<br>
to bind radio buttons to an enum, or checkbuttons to flags. I would<br>
appreciate any guidance on this front, although I suspect I can do<br>
better on my own if I spend some time building a custom binding<br>
implementation.<br>
<br>
Thanks in advance for any help!<br>
_______________________________________________<br>
Xfce4-dev mailing list<br>
<a href="mailto:Xfce4-dev@xfce.org" target="_blank">Xfce4-dev@xfce.org</a><br>
<a href="https://mail.xfce.org/mailman/listinfo/xfce4-dev" rel="noreferrer" target="_blank">https://mail.xfce.org/mailman/listinfo/xfce4-dev</a></blockquote></div>