GNOME Bugzilla – Bug 747942
chatView: selectedColor declared using deprecated get_background_color()
Last modified: 2015-04-15 20:07:45 UTC
Polari is currently using GtkStyleContext.get_background_color() to colorpick of the Gtk.StateFlags.SELECTED. Attached patch uses Gtk.StateFlags.LINK instead, removing the need to use the deprecated GtkStyleContext.get_background_color() function.
Created attachment 301671 [details] [review] chatView: switch away from deprecated API
Review of attachment 301671 [details] [review]: Some nits on the commit message: - start should be capitalized (unless the first word is a lower-case name like gtk_style_context_get_background_color) - "via the 'view' class from Adwaita css" sounds cludgy and isn't necessarily correct - it comes from the theme, which may or may not be Adwaita; how about - GNOME 3.16 should really be GTK+ 3.16 With those comments, how about something like: "The chat view is currently using the selection background color for nick names. However as gtk_style_context_get_background_color() has been deprecated in GTK+ 3.16, use the foreground color for the LINK state instead, which should be identical for the default theme." ::: src/chatView.js @@ +188,3 @@ context.restore(); + let selectedColor = context.get_color(Gtk.StateFlags.LINK); "selectedColor" becomes a misnomer when you use the link color, and having both selectedColor and linkColor for the exact same color is silly.
Created attachment 301680 [details] [review] chatView: switch away from deprecated API
Created attachment 301681 [details] [review] chatView: switch away from deprecated API woops, this one should be good
Review of attachment 301681 [details] [review]: (In reply to Bastian from comment #4) > woops, this one should be good Yup, thanks. Feel free to push to gnome-3-16 as well.
pushed https://git.gnome.org/browse/polari/commit/?id=c406e540079adcdf09f5b3c5feb81d8ddd0ee493