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 697711 - Port to Clutter 1.12 API
Port to Clutter 1.12 API
Status: RESOLVED FIXED
Product: libchamplain
Classification: Core
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: libchamplain-maint
libchamplain-maint
Depends on:
Blocks:
 
 
Reported: 2013-04-10 13:18 UTC by Zeeshan Ali
Modified: 2013-05-16 18:56 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Require Clutter 1.12 (677 bytes, patch)
2013-04-10 14:07 UTC, Zeeshan Ali
committed Details | Review
ChamplainPoint: Port code to Clutter 1.12 API (6.20 KB, patch)
2013-04-10 14:07 UTC, Zeeshan Ali
committed Details | Review
ChamplainPoint: Remove now redundant proxy implementations (2.65 KB, patch)
2013-04-10 14:28 UTC, Zeeshan Ali
committed Details | Review
Deprecate champlain_view_bin_layout_add() (903 bytes, patch)
2013-04-19 01:06 UTC, Zeeshan Ali
committed Details | Review

Description Zeeshan Ali 2013-04-10 13:18:19 UTC
Lots of API that champlain uses have been deprecated so we should really port to new API before some of these API are dropped. Will soon attach a patch that ports ClutterPoint to new API.
Comment 1 Zeeshan Ali 2013-04-10 13:18:39 UTC
(In reply to comment #0)
> Lots of API that champlain uses have been deprecated so we should really port
> to new API before some of these API are dropped. Will soon attach a patch that
> ports ClutterPoint to new API.

I meant ChamplainPoint of course. :)
Comment 2 Jiri Techet 2013-04-10 13:35:26 UTC
Fine - I started working on porting the more core stuff of libchamplain where more changes are needed. We should just avoid doing the same things in parallel.
Comment 3 Zeeshan Ali 2013-04-10 14:07:54 UTC
Created attachment 241156 [details] [review]
Require Clutter 1.12
Comment 4 Zeeshan Ali 2013-04-10 14:07:58 UTC
Created attachment 241157 [details] [review]
ChamplainPoint: Port code to Clutter 1.12 API

There is still a call to deprecated clutter_actor_set_anchor_point() but
I don't yet know how to replace that one. According to docs it should
simply be replaced by clutter_actor_set_pivot_point but seem translation
isn't that straightforward as anchor and pivot point are not the same.
Comment 5 Zeeshan Ali 2013-04-10 14:28:06 UTC
Created attachment 241163 [details] [review]
ChamplainPoint: Remove now redundant proxy implementations

