GNOME Bugzilla – Bug 732095
rgba x color property of annotation
Last modified: 2014-06-23 17:23:19 UTC
According to documentation, the 'color' signal is deprecated and 'rgba' should be used in annotations.
Created attachment 278996 [details] [review] Changing the signal used for annotation color in annotation window.
Review of attachment 278996 [details] [review]: ::: libview/ev-annotation-window.c @@ -137,3 @@ GtkStyleProperties *properties; GtkStyleProvider *provider; - GdkRGBA rgba; this is wrong. you should erase the uses of set_color and get_color, plus connect only to the rgba, but you can't modify the API. so set_color and get_color must remain the same
I understand. I see two solutions in this case: 1. Keep ev_annotation_window_set_color, with the same signature, and get an RGBA from the annotation, convert to Color to pass to this function and inside convert again to RGBA. 2. Implement ev_annotation_window_set_rgba and mark ev_annotation_window_set_color as deprecated. Which one is better?
Created attachment 279043 [details] [review] Annotation window uses GdkRGBA instead of GdkColor Using solution #2 of the previous comment.
(In reply to comment #2) > Review of attachment 278996 [details] [review]: > > ::: libview/ev-annotation-window.c > @@ -137,3 @@ > GtkStyleProperties *properties; > GtkStyleProvider *provider; > - GdkRGBA rgba; > > this is wrong. you should erase the uses of set_color and get_color, plus > connect only to the rgba, but you can't modify the API. so set_color and > get_color must remain the same hmm, I think this patch is correct, ev_annotation_window API is private, so we don't need to deprecate anything there.
oh, you are right, I missed the private API thing.
Review of attachment 278996 [details] [review]: LGTM
Review of attachment 278996 [details] [review]: Pushed, thank you!
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.