Add icon for the "unknown" mimetype
Per documentation (and practice), the generic "I don't know what this is" mime type is "application/octet-stream" as far as glib is concerned. (https://developer.gnome.org/gio/stable/gio-GContentType.html#g-content-type-is-unknown)
When asking glib what icon to show for that mime type, you get back "application-octet-stream" with "application-x-generic" as a fallback.
I know you don't like adding more mimetypes to Adwaita (from scanning other issues filed), but this seems like an appropriate gap to fill, IMHO.
Sample program to illustrate this:
#include <gio/gio.h>
int main()
{
gchar *type = g_content_type_from_mime_type("application/octet-stream");
GIcon *icon = g_content_type_get_icon(type);
g_print("Icons: %s\n", g_icon_to_string(icon));
return 0;
}
$ gcc test.c -o test `pkg-config --cflags --libs gio-2.0` && ./test
Icons: . GThemedIcon application-octet-stream application-x-generic application-octet-stream-symbolic application-x-generic-symbolic