Bug 58771

Summary: Surface.set_mime_data() and Surface.get_mime_data()
Product: pycairo Reporter: Simon Sapin <simon.sapin>
Component: generalAssignee: Steve Chaplin <d74n5pohf9>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch for py2cairo (Python 2)
Patch for pycairo (Python 3)
Patch for py2cairo

Description Simon Sapin 2012-12-26 07:54:41 UTC
Hi. Attached are patches for py2cairo and pycairo (with tests and docs) that add two methods that were in cairo 1.10 but not exposed in pycairo yet:

cairo_surface_set_mime_data() -> Surface.set_mime_data()
cairo_surface_get_mime_data() -> Surface.get_mime_data()

cairo@cairographics.org list messages:
http://lists.cairographics.org/archives/cairo/2012-August/023388.html
http://lists.cairographics.org/archives/cairo/2012-December/023841.html
Comment 1 Simon Sapin 2012-12-26 07:55:20 UTC
Created attachment 72124 [details] [review]
Patch for py2cairo (Python 2)
Comment 2 Simon Sapin 2012-12-26 07:55:47 UTC
Created attachment 72125 [details] [review]
Patch for pycairo (Python 3)
Comment 3 Seif Lotfy 2013-01-14 10:55:03 UTC
Created attachment 73000 [details] [review]
Patch for py2cairo

I modified the patch according to Simon to not have a static set of mimetypes defined in a dict. This works perfectly. Will add a python 3 version this weekend.
Comment 4 Christoph Reiter 2017-07-05 15:19:52 UTC
Fixed since 1.12: https://github.com/pygobject/pycairo/issues/7

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.