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 681526 - Remove deprecated Clutter API
Remove deprecated Clutter API
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
0.5.x
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-08-09 15:05 UTC by Debarshi Ray
Modified: 2012-08-30 01:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove deprecated Clutter API (9.05 KB, patch)
2012-08-09 15:18 UTC, Debarshi Ray
needs-work Details | Review

Description Debarshi Ray 2012-08-09 15:05:33 UTC
Documents is a using a bunch of Clutter APIs that were deprecated in Clutter 1.10.
Comment 1 Debarshi Ray 2012-08-09 15:18:02 UTC
Created attachment 220795 [details] [review]
Remove deprecated Clutter API

A work in progress patch. Currently it is crashing for me with http://fpaste.org/Zc0M/ Not sure why.

The corresponding changes in gnome-photos are working as expected.
Comment 2 Cosimo Cecchi 2012-08-09 15:32:03 UTC
Review of attachment 220795 [details] [review]:

I think the error is due to JS not understanding properties names with dashes. You must use underscores instead.

::: src/embed.js
@@ +78,3 @@
         this._notebook.show();
+        this._notebookActor = new GtkClutter.Actor({ contents: this._notebook,
+                                                     x-align: Clutter.ActorAlign.FILL,

You need to use underscores instead of dashes here for the property names.

@@ +99,3 @@
+                                    x-expand: true,
+                                    y-align: Clutter.ActorAlign.FILL,
+                                    y-expand: true });

Same here

::: src/errorBox.js
@@ +82,3 @@
+        let parent = this.actor.get_parent();
+        if (!parent)
+            return;

Can this actually happen? We create it and parent it in the embed's init function AFAICS.

@@ +98,3 @@
+                                           let parent = this.actor.get_parent();
+                                           if (!parent)
+                                               return;

Same here.
Comment 3 Cosimo Cecchi 2012-08-30 01:40:49 UTC
I committed a cleaned up version of this to master now...thanks for the patch!