Not sure if they were needed before but removing them now does not seem
to cause any problems afaict from my limited testing.
Comment 6 Jiri Techet 2013-04-12 12:14:28 UTC
Alright, I'm hopefully done with the port - it's in master now. libchamplain itself compiles cleanly now and only some demos have to be updated to use the new interface. This was quite a major cleanup removing like 2500 lines of code and adding around 500 so there might be some bugs.
Comment 7 Jiri Techet 2013-04-12 12:16:43 UTC
(In reply to comment #4)
> Created an attachment (id=241157) [details] [review]
> ChamplainPoint: Port code to Clutter 1.12 API
> 
> There is still a call to deprecated clutter_actor_set_anchor_point() but
> I don't yet know how to replace that one. According to docs it should
> simply be replaced by clutter_actor_set_pivot_point but seem translation
> isn't that straightforward as anchor and pivot point are not the same.

See clutter_actor_set_translation () - compared to clutter_actor_set_anchor_point() you just have to invert the sign.
Comment 8 Jiri Techet 2013-04-12 12:18:01 UTC
(In reply to comment #5)
> Created an attachment (id=241163) [details] [review]
> ChamplainPoint: Remove now redundant proxy implementations
> 
> Not sure if they were needed before but removing them now does not seem
> to cause any problems afaict from my limited testing.

I cleaned it up even more - these are not needed any more since ClutterActor isn't just an interface now but an instantiable class.
Comment 9 Zeeshan Ali 2013-04-12 14:00:23 UTC
(In reply to comment #6)
> Alright, I'm hopefully done with the port - it's in master now. libchamplain
> itself compiles cleanly now and only some demos have to be updated to use the
> new interface. This was quite a major cleanup removing like 2500 lines of code
> and adding around 500 so there might be some bugs.

Wow! that was fast. I'm impressed!
Comment 10 Zeeshan Ali 2013-04-12 14:01:50 UTC
BTW, could you please update status of the patches? Patch status is IMHO the main motivation to do reviews in bz. Also should we mark this bug as obsolete?
Comment 11 Jiri Techet 2013-04-15 22:24:33 UTC
Review of attachment 241163 [details] [review]:

Committed.
Comment 12 Jiri Techet 2013-04-15 22:24:53 UTC
Review of attachment 241157 [details] [review]:

Committed.
Comment 13 Jiri Techet 2013-04-15 22:25:07 UTC
Review of attachment 241156 [details] [review]:

Committed.
Comment 14 Jiri Techet 2013-04-15 22:31:55 UTC
Aha - I actually didn't know about the patch status feature ;-).

I'll keep this bug open until everything related to it is resolved - I've fixed the C/python/vala demos, the only remaining is the js demo which I thought you could fix since you work with javascript (it fails on initializing clutter where I think different parameters should be used but I was lazy to explore). It's like 5 minutes of work I think.

The zooming animation is currently slightly buggy, which happened during the migration (there are strange shifts at low zoom levels and the legend/map license disappear while zooming). I need some clarification from the clutter people about how the pivot-point works before fixing this.
Comment 15 Zeeshan Ali 2013-04-15 22:43:15 UTC
(In reply to comment #14)
> Aha - I actually didn't know about the patch status feature ;-).

One always learns new things. :) I'm guessing then you also don't make use of git-bz? Many gnome devs use it everyday and usually it makes it pretty easy to deal with patches in bugzilla (it even allows you to create bugs from commandline):
 
http://fishsoup.net/software/git-bz/

> I'll keep this bug open until everything related to it is resolved - I've fixed
> the C/python/vala demos, the only remaining is the js demo which I thought you
> could fix since you work with javascript (it fails on initializing clutter
> where I think different parameters should be used but I was lazy to explore).
> It's like 5 minutes of work I think.

I'll have a look.. I'm no experienced JS guy for the record, Maps will be my first real JS app. :)

> The zooming animation is currently slightly buggy, which happened during the
> migration (there are strange shifts at low zoom levels and the legend/map
> license disappear while zooming). I need some clarification from the clutter
> people about how the pivot-point works before fixing this.

Best way to get their attention would be #clutter or irc.gnome.org but I guess list will also do.
Comment 16 Zeeshan Ali 2013-04-15 23:18:57 UTC
(In reply to comment #15)
> (In reply to comment #14)
>
> > I'll keep this bug open until everything related to it is resolved - I've fixed
> > the C/python/vala demos, the only remaining is the js demo which I thought you
> > could fix since you work with javascript (it fails on initializing clutter
> > where I think different parameters should be used but I was lazy to explore).
> > It's like 5 minutes of work I think.
> 
> I'll have a look.. I'm no experienced JS guy for the record, Maps will be my
> first real JS app. :)

Done. You are right. It was something very small so I pushed it directly.
Comment 17 Jiri Techet 2013-04-16 21:38:24 UTC
Thanks.
Comment 18 Zeeshan Ali 2013-04-19 01:06:38 UTC
Created attachment 241868 [details] [review]
Deprecate champlain_view_bin_layout_add()

This API requires deprecated clutter enum ClutterBinAlignment so better
deprecate this function as well.
Comment 19 Jiri Techet 2013-04-19 19:27:40 UTC
Review of attachment 241868 [details] [review]:

Committed
Comment 20 Jiri Techet 2013-04-19 19:28:25 UTC
Good, I've also replaced the calls of this function in libchamplain itself.