diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2008-01-09 15:15:23 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2008-01-09 15:20:57 (GMT) |
commit | 0771cb99015c9ab8f1bf76c49fbce916f6aaf54e (patch) | |
tree | bdfd161a80996e343ac43bddaf0d42b143b14b42 | |
parent | 182085bfeac27dc4bf4b91b284436e5787de4963 (diff) |
#5389: Correctly handle pastes from gtk text entries.
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | src/sugar/mime.py | 7 |
2 files changed, 9 insertions, 1 deletions
@@ -1,3 +1,6 @@ +* #5389: Correctly handle pastes from gtk text entries. (tomeu) +* #5525: Import ipython lazily. (tomeu) +* #5080: Use uri_list_extract_uris implementation from glib. (tomeu) * #4783 Make browse play Record audio/video again (marco) Snapshot 1a04bb7c71 diff --git a/src/sugar/mime.py b/src/sugar/mime.py index e54e063..fd79ad8 100644 --- a/src/sugar/mime.py +++ b/src/sugar/mime.py @@ -154,6 +154,11 @@ def get_primary_extension(mime_type): else: return None +_black_list = [ + # Target used only between gtk.TextBuffer instances + 'application/x-gtk-text-buffer-rich-text', + ] + def choose_most_significant(mime_types): logging.debug('Choosing between %r.' % mime_types) if not mime_types: @@ -165,7 +170,7 @@ def choose_most_significant(mime_types): for mime_category in ['image/', 'application/']: for mime_type in mime_types: - if mime_type.startswith(mime_category): + if mime_type.startswith(mime_category) and mime_type not in _black_list: # skip mozilla private types (second component starts with '_' # or ends with '-priv') if mime_type.split('/')[1].startswith('_') or \ |