What better way to start a new year than with a release? 🙂

xfce4-panel 4.13.4

After patching up xfce4-settings and finishing the “primary display” story with the patches against xfdesktop I decided to turn to the panel and continue making it 4.14-ready. Next stop: xfce4-panel 4.13.4.

New plugin icon size feature (plugin devs continue reading)

A few things had bugged me there for a while, for one the lack of consistent icon sizing. What the new “icon size” property I implemented gives you is a way to set one icon size per panel instance, so you can have e.g. a 60px panel with 48px icons, or a 32px panel with 16px icons (which gives the icons more padding/breathing room visually). If you set icon sizing to “automatic” (the default value) the panel will try to calculate meaningful sizes for your icons based on the panel size, as before.

So while the panel’s API call xfce_panel_plugin_get_icon_size has been around for a while in the 4.13 cycle, I extended this now to also handle fixed sizes set by the user per panel instance.

I highly encourage every plugin developer/maintainer to use the API call mentioned above in their panel instead of custom size calculations, as it will lead to consistent sizing of all panel plugins per panel.

You can find examples of its usage here (panel core plugin) and here (external plugin).

The logic is always the same:

1) Connect to the size-changed signal

2) Get the icon size with xfce_panel_plugin_get_icon_size

3) Set the plugin’s icon with gtk_image_set_pixel_size

Correct menu positioning (again, plugin devs please read)

Luckily I’m not the only one currently hacking away on the panel. So another thing Alistair was fixing is the menu positioning on the panel’s core plugins. This is however a fix that all plugin developers/maintainers should pull in against their plugin. It leads to consistent positioning of the plugin menus in general and in overflow situations. You can find a good example for the correct usage of gtk_menu_popup_at_widget (which is used for showing plugin and other menus) here.

Tasklist fixes

After deciding to use the panel’s “Window Buttons” (aka “tasklist”) plugin more to test its stability I managed to fix a few bugs in window grouping. For instance the buttons of grouped windows now support the “active”, “minimized” and “urgent/blinking” states and are consequently more consistent with ungrouped buttons.

I also dug a little into libwnck – which we rely on for the app icons and the grouping in tasklist – and was able to get us high resolution application icons. While it worked fine for a single panel instance or for multiple tasklist instances with the same icon sizes, adding multiple tasklist plugins with different icon sizes led libwnck into a signal loop. Due to this unfortunate bug (or: mis-implementation) I had to revert this commit/feature. Ultimately the issue has to be resolved in libwnck – or alternatively we may come up with a separate tasklist-based plugin that relies on bamf instead of libwnck (future plan).

Small theming updates

Apart from the things mentioned above, I have also introduced some new CSS style classes which can be used by themes/themers.

To be more concrete, for orientation-specific theming (e.g. margins or paddings) you can now use .xfce4-panel.horizontal and .xfce4-panel.vertical.

For the tasklist I have introduced a group-buttons class which you can use to visually distinguish single-window buttons from group-buttons. This is useful as the behavior of those two buttons is different (group buttons pop up a menu with all associated windows, single-window buttons focus the window in question).

Lots of deprecation, bug fixes and translation updates

Finally, we also managed to fix a lot of bugs and deprecations in the code (thanks Alistair!).

Get it while it’s hot!

https://git.xfce.org/xfce/xfce4-panel/tag/?h=xfce4-panel-4.13.4