glib/docs/reference/gio
Will Thompson 5ca9eca632 gdesktopappinfo: add get_string_list() function
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.
2018-10-01 20:03:55 +01:00
..
xml docs: Change Bugzilla references to GitLab 2018-06-15 13:04:39 +01:00
.gitignore .gitignore updates for gsettings stuff 2010-04-27 17:04:57 -04:00
gapplication.xml New gapplication(1) tool 2013-10-17 10:12:27 -04:00
gdbus-codegen.xml docs: Change Bugzilla references to GitLab 2018-06-15 13:04:39 +01:00
gdbus.xml docs: Change Bugzilla references to GitLab 2018-06-15 13:04:39 +01:00
gio-docs.xml docs: Split GSocketConnectable/GProxyAddressEnumerator documentation 2017-12-12 11:42:45 +00:00
gio-querymodules.xml docs: Improve man page consistency 2012-08-03 23:36:45 -04:00
gio-sections.txt gdesktopappinfo: add get_string_list() function 2018-10-01 20:03:55 +01:00
gio.xml Add support for TCRYPT volumes to GMountOperation 2018-06-21 15:32:04 +02:00
glib-compile-resources.xml docs: Use appropriate tags for commands 2018-03-14 14:09:24 +00:00
glib-compile-schemas.xml glib-compile-schemas: Add a --version option 2016-10-06 21:08:25 +01:00
gresource.xml gresource: fix documentation typo 2017-08-22 08:58:56 +01:00
gsettings.xml Add ‘gsettings list-schemas --print-paths’ option 2018-01-05 13:01:03 +00:00
gvfs-overview.odg update the overview image of the gio docs 2009-06-08 17:29:22 +02:00
gvfs-overview.png update the overview image of the gio docs 2009-06-08 17:29:22 +02:00
Makefile.am docs: Don’t distribute generated man pages 2018-07-30 20:04:13 +01:00
menu-example.png Add GMenuModel 2011-12-08 18:05:12 -05:00
menu-model.png Add GMenuModel 2011-12-08 18:05:12 -05:00
meson.build doc: Remove gio.types since gtkdoc-scan rebuild it anyway 2018-06-28 09:55:56 -04:00
migrating-gconf.xml Drop a broken link 2013-01-01 10:25:07 -05:00
migrating-gdbus.xml docs: trivial typo fixes 2016-07-16 20:32:16 -04:00
migrating-gnome-vfs.xml docs: Change Bugzilla references to GitLab 2018-06-15 13:04:39 +01:00
migrating-posix.xml Remove duplicate copies of migration docs 2010-05-27 13:07:54 -04:00
overview.xml Trivial: documentation wording fix 2016-06-30 08:58:41 -04:00
version.xml.in gio/ docs/reference/gio Merged gio-standalone into glib. 2007-11-26 16:13:05 +00:00