I think it works, but i don't know if the right thing to do.<br><br>From 97fb2adb1ea97a472e020244ae7a2d22c7a94db3 Mon Sep 17 00:00:00 2001<br>From: Gonzalo Odiard <<a href="mailto:godiard@gmail.com">godiard@gmail.com</a>><br>
Date: Fri, 11 Jun 2010 01:22:36 -0300<br>Subject: [PATCH] fix #1771 - paint overwrites file type instead of creating new file<br><br><a href="http://bugs.sugarlabs.org/ticket/1771">http://bugs.sugarlabs.org/ticket/1771</a><br>
---<br> OficinaActivity.py | 5 ++++-<br> 1 files changed, 4 insertions(+), 1 deletions(-)<br><br>diff --git a/OficinaActivity.py b/OficinaActivity.py<br>index c72576a..78bc8cf 100644<br>--- a/OficinaActivity.py<br>+++ b/OficinaActivity.py<br>
@@ -140,8 +140,8 @@ class OficinaActivity(activity.Activity):<br> <br> def read_file(self, file_path):<br> '''Read file from Sugar Journal.'''<br>+ print 'reading file', file_path, "mime_type", self.metadata['mime_type']<br>
<br>- logging.debug('reading file %s', file_path)<br> <br> pixbuf = gtk.gdk.pixbuf_new_from_file(file_path)<br> <br>@@ -155,6 +155,9 @@ class OficinaActivity(activity.Activity):<br> self._setup_handle = self.fixed.connect('size_allocate',<br>
size_allocate_cb)<br> <br>+ if self.metadata['mime_type'] != "image/png":<br>+ self._jobject.object_id = None<br>+<br> def write_file(self, file_path):<br> '''Save file on Sugar Journal. '''<br>
<br>-- <br>1.6.6.1<br><br clear="all"><br>-- <br>Gonzalo Odiard<br>Responsable de Desarrollo<br>Sistemas Australes<br><br>