System values for panel plugins with Xfconf

Graeme Gott <[email protected]>
Newsgroups gmane.comp.desktop.xfce.devel.version4
Message-ID <[email protected]>
Hi,

I am considering switching Whisker Menu to Xfconf, but one thing I have 
not been able to determine: can panel plugins have general system values?

The simplest way I could find to set system values for a panel plugin in 
Xfconf was to put values under a property with name="plugin-$ID" in the 
file "/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml". But 
that is obviously linked to a specific panel plugin ID, and there isn't 
a way to predict what the plugin ID will be. It also won't work if the 
user adds more than one instance.

The method I settled on instead is a bit of a hack; have a separate 
channel other than the xfce4-panel channel that all plugins use. Use 
this separate channel only for loading the system values at plugin 
start, then disconnect from it and connect to the regular xfce4-pannel 
channel instead. This wouldn't detect any changes to the system values 
until plugin restart, but those are usually set up once at install time.

This separate channel would be used by distributions to preconfigure 
Whisker Menu instances. That is better than making them patch Whisker 
Menu to change the default values, which is what they did before I added 
support for the "defaults.rc" file.

I suppose I could just keep loading the file "defaults.rc" before 
anything else. The code for reading from RC files would have to stay 
around indefinitely anyway for migrating users to Xfconf, but it just 
feels cleaner if I can use Xfconf for both the user settings and the 
system values. Especially when I add new settings--I would want them to 
be only in Xfconf.

I want to make sure that I'm not missing something and that the separate 
channel is actually necessary.

Cheers,
Graeme

_______________________________________________
Xfce4-dev mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-dev
OpenPGP_signature (application/pgp-signature, 840 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.