Merge lp:~openerp-dev/openobject-client/6.1-opw-573456-xal into lp:openobject-client/6.1
Proposed by
Xavier ALT
Status: | Merged |
---|---|
Approved by: | Naresh(OpenERP) |
Approved revision: | 2059 |
Merged at revision: | 2076 |
Proposed branch: | lp:~openerp-dev/openobject-client/6.1-opw-573456-xal |
Merge into: | lp:openobject-client/6.1 |
Diff against target: |
23 lines (+2/-2) 1 file modified
bin/widget/view/form_gtk/image.py (+2/-2) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-client/6.1-opw-573456-xal |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Naresh(OpenERP) (community) | Approve | ||
Review via email: mp+103437@code.launchpad.net |
Description of the change
Hi,
When displaying image within the GTK client using "image" widget, sometime the image appears as empty. This is especially the case on Win7, but the problem happens all the time.
The MP fix the usage of gtk.gdk.
Before as close() was happening later-on, there is a short period of time where the PixbufLoader() might not have processed the picure; period of time where get_pixbuf() return None. That lead the GTK client think there is no valid picture of that format, which is wrong.
Regards,
Xavier
To post a comment you must log in.
Hello Xavier,
I think the problem does not seem to stem from missing the closing of the loader. but it may be due to lack of setting the fields value in the model field while adding new image !
nch@Naresh: ~/workspace/ OpenERP2012/ 6.1/client/ bin$ bzr diff view/form_ gtk/image. py' view/form_ gtk/image. py 2011-09-26 12:53:49 +0000 view/form_ gtk/image. py 2012-07-17 11:06:16 +0000
self. _value = encodestring( file(filename, 'rb').read())
self. update_ img() value(self. _view.model, self._view. model.mgroup. mfields[ self.attrs[ 'name'] ]) model.mgroup. mfields:
self. _view.model. set({self. has_filename: os.path. basename( filename) }, modified=True)
=== modified file 'bin/widget/
--- bin/widget/
+++ bin/widget/
@@ -114,9 +114,11 @@
if filename:
+ self.set_
if self.has_filename and self.has_filename in self._view.
can you please check with this....
Thanks,
Naresh