https://bugzilla.novell.com/show_bug.cgi?id=463510
User federico@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=463510#c14
Federico Mena Quintero changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P5 - None |P3 - Medium
AssignedTo|bnc-team-gnome@forge.provo. |sbrabec@novell.com
|novell.com |
--- Comment #14 from Federico Mena Quintero 2009-01-20 11:39:52 MST ---
defaults.list looks like this when filtered for "comma" or "csv":
[Default Applications]
application/csv=gnumeric.desktop
text/comma-separated-values=gnumeric.desktop
text/csv=calc.desktop
text/x-comma-separated-values=gnumeric.desktop
text/x-csv=calc.desktop
Glib reads defaults.list in
glib/gio/gdesktopappinfo.c:mime_info_cache_dir_init_defaults_list(). It
basically does this:
keys = list_keys_under ("Default Applications");
foreach key in keys {
apps = get_value_for_key (key);
unaliased_type = unalias_mime_type (key);
apps_that_open_mime_types[unaliased_type] = apps
}
That is, it unaliases each MIME type as it reads it, and stores its list of
preferred applications. If there are aliased types that resolve to the same
canonical type, then "the last one wins".
Look at our defaults.list again from above: text/x-csv should win with
calc.desktop, but it is the text/x-comma-separated-values with gnumeric.desktop
that wins.
Running this in gdb, it turns out that
_g_unix_content_type_unalias ("text/x-comma-separated-values")
returns "text/csv", *BUT*
_g_unix_content_type_unalias ("text/x-csv")
simply yields "text/x-csv".
That is, "text/x-csv" is not being unaliased correctly --- glib thinks that it
is a canonical type. Looking at /usr/share/mime/text/csv.xml, it has an alias
for text/x-comma-separated-values, but not for text/x-csv.
The shared-mime-info package needs an updated version of text/csv.xml, I think.
Reassigning to Stanislav as he has been dealing with MIME stuff before.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.