GNOME Bugzilla – Bug 616796
Image export plugin
Last modified: 2010-06-01 15:34:13 UTC
Created attachment 159551 [details] [review] image export plugin This Plugin allows you to save the currently displayed map as a PNG image or attach it to an email. The plugin is written in Vala and it hit a bug in the Clutter vala bindings. Therefore it does not compile with Vala 0.8.1. Bug #616448 needs to be fixed or a custom Clutter-1.0.vapi has to be distributed. https://bugzilla.gnome.org/show_bug.cgi?id=616448
When trying to build this plugin I get: /tmp/foo/bin/valac -C --pkg gtk+-2.0 --pkg champlain-0.4 --pkg clutter-1.0 --pkg emerillon --pkg ethos-1.0 --pkg gconf-2.0 image-export.vala ethos-1.0.vapi:70.18-70.21: warning: deprecated syntax, use `unowned` modifier public virtual weak string get_name (); ^^^^ ethos-1.0.vapi:86.10-86.13: warning: deprecated syntax, use `unowned` modifier public weak string* get_plugin_dirs (); ^^^^ image-export.vala:94.18-94.66: error: Invalid assignment from owned expression to unowned variable weak uchar[] pixels = clutter_stage.read_pixels (0, 0, -1, -1); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ image-export.vala:98.44-98.49: error: The name `pixels' does not exist in the context of `ImageExportPlugin.grab_and_save_image' var pixbuf = new Gdk.Pixbuf.from_data (pixels, Gdk.Colorspace.RGB, ^^^^^^ Compilation failed: 2 error(s), 2 warning(s) Vala master
Created attachment 159570 [details] [review] Remove plugin from compile list if valac isn't found
Created attachment 159631 [details] [review] additional patch to fix compilation Additional patch to fix the compile error for the changed bindings. Is this ok? or do you want an unified patch? My future plugins will be created in a gitorious branch. The warnings are caused by minor bugs in the Ethos bindings. They are fixed in this commit: http://git.dronelabs.com/ethos/commit/?id=1812cbc1f12c04e4222ad351cedd5c49862f7255 Your additional patch looks good, but I did not test it.
Does that AM_PROG_VALAC([0.8.2]) work for you? AFAIR none of the vala branches report version 0.8.2, not even master - see https://bugzilla.gnome.org/show_bug.cgi?id=616867
Forgot to add this before: I'm fine with using gitorious for most of the work (patches etc, actually I prefer it that way) but please also create "tracker bugs" for the more intrusive changes (with a link to the gitorious branch or it's name) so others can also keep track of it..
AM_PROG_VALAC([0.8.2]) does not work for me. (I currently use 0.8.1 from Debian) But I just want to make sure that people will not complain that it does not compile. The fix will be certainly part of the 0.8.2 release. I assumed that master has a higher version number. Thanks for reporting the vala bug.
OK, I'll merge it to master as soon as the vala bug is fixed. The entire patchset is at http://gitorious.org/emerillion/emerillon-plugins/commits/fix-616796
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.