! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-mount-plugin-1.1.0 takes all rows of the panel
Status:
RESOLVED: FIXED
Product:
Xfce4-mount-plugin
Component:
General

Comments

Description MaciekM 2017-02-19 00:29:58 CET
Created attachment 7008 
Screenshots of xfce4-mount-plugin-0.6.7 and xfce4-mount-plugin-1.1.0

After upgrading from v0.6.7 to v1.1.0, the mount plugin takes the whole panel size (size of all rows), as shown on the attached screenshot. 
I compared the sources and found the line 
    xfce_panel_plugin_set_small (plugin, TRUE);
was changed to
    xfce_panel_plugin_set_small (plugin, FALSE);

As mentioned on the page:
https://wiki.xfce.org/dev/hig/panel-plugins
"plugins should set the small property (using xfce_panel_plugin_set_small()) only if they are intended to render on a single row, and not in deskbar mode."

I am not a SW developer, but looking at the code of another plugin, I replaced:
    xfce_panel_plugin_set_small (plugin, FALSE);
with the following:
    if (xfce_panel_plugin_get_mode(plugin) == XFCE_PANEL_PLUGIN_MODE_DESKBAR)
        xfce_panel_plugin_set_small(plugin, FALSE);
    else
        xfce_panel_plugin_set_small(plugin, TRUE);

It seems to work correctly now, the plugin takes space on one row only. But I can't tell if the change has side effects.
Comment 1 Fabian Nowak editbugs 2017-02-19 13:54:03 CET
Thanks for the hint. I wouldn't call the current behaviour "incorrect" and the one created by you "correct". 

As a maintainer of a plugin that has more than 10 years of age, you don't check the HIGs very frequently. Apart from that, many of the documentation is umaintained, out of date, incomplete, and there even has been a request for development guidelines on the mailing list recently. The row feature is rather new in comparison to the plugin itself.

There hasn't been any other feedback apart from yours concerning the expansion over several rows. From the provided screenshot, however, it really seems more appropriate to not expand the entire panel over all rows (or columns in vertical mode). From the cited documentation, it is rather the oppposite: "set to small if in single row", and it is curently not set to small, but apears as a single row. Maybe the API and/or documentation is broken there as well? IIRC I even checked the cited documentation and for that reason changed the argument in set_small to what it is now.

With the mode checks, the plugin might indeed break compatibility with older panel versions; however, to the best of my knowledge GTK3 support as required by the new mount plugin version is not available for older panels. Hence, the mode checks are not expected to bring in any side effects.

Fixed in released version 1.1.1.
Comment 2 MaciekM 2017-02-21 18:38:42 CET
Sorry for the late replay.
I agree that it's subjective which way is better. That's why some plugins provide an option, named "Use a single panel row" or "Keep compact".
However, the fixed version 1.1.1 works for me. And it's already in Arch: https://www.archlinux.org/packages/extra/x86_64/xfce4-mount-plugin/
Thanks.

Bug #13366

Reported by:
MaciekM
Reported on: 2017-02-19
Last modified on: 2017-02-21

People

Assignee:
Fabian Nowak
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information