gtk_file_chooser_set_uri() emits 'selection-changed' signal prior to content being set
Calling gtk_file_chooser_set_uri(), implemented
- clears the current selection
- Selects the new URI
The 'selection-changed' signal is emitted when the selection is cleared. Any subscriber on 'selection-changed' who tries to get the 'new' value of the said URI gets returned a blank.
This seems to be an issue in the 3.24 version of GTK. The 4.0 branch (or master) does not have the issue as the URI API functions was removed.