Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2008-01-09 15:15:23 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2008-01-09 15:20:57 (GMT)
commit0771cb99015c9ab8f1bf76c49fbce916f6aaf54e (patch)
treebdfd161a80996e343ac43bddaf0d42b143b14b42
parent182085bfeac27dc4bf4b91b284436e5787de4963 (diff)
#5389: Correctly handle pastes from gtk text entries.
-rw-r--r--NEWS3
-rw-r--r--src/sugar/mime.py7
2 files changed, 9 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 7b15f9a..cf3340d 100644
--- a/NEWS
+++ b/NEWS
@@ -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 \