mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 12:41:50 +01:00
GDesktopAppInfo: Add g_desktop_app_info_get_nodisplay
Necessary for rebasing gnome-menus on top of GDesktopAppInfo. https://bugzilla.gnome.org/show_bug.cgi?id=652385
This commit is contained in:
parent
9a9cca9764
commit
86ffdf5570
@ -673,6 +673,24 @@ g_desktop_app_info_get_generic_name (GDesktopAppInfo *info)
|
||||
return info->generic_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* g_desktop_app_info_get_nodisplay:
|
||||
* @info: a #GDesktopAppInfo
|
||||
*
|
||||
* Gets the value of the NoDisplay key, which helps determine if the
|
||||
* application info should be shown in menus. See
|
||||
* #G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY and g_app_info_should_show().
|
||||
*
|
||||
* Returns: The value of the NoDisplay key
|
||||
*
|
||||
* Since: 2.30
|
||||
*/
|
||||
const char *
|
||||
g_desktop_app_info_get_nodisplay (GDesktopAppInfo *info)
|
||||
{
|
||||
return info->nodisplay;
|
||||
}
|
||||
|
||||
static char *
|
||||
expand_macro_single (char macro, char *uri)
|
||||
{
|
||||
@ -1926,6 +1944,9 @@ g_desktop_app_info_ensure_saved (GDesktopAppInfo *info,
|
||||
if (info->terminal)
|
||||
g_key_file_set_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP,
|
||||
G_KEY_FILE_DESKTOP_KEY_TERMINAL, TRUE);
|
||||
if (info->nodisplay)
|
||||
g_key_file_set_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP,
|
||||
G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY, TRUE);
|
||||
|
||||
g_key_file_set_string (key_file, G_KEY_FILE_DESKTOP_GROUP,
|
||||
G_KEY_FILE_DESKTOP_KEY_EXEC, info->exec);
|
||||
|
@ -52,6 +52,7 @@ const char * g_desktop_app_info_get_filename (GDesktopAppInfo *info);
|
||||
|
||||
const char * g_desktop_app_info_get_generic_name (GDesktopAppInfo *info);
|
||||
const char * g_desktop_app_info_get_categories (GDesktopAppInfo *info);
|
||||
gbooolean g_desktop_app_info_get_nodisplay (GDesktopAppInfo *info);
|
||||
|
||||
GDesktopAppInfo *g_desktop_app_info_new (const char *desktop_id);
|
||||
gboolean g_desktop_app_info_get_is_hidden (GDesktopAppInfo *info);
|
||||
|
Loading…
Reference in New Issue
Block a user