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:
- garcon: garcon!4 (merged)
- xfce4-session: xfce4-session!4 (merged)
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:
- xfce4-panel: xfce4-panel!6 (merged)
- thunar: thunar!23 (closed)
- xfdashboard: apps/xfdashboard!2 (closed)
- xfce4-appfinder: xfce4-appfinder!4 (merged)
- xfce4-whiskermenu-plugin: https://gitlab.xfce.org/Tamaranch/xfce4-whiskermenu-plugin/-/commit/d65c88ae2711caaad345d9a6afdf2180c5633a06
(changes made before the MR was submitted: panel-plugins/xfce4-whiskermenu-plugin@8c645266)
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):
- tumbler: https://gitlab.xfce.org/xfce/tumbler/-/blob/2ec14a83140b23c6069d02074cfc750f191db06a/plugins/desktop-thumbnailer/desktop-thumbnailer.c#L260
- thunar-volman: https://gitlab.xfce.org/xfce/thunar-volman/-/blob/f70cf975729b4abe24bde751bf9d90f915577a1c/thunar-volman/tvm-run.c#L63
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.
Thanks!