panel launcher arrow direction (was: Re: panel issues)

Brian J. Tarricone bjt23 at
Sun Jan 28 03:16:01 CET 2007

Hash: RIPEMD160

Stefan Stuhr wrote:
> søn, 28 01 2007 kl. 05:24 +0400, skrev Sergey Manucharyan:
>> 1) The Panel's "Popup Position" setting have disappeared and never came
>> back. I always set it to "Top" (like in CDE) and found it more
>> "understandable".
> The panel in Xfce 4.4 is new (code-wise, UI-wise and feature-wise). The
> launcher plugin is now separate from the panel code (and binary); as
> such, it can't have a global panel option like the "Popup Position" one
> from Xfce 4.2, it would have to be a per launcher setting.

Actually, the launcher plugin is still an internal shared-library plugin
like it always was.  Either way, the internal/external distinction isn't
really a barrier to a global option since it's perfectly easy to pass
settings between processes using GtkSettings.

> My personal opinion (I'm not an Xfce developer) is that - if this option
> were to be reintroduced in a decent way in Xfce 4.6 - it would require
> the development of a new framework to have global/panel options for
> plugins.

That's a bit over-engineered and unnecessary.  Here are some ideas (cc
- -> xfce4-dev) (Jasper, Nick, I hope you're paying attention ^_^)...

Put a dropdown list in the launcher properties box that has 4 options
for the positions (left, right, top, bottom).  Store the option in a
file (e.g., $XDG_CONFIG_HOME/xfce4/panel/launcher-arrow-position).  All
launchers write to this same location if the setting is changed in any
launcher.  The first launcher that gets instantiated on panel startup
(race condition?  not in this case because the launchers are internal)
reads this file and installs a "xfce-laucher-arrow-position" property in
the per-screen GtkSettings object (it can tell if it's the first by
trying to read this property; if it doesn't exist yet, gtk will give an
error).  All subsequent launchers that load will read this property, and
all launchers watch it for changes.  If it gets changed in one launcher,
all launchers will see it and update.

On the other hand, who's to say a global setting is really the best
idea?  If I have a panel on the top of my screen and one on the bottom,
I'll probably want the arrows on the top panel to be on the bottom, and
the arrows on the bottom panel to be on the top.  Or maybe I like having
the bottom panel as thin as possible, so I'd rather have the arrows on
that panel to the right or left of the launcher button.

So this argues for a per-panel setting, which only requires one
(backward-compatible, non-ABI-breaking) API addition to libxfce4panel: a
way for plugins to figure out which panel they're embedded in (just a
numeric id should suffice, as long as the id is persistent across panel
restarts).  Then you can have a GtkSettings property for each panel:
"xfce-launcher-arrow-position-1" = GTK_SIDE_BOTTOM
"xfce-launcher-arrow-position-2" = GTK_SIDE_TOP
GtkSideType is actually already a gtk-defined type/enum.  Obviously
you'd either have to store these settings in different files, or store
them all in one XfceRc/GKey file (or whatever).

You could also say that it's really fine just having a per-launcher
setting, so each launcher could have its arrow in a different place.
Then you just store the setting in the launcher's own config file.  For
people with a large number of launchers with submenus, this could be an
annoyance, but it's still better than the current (unconfigurable)

Besides, all this would make Joe Klemmer that much happier, and I
challenge anyone to suggest that that's not a good thing!


Version: GnuPG v2.0.1 (GNU/Linux)


More information about the Xfce4-dev mailing list