IconFactory deprecated
The IconFactory has been deprecated in GTK3 in favor of IconTheme [1].
We could convert the code to use it without too much difficulty by the method 'gtk_icon_theme_add_builtin_icon' [2] is also deprecated. This method would be needed to add icons from the server.
I think it is not useful to change IconFactory if it is to use another deprecated feature.
Indeed it looks like Gtk team does not want to allow to register icons using only pixmaps but instead to use directory path with icon files. So maybe a solution would be to store in a cache directory per host/database the icons fetched from the server and to preprend this path to the search path.
[1] https://developer.gnome.org/gtk3/stable/GtkIconTheme.html
[2] https://developer.gnome.org/gtk3/stable/GtkIconTheme.html#gtk-icon-theme-add-builtin-icon