Skip to content

Add field codes expansion and related utilities

Related to:
xfce4-session#64 (closed)
xfce4-session!2 (merged)
garcon!3 (merged)

This factorizes the code that expands field codes in command lines coming from .desktop files, according to Freedesktop.org specifications.

At the moment, this code only appears in garcon/garcon-gtk/garcon-gtk-menu.c, but I call it also in xfce4-session!2 (merged), to fix xfce4-session#64 (closed).
On the other hand, garcon!3 (merged) replaces it by a call to xfce_expand_field_codes() in garcon/garcon-gtk/garcon-gtk-menu.c.

NB: The function xfce_append_quoted() (added in this MR) appears at least in another place in XFCE code, under the name launcher_plugin_exec_append_quoted(), in xfce4-panel/plugins/launcher/launcher.c.
That's why I also exposed it in libxfce4util/libxfce4util/xfce-miscutils.h, to replace later (in dedicated MR) these occurrences (I did not investigate more than that to find out if there were many others).

The same remark applies to STR_IS_EMPTY(), that appears at least in garcon/garcon-gtk/garcon-gtk-menu.c.

Edited by Gaël Bonithon

Merge request reports

Loading