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 676963 - text: Enable implicit color animations
text: Enable implicit color animations
Status: RESOLVED FIXED
Product: clutter
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: clutter-maint
clutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-05-28 12:21 UTC by Bastian Winkler
Modified: 2012-05-28 15:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
text: Enable implicit color animations (13.93 KB, patch)
2012-05-28 12:21 UTC, Bastian Winkler
none Details | Review
text: Enable implicit color animations (13.93 KB, patch)
2012-05-28 12:24 UTC, Bastian Winkler
reviewed Details | Review
text: Enable implicit color animations (13.79 KB, patch)
2012-05-28 12:55 UTC, Bastian Winkler
committed Details | Review

Description Bastian Winkler 2012-05-28 12:21:13 UTC
Implement the ClutterAnimatable interface to enable implicit animations
for :color, :cursor-color, :selected-text-color and :selection-color.
Comment 1 Bastian Winkler 2012-05-28 12:21:17 UTC
Created attachment 215121 [details] [review]
text: Enable implicit color animations
Comment 2 Bastian Winkler 2012-05-28 12:24:02 UTC
Created attachment 215122 [details] [review]
text: Enable implicit color animations

Implement the ClutterAnimatable interface to enable implicit animations
for :color, :cursor-color, :selected-text-color and :selection-color.
Comment 3 Emmanuele Bassi (:ebassi) 2012-05-28 12:32:57 UTC
Review of attachment 215122 [details] [review]:

looks generally okay to me; a couple of minor issues.

::: clutter/clutter-text.c
@@ +2983,3 @@
+  const gchar *name;
+
+      other = obj_props[PROP_SELECTION_COLOR_SET];

there's no need to use g_return_* inside internal functions.

@@ +2988,3 @@
+  priv = self->priv;
+
+    case PROP_SELECTED_TEXT_COLOR:

instead of casting to ClutterActor multiple times, you could use a variable to hold the actor pointer.

also, you can use _clutter_actor_get_animation_info_or_default(), given that you're not modifying the ClutterAnimationInfo structure, but only reading from it.

@@ +2989,3 @@
+
+  info = _clutter_actor_get_animation_info (CLUTTER_ACTOR (self));
+    case PROP_SELECTED_TEXT_COLOR:

pspec->name is perfectly fine - no need to use g_param_spec_get_name().
Comment 4 Bastian Winkler 2012-05-28 12:55:17 UTC
Created attachment 215123 [details] [review]
text: Enable implicit color animations

Implement the ClutterAnimatable interface to enable implicit animations
for :color, :cursor-color, :selected-text-color and :selection-color.
Comment 5 Emmanuele Bassi (:ebassi) 2012-05-28 13:28:09 UTC
Review of attachment 215123 [details] [review]:

looks good
Comment 6 Emmanuele Bassi (:ebassi) 2012-05-28 15:01:21 UTC
Attachment 215123 [details] pushed as 58b13aa - text: Enable implicit color animations