Skip to content

Complete the field codes expansion

This completes !1 (merged), by adding the expansion of field codes %f, %F, %u and %U, using the code of xfce4-panel/plugins/launcher/launcher.c:launcher_plugin_exec_parse().

This changes the API, so garcon and xfce4-session that use it (see garcon!3 (merged) and xfce4-session!2 (merged)) will need to be updated (as well as this pending MR: xfce4-settings!15 (merged)).
These are straightforward changes, but I have already prepared them, so you can take a look at them if you want:

To avoid this kind of inconvenience with future MR and be sure that the API is now well defined (although the whole specification is now covered), I did a complete tour of xfce code to find all occurrences of field codes expansion.
I have already prepared the corresponding MR to make sure (as much as possible) there was no problem:

I also renamed xfce_expand_field_codes() to xfce_expand_desktop_entry_field_codes(), to avoid future conflicts with other potential field codes expansion functions, like the ones that could be written from these codes (or any other):

Finally, to avoid also future conflicts, I renamed STR_IS_EMPTY() to xfce_str_is_empty() and redefined it as a static inline function, following a suggestion from @matt on the mailing list.
I didn't add it to the doc, since it is not to be added to the symbols list: @ochosi, please, tell me if I was wrong.

Edited by Gaël Bonithon

Merge request reports