Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-07-28 14:00:32 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-07-28 14:00:32 (GMT)
commitd988d1dfd26a122f256f59d93860d1aa40ce8133 (patch)
tree1e58101da608365ae9651ba98a36be5d7de9692e /sugar
parent1f58acf9ddb7aef0356893ddf5de0da9591b0580 (diff)
Fix clipboard support for text from Browse.
Diffstat (limited to 'sugar')
-rw-r--r--sugar/objects/mime.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/sugar/objects/mime.py b/sugar/objects/mime.py
index 0cba001..80eac9b 100644
--- a/sugar/objects/mime.py
+++ b/sugar/objects/mime.py
@@ -59,8 +59,10 @@ def choose_most_significant(mime_types):
continue
if mime_type.startswith(mime_category):
- # skip mozilla private types (second component starts with '_')
- if mime_type.split('/')[1].startswith('_'):
+ # skip mozilla private types (second component starts with '_'
+ # or ends with '-priv')
+ if mime_type.split('/')[1].startswith('_') or \
+ mime_type.split('/')[1].endswith('-priv'):
continue
# take out the specifier after ';' that mozilla likes to add
@@ -69,9 +71,11 @@ def choose_most_significant(mime_types):
return mime_type
if 'text/html' in mime_types:
+ logging.debug('Choosed text/html!')
return 'text/html'
if 'text/plain' in mime_types or 'STRING' in mime_types:
+ logging.debug('Choosed text/plain!')
return 'text/plain'
logging.debug('Returning first: %r.' % mime_types[0])