[Pkg-sugar-commit] [sugar-base] 03/04: #5389: Correctly handle pastes from gtk text entries.
Jonas Smedegaard
dr at jones.dk
Fri Apr 17 07:42:03 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag v0.2.1
in repository sugar-base.
commit 0771cb99015c9ab8f1bf76c49fbce916f6aaf54e
Author: Tomeu Vizoso <tomeu at tomeuvizoso.net>
Date: Wed Jan 9 16:15:23 2008 +0100
#5389: Correctly handle pastes from gtk text entries.
---
NEWS | 3 +++
src/sugar/mime.py | 7 ++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
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 \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-base.git
More information about the pkg-sugar-commit
mailing list