Panel widgets library

Harald Judt h.judt at gmx.at
Sat May 19 11:01:52 CEST 2012


Hi,

Am 19.05.2012 06:24, schrieb Andrzej:
> I've been thinking about what we can do to improve quality and
> portability of panel plugins (which isn't exactly our strongest point).
>
> Here is one idea:
>
> - split libxfce4panel into two libraries:
> 1. libxfce4panel, containing only stuff necessary for talking to the panel,
> 2. libxfce4panel-widgets (pick your name) - containing additional
> panel-related stuff (panel image, hvbox, new widgets[1]) and is portable
> across panel versions.
>
> Reasons:
>
> - Non-core plugins are expected to be portable across Xfce versions. But
> because they depend on libxfce4panel, it is very difficult to add new
> functions this library - any new features have to be used conditionally,
> which requires changing all the plugins.
> - libxfce4panel-widgets could evolve independently from the panel and be
> backward compatible with previous panel/Xfce versions.
> - (why not simply use libxfce4ui) the new library would depend on
> libxfce4panel.
>
> [1] we could for example provide a basic plugin widget, which could be
> inserted in the plugin and handle all the resizing, orientation, HIG
> stuff. Currently plugins are rather buggy and inconsistent in this area.
> Plugins that do this stuff right, reimplement the same functionality
> over and over.
>
> Andrzej

After looking and hacking at various plugins, I can only confirm what 
Andrzej says about consistency and duplication. For example, when 
switching to the vertical mode, how should the plugins behave? 
systemload, netload, cpugraph, diskperf,... some of them handle the 
orientation differently than others. In this mode, some look similar to 
how they're expected to look in deskbar mode (I guess because it's new 
and was not available before and the authors decided this way of 
presentation was better), but some rotate their widgets to the right. 
What if the users expect them to be rotated to the left and arranged 
from the bottom to the top instead of from the top to the bottom? It's 
not supported at the moment and certainly a matter of taste and perhaps 
a bit too wide of scope.

I've seen there are some detailed guidelines at 
http://wiki.xfce.org/dev/hig/panel-plugins, that's already a good start. 
I wonder when those have been published... How about propagating those 
guidelines when you make announcements of a new panel release?

Currently, I wouldn't use the deskbar mode because many plugins I use 
don't handle this new feature correctly. This is unfortunate, because I 
find it really useful on today's widescreen panels. Maybe Andrzej's 
proposal could help here to speed up plugin development and adjustments 
in the future?

Now, since such things are on the table, here is some other idea which I 
thought about a few days ago:

I'm currently trying to improve some panel plugins that I use. Recently 
I've noticed there's a powersaving option in the systemload panel 
plugin, which reduces the plugin update interval when on battery. Now 
that's a good idea for laptop users, and I think it would be consistent 
and more effective if other panel plugins had such an option too.

However in that case I wonder if it wouldn't be better to integrate such 
an option in the panel itself, and make the other plugins read that 
value instead of creating their own widgets. That way, there would be a 
central place for controlling this setting, easy to adjust for the user. 
Additionally, the panel plugins wouldn't need to have their own widgets, 
they only had to implement appropriate upower code to decide aobut the 
appropriate update interval. Maybe that update could even be synchronous 
across all plugins? I don't know if that could be useful, but the 
consideration is wouldn't it be more effective if they all wake up at 
the same time?

In my opinion, many panel plugins could use this:
- systemload-plugin (already has its own option)
- netload-plugin
- diskperf-plugin
- weather-plugin
- wavelan-plugin
- cpugraph-plugin
- ...

What's your opinion on this? Do you think the energy savings would be 
noticeable and worth the effort? If yes, could the option be centralized 
or should the plugins handle it all on their own, like they are left to 
do currently?

Harald

-- 
`Experience is the best teacher.'


More information about the Xfce4-dev mailing list