In my gtk-3-fortran library, I had a function which received a pointer to an InfoBar and a message to show in that bar. To get the label that was put (in another part of the program) in the InfoBar, I was using that code:
In any case, though, you should not retrieve the contents of an info bar widget: those are, and have always been, considered private. Accessing them with gtk_container_get_children() was an indication that what you wanted to achieve was already not recommended.
You should keep a reference to the GtkLabel you set as the content of the GtkInfoBar, if you want to change the message being displayed after creation.
my code does not use the Object Oriented features of Fortran, therefore the g_object_set_data() trick is perfect to keep track of my label, even if I create several infobars:
! To keep track of the label inside the infobar object:
call g_object_set_data (infobar, "info_label"//c_null_char, label)
...
! We retrieve the label we have named "info_label" inside the infobar:
label = g_object_get_data (infobar, "info_label"//c_null_char)
call gtk_label_set_text(label, message)