GtkImage should have a way of diagnosing missing images
GtkImage centralizes image loading in load_scalable_with_loader
. When that function fails to load the image, it just returns NULL and the two callers set the image to an icon name image-missing
, which shows up visually.
However, there is no way to diagnose what went wrong, as load_scalable_with_loader
ignores all errors.
I'd like to have a sensible way to do present this information. Apart from using a GError
everywhere inside that function, there are some options:
- At the exit points of that function, simply
g_message()
with the error message. - Add a
GtkDebugFlag
just for that, andGTK_NOTE(IMAGE, g_message(...))
instead.
From a distro's viewpoint, the first one is more direct, and it allows me to get debug information from users without an extra step and inconvenience to the users. The second one is probably more GTK-ish, but more inconvenient for users.
Please take your pick and I'll submit a MR :)