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 655044 - GDesktopAppInfo: Add g_desktop_app_info_get_show_in()
GDesktopAppInfo: Add g_desktop_app_info_get_show_in()
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 647968
 
 
Reported: 2011-07-21 13:25 UTC by Vincent Untz
Modified: 2011-07-23 08:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GDesktopAppInfo: Add g_desktop_app_info_get_show_in() (4.50 KB, patch)
2011-07-21 13:25 UTC, Vincent Untz
reviewed Details | Review
GDesktopAppInfo: Add g_desktop_app_info_get_show_in() (5.15 KB, patch)
2011-07-22 07:08 UTC, Vincent Untz
committed Details | Review

Description Vincent Untz 2011-07-21 13:25:24 UTC
This is the last bit we need before we can merge the new gnome-menus branch (from bug 647968).

FWIW, I decided to not enforce the use of the global g_desktop_env in the API, since there might be some needs where a user of gio could want to choose different values for OnlyShowIn/NotShowIn (I could imagine a menu editor, showing the differences between desktops). But by default (if desktop_env is NULL), g_desktop_env is still used.
Comment 1 Vincent Untz 2011-07-21 13:25:27 UTC
Created attachment 192373 [details] [review]
GDesktopAppInfo: Add g_desktop_app_info_get_show_in()

Necessary for rebasing gnome-menus on top of GDesktopAppInfo.
Comment 2 Matthias Clasen 2011-07-21 20:09:18 UTC
Review of attachment 192373 [details] [review]:

::: gio/gdesktopappinfo.c
@@ +707,3 @@
+ * Returns: Whether the application is visible in @desktop_env
+ *
+ * Since: 2.30

I think we probably want to reuse the language from the the g_app_info_should_show() docs: 'should be shown in menus' instead of 'is visible'. And 'name of the desktop' instead of 'desktop environment'.

You will also want to make some updates to the docs of g_desktop_app_info_set_desktop_env(), maybe.
Comment 3 Vincent Untz 2011-07-22 07:08:33 UTC
Created attachment 192439 [details] [review]
GDesktopAppInfo: Add g_desktop_app_info_get_show_in()

Updated with Matthias' suggestions.
Comment 4 Matthias Clasen 2011-07-22 20:55:50 UTC
Review of attachment 192439 [details] [review]:

Looks ok now. I'm not super-thrilled about adding more api to support the misfeature that is OnlyShowIn/NotShowIn, but the greater good (of porting libgnome-menus) wins here...
Comment 5 Vincent Untz 2011-07-23 08:05:54 UTC
Thanks, pushed. I also updated gio.symbols and gio-sections.txt.