>From 12ce2bb69724372132366afa7abf2d3a07be1537 Mon Sep 17 00:00:00 2001<br>From: Gonzalo Odiard <<a href="mailto:godiard@gmail.com">godiard@gmail.com</a>><br>Date: Sat, 12 Jun 2010 18:08:08 -0300<br>Subject: [PATCH] fix #813 problem with clipboard , OLPC #9022 also<br>
<br>This resolves pasting of a image from Browse to Paint or inside Paint<br>Not resolves draging one image from the frame to Paint<br>---<br> Area.py | 6 ++++++<br> 1 files changed, 6 insertions(+), 0 deletions(-)<br>
<br>diff --git a/Area.py b/Area.py<br>index 7b921b8..8340d50 100644<br>--- a/Area.py<br>+++ b/Area.py<br>@@ -69,6 +69,7 @@ import math<br> import pango<br> from fill import *<br> from Desenho import Desenho<br>+from urlparse import urlparse<br>
<br> ##Tools and events manipulation are handle with this class.<br> class Area(gtk.DrawingArea):<br>@@ -741,6 +742,11 @@ class Area(gtk.DrawingArea):<br> self.tool['name'] = 'marquee-rectangular'<br>
self.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.FLEUR)) <br> self.emit('select')<br>+ elif clipBoard.wait_is_uris_available():<br>+ selection = clipBoard.wait_for_contents('text/uri-list') <br>
+ if selection != None:<br>+ for uri in selection.get_uris():<br>+ self.loadImage(urlparse(uri).path, self)<br> else:<br> self.loadImage(tempPath, self)<br>
logging.debug('Area.past(self): Load from clipboard fails, loading from tempPatch')<br>-- <br>1.6.6.1<br><br clear="all"><br>