gdesktopappinfo: Add g_desktop_app_info_get_locale_string()

Custom desktop file fields may be translated, but there is currently
no non-hacky way to look up the localized value; fill get gap with
a small wrapper around g_key_file_get_locale_string().

https://bugzilla.gnome.org/show_bug.cgi?id=779413
This commit is contained in:
Florian Müllner
2018-01-07 12:14:46 +01:00
parent 84350cb566
commit a55bfeee41
5 changed files with 54 additions and 0 deletions

View File

@@ -82,6 +82,9 @@ gboolean g_desktop_app_info_has_key (GDesktopAppInfo *info,
GLIB_AVAILABLE_IN_2_36
char * g_desktop_app_info_get_string (GDesktopAppInfo *info,
const char *key);
GLIB_AVAILABLE_IN_2_56
char * g_desktop_app_info_get_locale_string (GDesktopAppInfo *info,
const char *key);
GLIB_AVAILABLE_IN_2_36
gboolean g_desktop_app_info_get_boolean (GDesktopAppInfo *info,
const char *key);