GNOME Bugzilla – Bug 655044
GDesktopAppInfo: Add g_desktop_app_info_get_show_in()
Last modified: 2011-07-23 08:05:59 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.
Created attachment 192373 [details] [review] GDesktopAppInfo: Add g_desktop_app_info_get_show_in() Necessary for rebasing gnome-menus on top of GDesktopAppInfo.
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.
Created attachment 192439 [details] [review] GDesktopAppInfo: Add g_desktop_app_info_get_show_in() Updated with Matthias' suggestions.
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...
Thanks, pushed. I also updated gio.symbols and gio-sections.txt.