Don't set image on button if it is still the same

It fixes also a strange behavior of GTK that doesn't display any images if the
icon is changed before it is realized.

issue3191
review1451002
(transplanted from 4bc44691dc89dfd7802c9d84bbb466f98038bb75)

--HG--
extra : transplant_source : K%C4F%91%DC%89%DF%D7%80%2C%9D%84%BB%B4f%F9%808%BBu
Backed out changeset c909bd88517d

Using rec_name to search key is wrong because rec_name is the string and not
the key.

issue3483
(transplanted from a674398cccb4b47ccabe34a2f1ea00e3d8fd6b53)

--HG--
extra : transplant_source : %A6t9%8C%CC%B4%B4%7C%CA%BE4%A2%F1%EA%00%E3%D8%FDkS