commit 60ea8f312822af666c27a7701734b88e0dc2c713
Author: György Balló <ballogy@freestart.hu>
Date:   Sat Feb 25 16:42:57 2012 +0100

    Port gnomevfs to gio
    
    Fixes bug #612630

diff --git a/rich_entry.py b/rich_entry.py
index 89e2f69..d4cca42 100644
--- a/rich_entry.py
+++ b/rich_entry.py
@@ -3,7 +3,7 @@ import gtk.gdk
 import pango
 import gobject
 import gnome
-import gnomevfs
+import gio
 
 import gettext
 _ = gettext.gettext
@@ -138,9 +138,11 @@ class RichEntry(gtk.TextView):
                 loader = gtk.gdk.PixbufLoader()
 
                 try:
-                    file_info = gnomevfs.get_file_info(uri, gnomevfs.FILE_INFO_GET_MIME_TYPE)
-                    file_contents = gnomevfs.read_entire_file(uri)
-                except gnomevfs.Error, e:
+                    myfile = gio.File(uri=uri)
+                    file_info = myfile.query_info(gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE)
+                    content_type = file_info.get_content_type()
+                    file_contents, length, etag = myfile.load_contents()
+                except gio.Error, e:
                     hig_alert.reportError(_("Could not load dragged in image"),
                                           _("Error loading %s was: %s") % (hig_alert.italic(uri), e))
                 loader.write(file_contents)
@@ -160,7 +162,7 @@ class RichEntry(gtk.TextView):
                     image_tag.file_contents = file_contents
                     paths = uri.split('/')
                     image_tag.name = paths[len(paths) - 1]
-                    image_tag.mime_type = file_info.mime_type
+                    image_tag.mime_type = content_type
 
                     self.images.append(image_tag)
                     
