GNOME Bugzilla – Bug 768850
First palette entry is inconsistent
Last modified: 2016-07-22 14:44:54 UTC
There seems to be a bit of a problem with the first palette entry (numbered 1 in the profile dialog). After choosing a theme the button appears mid-grey, but the corresponding colour in terminals is black, and if I open the colour picker dialogue the value shows as #000000. I can edit the colour OK, but if I switch theme then back to my Custom theme it goes black again. After editing this colour the button initially shows my chosen colour, but on changing theme it shows black. If I close the profile dialog and reopen it, it goes back to mid-grey. I think all the other palette entries are working correctly. I would guess there's a for loop in the code which starts from 1, but internally the numbering should start from 0.
Yup it's indeed quite weird. When I open the profile prefs it's white. Upon toggling between linux, xterm, urxvt and tango it remains white. Choosing Solarized selects the proper solarized color, and then choosing linux or xterm or similar makes it black as desired. Wtf?? :)
In profile-editor.c profile_palette_notify_colorpickers_cb() removing the if (!rgba_equal (...)) condition (just the condition itself; keeping the body) fixes the problem. I think there's some implicit uninitialized default which happens to be white on the UI but black in the underlying data structure. Shall we remove that condition, or initialize consistently? :)
Created attachment 331810 [details] [review] Fix
Comment on attachment 331810 [details] [review] Fix Thanks! master, and at your option, 3-20 too.
Review of attachment 331810 [details] [review]: Committed to master & 3-20.