Re: GnomeVFS API gnome_vfs_mime_get_key_list() problem.
- From: "725eb0c8ef771c09ee" <zjc99 mails tsinghua edu cn>
- To: teuf users sourceforge net;, zjc99 mails tsinghua edu cn
- Cc: gnome-vfs-list gnome org
- Subject: Re: GnomeVFS API gnome_vfs_mime_get_key_list() problem.
- Date: Tue, 13 May 2003 18:20:30 +0800
Christophe,
Thanks for your comments.
I just want to register a new mime-type with attached attributes for an
application. But I'd like to know first what attributes has been registered
for this mime-type.
What confused me is that some .keys files under /usr/share/mime-info
use attributes as:
application/x-gnucash(gnucash.keys)
open=gnucash %f
view=gnucash %f
While other .keys files use attributes as:
application/x-mrproject(mrproject.keys)
description=MrProject project file.
icon_filename=gnome-application-x-mrproject
default_action_type=application
short_list_application_ids=mrproject
short_list_application_ids_for_novice_user_level=mrproject
short_list_application_ids_for_intermediate_user_level=mrproject
short_list_application_ids_for_advanced_user_level=mrproject
category=Documents
Since both the "open", "view" attributes and "default_action_type",...,
attributes could be attached to a specific mime-type, then, generally,
which attributes should be registered for a new application/mime-type.
Thanks.
Daniel Z.
>From: Christophe Fergeau <teuf users sourceforge net>
>Reply-To:
>To: 725eb0c8ef771c09ee <zjc99 mails tsinghua edu cn>
>Subject: Re: GnomeVFS API gnome_vfs_mime_get_key_list() problem.
>
>What are you trying to do exactly ? There are higher level functions in
>gnome-vfs to get the apps able to handle a specific mime-type and things
>like that
>
>Le jeu 08/05/2003 05:23, 725eb0c8ef771c09ee a écrit :
>> 1. It's on function GList* gnome_vfs_mime_get_key_list (const char
*mime_type);
>[...]
>> Then why the result is different. I've also
>> seen that it returns different results with other mime types.
>
>That's surprising that it returns NULL for PostScripts, I'll have to try
>that.
>
>>
>> So, the problem is what exactly this gnome_vfs_mime_get_key_list() should
return?
>>
>> The comments with this function is confusing: return a GList that contains
>> private strings with all of the keys associated with the mime_type.
>>
>
>.keys files define attributes which are attached to a specific mime type
>(the names of these attributes are what you get with
>gnome_vfs_mime_get_key_list). Then, gnome-vfs can get the value of these
>attributes (which is a string) to get some info about this mime type,
>for example a human readable category name for the mime type (eg
>text/plain would belong to the Text Documents category), or a list of
>preferred apps/components to open this mime-type (this is what the
>various short_list attributes are used for). But you'd better avoid
>directly accessing these attributes if possible, and use the higher
>level API instead.
>
>> I'm confused the problems. Any comments and help are appreciated.
>
>Once again, what are you trying to do ? I strongly recommend not to use
>gnome_vfs_mime_get_key_list... :)
>
>Hope that helps,
>
>Christophe
>
>> Thanks.
>> Daniel Z.
>>
>>
>> _______________________________________________
>> gnome-vfs-list mailing list
>> gnome-vfs-list gnome org
>> http://mail.gnome.org/mailman/listinfo/gnome-vfs-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]