diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2007-08-20 10:36:43 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2007-08-20 10:36:43 (GMT) |
commit | e0d3c350c916c126dd3929a3a02973fb921b6431 (patch) | |
tree | 9a0cbdfd8c0e6e87318f2b636917ff688496b6fe /sugar/objects/mime.py | |
parent | a0195e7fd4263bbf0070b6383b58d0ee613e362f (diff) | |
parent | fff0daf8c4aef388f12f801162a050f13acd6cb8 (diff) |
Merge branch 'master' of git+ssh://dev.laptop.org/git/sugar
Diffstat (limited to 'sugar/objects/mime.py')
-rw-r--r-- | sugar/objects/mime.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sugar/objects/mime.py b/sugar/objects/mime.py index 74e4e16..b933143 100644 --- a/sugar/objects/mime.py +++ b/sugar/objects/mime.py @@ -58,13 +58,9 @@ def choose_most_significant(mime_types): if 'text/uri-list' in mime_types: return 'text/uri-list' - for mime_category in ['image/', 'text/', 'application/']: + for mime_category in ['image/', 'application/']: for mime_type in mime_types: - # skip text/plain and text/html, these have lower priority. - if mime_type in ['text/plain', 'text/html']: - continue - if mime_type.startswith(mime_category): # skip mozilla private types (second component starts with '_' # or ends with '-priv') @@ -77,6 +73,10 @@ def choose_most_significant(mime_types): logging.debug('Choosed %r!' % mime_type) return mime_type + if 'text/x-moz-url' in mime_types: + logging.debug('Choosed text/x-moz-url!') + return 'text/x-moz-url' + if 'text/html' in mime_types: logging.debug('Choosed text/html!') return 'text/html' |