After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 652385 - GDesktopAppInfo: Add g_desktop_app_info_get_nodisplay
GDesktopAppInfo: Add g_desktop_app_info_get_nodisplay
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-06-12 10:24 UTC by Vincent Untz
Modified: 2011-06-14 06:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GDesktopAppInfo: Add g_desktop_app_info_get_nodisplay (2.30 KB, patch)
2011-06-12 10:24 UTC, Vincent Untz
reviewed Details | Review

Description Vincent Untz 2011-06-12 10:24:57 UTC
We need this to fully rebase gnome-menus on top of GDesktopAppInfo (bug 647968).
Comment 1 Vincent Untz 2011-06-12 10:24:59 UTC
Created attachment 189757 [details] [review]
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=647967
Comment 2 Matthias Clasen 2011-06-13 01:50:07 UTC
Review of attachment 189757 [details] [review]:

I

::: gio/gdesktopappinfo.c
@@ +684,3 @@
+ *
+ * Since: 2.30
+ */

It seems a little dubious that the docs for this function say exactly the same as the docs for g_app_info_should_show(), even though the functions don't do the same thing...
Comment 3 Vincent Untz 2011-06-13 09:05:21 UTC
Hrm, true. What about: "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()."
Comment 4 Matthias Clasen 2011-06-13 22:25:29 UTC
Yes, thats better. Feel free to commit it with that change.
Still wondering if just adding an escape hatch like

gchar * g_desktop_app_info_get_key (GDesktopAppInfo *info, const gchar *key)

would be easier, rather than adding more and more getters one-by-one
Comment 5 Vincent Untz 2011-06-14 06:56:21 UTC
Thanks, pushed.

(In reply to comment #4)
> Still wondering if just adding an escape hatch like
> 
> gchar * g_desktop_app_info_get_key (GDesktopAppInfo *info, const gchar *key)
> 
> would be easier, rather than adding more and more getters one-by-one

That'd imply keeping the keyfile around (or at least the hash table of keys), which we don't do right now. But that might make sense, yes.