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 642802 - Use libchamplain 0.10 for the map plugin
Use libchamplain 0.10 for the map plugin
Status: RESOLVED FIXED
Product: eog-plugins
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-20 11:54 UTC by Jiri Techet
Modified: 2019-02-22 03:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use libchamplain 0.10 in the map plugin (4.90 KB, patch)
2011-02-20 11:57 UTC, Jiri Techet
committed Details | Review
quick-n-dirty libpeas conversion (18.12 KB, patch)
2011-02-20 13:42 UTC, Felix Riemann
committed Details | Review
Adjust to latest clutter-gtk API (1016 bytes, patch)
2011-02-20 13:43 UTC, Felix Riemann
committed Details | Review
Fix the map plugin to compile (1.46 KB, patch)
2011-02-21 22:17 UTC, Jiri Techet
committed Details | Review

Description Jiri Techet 2011-02-20 11:54:55 UTC
I tried to modify the map plugin to use libchamplain 0.10 which introduced several API changes (and which is gtk 3 compatible). However, then I realized that at the same time a new plugin system was introduced to eog. Would it be possible for you to modify the map plugin to use the new plugin mechanism? I guess that for someone familiar with it it is rather mechanical work while for me it would take much more time to learn it.

In the attachment you'll find the libchamplain part of the patch. This patch was created by searching for libchamplain functions and replacing them with their new equivalents. As I couldn't compile it because of the plugin system change, there may be some problems. Please let me know if you fix the plugin thing and I'll fix the remaining libchamplain issues.
Comment 1 Jiri Techet 2011-02-20 11:57:59 UTC
Created attachment 181394 [details] [review]
Use libchamplain 0.10 in the map plugin
Comment 2 Felix Riemann 2011-02-20 13:42:23 UTC
Created attachment 181400 [details] [review]
quick-n-dirty libpeas conversion

Here's a quick conversion to the new plugin API. It's not the nicest but it's enough for now and can be improved when time allows.
Comment 3 Felix Riemann 2011-02-20 13:43:25 UTC
Created attachment 181401 [details] [review]
Adjust to latest clutter-gtk API

This one's needed as well and needs to be committed after the first (sorry got the filenames wrong).
Comment 4 Felix Riemann 2011-02-20 13:44:45 UTC
With these patches applied I get 2 failures/warnings:

eog-map-plugin.c: In function 'create_marker':
eog-map-plugin.c:186:3: warning: implicit declaration of function 'champlain_marker_layer_add'

_add_marker?

eog-map-plugin.c: In function 'impl_activate':
eog-map-plugin.c:392:2: warning: passing argument 2 of 'champlain_view_add_layer' from incompatible pointer type
/home/felix/.debug-chroots/jhbuild-gnome/include/libchamplain-0.10/champlain/champlain-view.h:109:6: note: expected 'struct ChamplainLayer *' but argument is of type 'struct ChamplainMarkerLayer *'

Typecast?
Comment 5 Jiri Techet 2011-02-21 22:15:23 UTC
Thanks for the quick patch. I've fixed the errors with the trivial attached patch (exactly what you have suggested). Now the only problem is that after make install and starting eog I don't see the plugin in the plugin list. The files 

libmap.la
libmap.so
map.plugin

are correctly copied under lib/eog/plugins during make install. Any idea what might be wrong?
Comment 6 Jiri Techet 2011-02-21 22:17:45 UTC
Created attachment 181531 [details] [review]
Fix the map plugin to compile
Comment 7 Felix Riemann 2011-02-21 22:31:19 UTC
Hmm, works correctly here. Do your prefixes match for eog and eog-plugins? Alternatively (haven't tried myself yet) you should be able to put these files into ~/.config/eog/plugins and it should pick them up. You just have to remember to remove them afterwards as I think they will override the system plugins there.

The most obvious problem the map view has right now is that it apparently doesn't react to mouse events and thus cannot be scrolled or zoomed with the mousewheel.
Comment 8 Jiri Techet 2011-02-21 23:12:33 UTC
Yeah, forget about it, got it working (for some reason it got installed under lib and not lib64). I can reproduce the issue with map not moving, will have a look at it.
Comment 9 Felix Riemann 2011-02-25 12:48:48 UTC
Comment on attachment 181394 [details] [review]
Use libchamplain 0.10 in the map plugin

commit 5e54d1f02900658dd05c7256b70977cd723c932b
Author: Jiří Techet <>
Date:   Sun Feb 20 12:53:29 2011 +0100

    [map] Use libchamplain 0.10 in eog map plugin
    
    Bug 642802.
Comment 10 Felix Riemann 2011-02-25 12:49:29 UTC
Comment on attachment 181400 [details] [review]
quick-n-dirty libpeas conversion

commit 11583f3824fff6fdb51aef6e4e9c78761bd83494
Author: Felix Riemann <>
Date:   Sun Feb 20 14:27:53 2011 +0100

    [map] Convert to libpeas-based plugin engine
Comment 11 Felix Riemann 2011-02-25 12:50:19 UTC
Comment on attachment 181401 [details] [review]
Adjust to latest clutter-gtk API

commit c31e18e74295b407c6c2477cf042ba22318d379b
Author: Felix Riemann <>
Date:   Sun Feb 20 14:42:02 2011 +0100

    [map] Adjust to latest clutter-gtk API
Comment 12 Felix Riemann 2011-02-25 12:51:00 UTC
Comment on attachment 181531 [details] [review]
Fix the map plugin to compile

commit 3dc2f4fa697c73869b6c5586cd011a8834a2e20a
Author: Jiří Techet <>
Date:   Mon Feb 21 23:09:01 2011 +0100

    [map] Fix the map plugin to compile
Comment 13 Felix Riemann 2011-02-25 12:54:01 UTC
So I pushed the patches we have so far to master as they make the plugin have at least something like a baseline functionality.

Regarding the missing events: Googling the issue brought up some advise to use clutter_actor_set_reactive on the map, yet it didn't help.
Comment 14 Jiri Techet 2011-02-27 23:02:09 UTC
Sorry for being silent for a while - we had a clutter-related bug which I suspected from causing this problem and wanted to get that one fixed first. However, this didn't help. I did some investigation and created a clutter bug report here:

http://bugzilla.clutter-project.org/show_bug.cgi?id=2582
Comment 15 Felix Riemann 2011-03-02 17:20:07 UTC
(In reply to comment #14)
> Sorry for being silent for a while ...

No problem, Jiri. :)

> we had a clutter-related bug which I
> suspected from causing this problem and wanted to get that one fixed first.
> However, this didn't help. I did some investigation and created a clutter bug

Is it certain this is a problem in Clutter? If so, I think we could close this bug and roll an initial unstable eog-plugins release.
Comment 16 Jiri Techet 2011-03-02 23:34:10 UTC
Well, I'd put it different way - I'm almost certain the bug isn't in libchamplain. Now I'm not at all sure it's clutter - I've tried to revert to 1.4 without any change so maybe it's GTK or something else. I still have to investigate.

I would keep this bug open - I would like to make sure everything works properly once the mouse event bug is fixed and if so, it can be closed. On the other hand I don't think this bug should block the release of eog-plugins so if you want to make a release go ahead regardless of this bug.
Comment 17 Felix Riemann 2011-03-03 10:49:14 UTC
Okay, I've separated (as a follow-up) the mouse issue into bug 643769 as it makes it easier to track that way (this bug is already quite long; also the NEWS-handling is easier). As this concludes the plugin's port to the new APIs we can close this bug (this one here) then.
Thanks for taking care of this, Jiri. :)