#5389 NORM Update.: application-x-gtk-text-buffer-rich-text mimetype is chosen when copying text from some activities
Zarro Boogs per Child
bugtracker at laptop.org
Wed Dec 12 06:16:45 EST 2007
#5389: application-x-gtk-text-buffer-rich-text mimetype is chosen when copying
text from some activities
--------------------------+-------------------------------------------------
Reporter: HoboPrimate | Owner: tomeu
Type: defect | Status: new
Priority: normal | Milestone: Update.1
Component: sugar | Version:
Resolution: | Keywords: review?
Verified: 0 |
--------------------------+-------------------------------------------------
Changes (by tomeu):
* keywords: Update.1? => review?
Comment:
This should fix it:
{{{
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 \
}}}
--
Ticket URL: <http://dev.laptop.org/ticket/5389#comment:5>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system
More information about the Bugs
mailing list