Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2010-06-12 21:08:08 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2010-06-12 21:20:10 (GMT)
commit12ce2bb69724372132366afa7abf2d3a07be1537 (patch)
treea61a4685b9d0d7cbd26a1f7feec020b88d13aaef
parent0ea988cce00ed0209a6a59d459cc60c2a2621fc5 (diff)
fix #813 problem with clipboard , OLPC #9022 also
This resolves pasting of a image from Browse to Paint or inside Paint Not resolves draging one image from the frame to Paint
-rw-r--r--Area.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Area.py b/Area.py
index 7b921b8..8340d50 100644
--- a/Area.py
+++ b/Area.py
@@ -69,6 +69,7 @@ import math
import pango
from fill import *
from Desenho import Desenho
+from urlparse import urlparse
##Tools and events manipulation are handle with this class.
class Area(gtk.DrawingArea):
@@ -741,6 +742,11 @@ class Area(gtk.DrawingArea):
self.tool['name'] = 'marquee-rectangular'
self.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.FLEUR))
self.emit('select')
+ elif clipBoard.wait_is_uris_available():
+ selection = clipBoard.wait_for_contents('text/uri-list')
+ if selection != None:
+ for uri in selection.get_uris():
+ self.loadImage(urlparse(uri).path, self)
else:
self.loadImage(tempPath, self)
logging.debug('Area.past(self): Load from clipboard fails, loading from tempPatch')