Fixes for glib 2.74
This included !1145 (closed) , !1146 (closed) as well as the additional chnages needed there. I folded them into one merge request so marge bot will be happy with merging.
Since I'm still pretty brain foggy I appreciate review.
Edited by Guido Günther