After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 616796 - Image export plugin
Image export plugin
Status: RESOLVED FIXED
Product: emerillon
Classification: Other
Component: Plugins
git master
Other All
: Normal enhancement
: ---
Assigned To: emerillon-maint
emerillon-maint
Depends on: 616448 616867
Blocks:
 
 
Reported: 2010-04-25 21:13 UTC by Simon Wenner
Modified: 2010-06-01 15:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
image export plugin (10.13 KB, patch)
2010-04-25 21:13 UTC, Simon Wenner
none Details | Review
Remove plugin from compile list if valac isn't found (860 bytes, patch)
2010-04-26 05:44 UTC, Łukasz Jernaś
none Details | Review
additional patch to fix compilation (1.51 KB, patch)
2010-04-26 18:56 UTC, Simon Wenner
none Details | Review

Description Simon Wenner 2010-04-25 21:13:11 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
Comment 1 Łukasz Jernaś 2010-04-26 05:42:47 UTC
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
Comment 2 Łukasz Jernaś 2010-04-26 05:44:40 UTC
Created attachment 159570 [details] [review]
Remove plugin from compile list if valac isn't found
Comment 3 Simon Wenner 2010-04-26 18:56:18 UTC
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.
Comment 4 Łukasz Jernaś 2010-04-27 07:12:45 UTC
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
Comment 5 Łukasz Jernaś 2010-04-27 09:03:42 UTC
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..
Comment 6 Simon Wenner 2010-04-27 17:17:58 UTC
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.
Comment 7 Łukasz Jernaś 2010-04-27 17:26:06 UTC
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
Comment 8 Łukasz Jernaś 2010-06-01 15:34:13 UTC
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.