GNOME Bugzilla – Bug 674111
Provide an accessor for MimeType desktop entry key
Last modified: 2012-05-16 10:44:33 UTC
To be used by control center's system info panel (bug 674084).
Created attachment 212052 [details] [review] GDesktopAppInfo: add a mechanism to query supported mime types Add an accessor for the MimeType field in desktop files, to retrieve the list of all mime types supported by an application.
Review of attachment 212052 [details] [review]: If the existing GAppInfo machinery for dealing with content types is not sufficient for this, that is the level where this functionality needs to be added
It needs to deal with "content-types" at the GAppInfo level, and should use "type" as the name in function names. For example: g_app_info_get_supported_types (GAppInfo *appinfo);
Created attachment 213061 [details] [review] GAppInfo: add a mechanism to query supported content types This essentially adds an accessor for the MimeType field in desktop files, to retrieve the list of all mime types supported by an application. The interface though is part of GAppInfo, so it could be implemented in the future by other backends. Here you are. I explicitly don't want mimeapps.list to be in the round, otherwise if you by chance or by mistake assign a type to an app, it ends as "supported" forever.
Review of attachment 213061 [details] [review]: Please add the new function to gio.symbols and docs/reference/gio/gio-sections.txt ::: gio/gappinfo.c @@ +465,3 @@ + * Retrieves the list of content types that @app_info claims to support. + * If this information is provided by the environment, this function will + * return NULL. I think you meant 'is _not_ provided' ? And %NULL, please ::: gio/gdesktopappinfo.c @@ +2632,3 @@ + + return (const char* const*) info->mime_types; +} This one is no longer needed.
Created attachment 214111 [details] [review] GAppInfo: add a mechanism to query supported content types This essentially adds an accessor for the MimeType field in desktop files, to retrieve the list of all mime types supported by an application. The interface though is part of GAppInfo, so it could be implemented in the future by other backends.
Review of attachment 214111 [details] [review]: Looks good now
Attachment 214111 [details] pushed as 0417dda - GAppInfo: add a mechanism to query supported content types