Skip to content

Clean up the GtkComposeTable api

Matthias Clasen requested to merge wip/compose-parser into master

Keep the list of composetables private to GtkIMContextSimple and just have an api that creates new GtkComposeTables, either from a file or from data.

Handle includes in Compose files, and interpret %L to mean the builtin sequences.

Implement the semantics of Compose files more properly: later entries replace earlier ones (for identical sequences).

Interpret an empty string as value to mean: Remove this sequence.

Make a Compose file we find in ~/.config/gtk-4.0 replace the builtin sequences, so that there is only one table we use (unless tables are added programmatically).

Redo the builtin table handling by using the compact format for all tables.


The one change here that has noticable user impact is the 'single table' one: If you previously used a Compose file to add a few sequences in addition to the builtin ones, you now need to add include "%L" to your Compose file, since it will replace the builtin table.

I've added code now that adds include "%L" to the users Compose file when it looks like it was written before 4.4 and does not have an include line.

Edited by Matthias Clasen

Merge request reports