mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-28 00:16:15 +01:00
5ca9eca632
The X-Flatpak-RenamedFrom key is used in .desktop files to identify past names for the desktop file. It is defined to be a list of strings. However, there was previously no correct way to retrieve a list of strings from the GKeyFile wrapped by GDesktopAppInfo, short of re-parsing the file with GKeyFile. Note that doing something like: g_strsplit (g_desktop_app_info_get_string (...), ";", -1) is not correct: the raw value "a\;b;" represents the one-element list ["a;b"], but g_key_file_get_string() rejects the sequence "\;", and so g_desktop_app_info_get_string() returns NULL in this case. (Of course, a .desktop file with a semicolon in its name is a pathological case.) Add g_desktop_app_info_get_string_list(), a trivial wrapper around g_key_file_get_string_list(), similar to g_desktop_app_info_get_string() and co. The change from g_key_file_free() to g_key_file_unref() in the test is needed because g_key_file_free() clears the contents of the keyfile. This is fine for all the fields which are eagerly loaded and copied into GDesktopAppInfo, but not when we want to access arbitrary stuff from the keyfile. |
||
---|---|---|
.. | ||
xml | ||
.gitignore | ||
gapplication.xml | ||
gdbus-codegen.xml | ||
gdbus.xml | ||
gio-docs.xml | ||
gio-querymodules.xml | ||
gio-sections.txt | ||
gio.xml | ||
glib-compile-resources.xml | ||
glib-compile-schemas.xml | ||
gresource.xml | ||
gsettings.xml | ||
gvfs-overview.odg | ||
gvfs-overview.png | ||
Makefile.am | ||
menu-example.png | ||
menu-model.png | ||
meson.build | ||
migrating-gconf.xml | ||
migrating-gdbus.xml | ||
migrating-gnome-vfs.xml | ||
migrating-posix.xml | ||
overview.xml | ||
version.xml.in |