The whole point is that you or rather GtkBuilder
don't initialize the file
property of your GtkImage
object. So you get the expected default value of file
namely NULL
.
Instead glade
seems to set the pixbuf
property to the file path by default. That is perfectly valid and documented in the GtkBuilder UI Definitions
section of the reference:
Pixbufs can be specified as a filename of an image file to load
I changed the line
<property name="pixbuf">img/patient_icons/icon_patient.png</property>
of your ui definitions file to
<property name="file">img/patient_icons/icon_patient.png</property>
and it works as initially expected on my system.