Re: System values for panel plugins with Xfconf
Matias De lellis <[email protected]>
| Newsgroups | gmane.comp.desktop.xfce.devel.version4 |
|---|---|
| Message-ID | <CAHACWt_R-A8WNiQ_9U8On4i3DCSr+oLK3TDYqGS2h8Rjz_jHBA@mail.gmail.com> |
Hi Graeme, Sorry for the great offtopic and not answering your question. :) > But how are the distros able to ship defaults for the plugins? In principle, if you don't allow multiple instances of the plugin, you could use a custom channel like xfce4-clipman (xfce4-panel/plugins/clipman) does, but if maintain multiple instances is a priority, I understand as you do that there is nothing to do it easy.. :S Distribution maintainers can set the entire panel by default, including plugin settings, since they know exactly which channel corresponds to each plugin (Maybe see xfce4-panel-profiles), but as you say, the configuration of multiple instances, they cannot set default options for new instances of a plugin. The only thing I can think is maintain two channels, one for each instance of the plugin (xfce4-panel/plugins/plugin-#/*), and another as fallback (xfce4-panel/plugins/default/whisker/*). I think there are plugins that do fallbacks to rc files as you suggested. Hope it helps, Regards, Matias El vie, 22 oct 2021 a las 9:49, Graeme Gott (<[email protected]>) escribió: > > Setting defaults/fallbacks in the plugin itself in combination with > distros > > being able to ship defaults so far covered all of my use cases. > > > > Happy to hear though if there are shortcomings! > > But how are the distros able to ship defaults for the plugins? That's > where I'm getting lost. The way Xfconf handles setting system values > works great for setting defaults for Thunar, Ristretto, etc, since they > all have their own XML file to populate. > > All panel plugins share the same channel. They are all stored in the > xfce4-panel.xml file together, and are only identified by plugin ID. It > becomes part of their property names (since their real properties are > things like "/plugins/plugin-1/favorites" and not just "/favorites"). > But the plugin ID can be anything! > > For example, if the distro assumes Whisker Menu is plugin ID 1, then the > defaults won't be loaded if the user adds a second Whisker Menu. They > also won't be loaded if the user removes Whisker Menu, adds something > else, and then changes their mind and adds Whisker Menu back. It won't > have ID 1 anymore. The plugin will be looking at some other > "/plugins/plugin-$ID/favorites" property instead. > > Is there some mechanism in the Xfconf defaults I'm missing? Some way the > panel handles translating the defaults to some other property path to > share among instances of the same plugin type? > > Cheers, > Graeme > _______________________________________________ > Xfce4-dev mailing list > [email protected] > https://mail.xfce.org/mailman/listinfo/xfce4-dev _______________________________________________ Xfce4-dev mailing list [email protected] https://mail.xfce.org/mailman/listinfo/xfce4-dev