GNOME Bugzilla – Bug 156687
gnome-desktop-icon.c uses GnomeIconTheme
Last modified: 2005-07-25 17:09:09 UTC
We should move to GtkIconTheme. We only need to change gnome_desktop_item_find_icon() (we could add functions to return something else than the path to the icon file, though) This is making gnome-panel use GnomeIconTheme.
Created attachment 36923 [details] [review] use GtkIconTheme instead of GnomeIconTheme This is the minimally needed patch to make programs using libgnome-desktop even compile when disabling deprecated libgnomeui API (gnome-icon-theme is deprecated). Since GnomeIconTheme is just a typedef for GtkIconTheme, this patch should be API and ABI stable. Ok to commit?
Christian: did you try to run apps with this? I had panel crashes when I did something similar...
I tried a quick run of gnome-panel with this, browsing through the menus I didn't get a crash. However, I've read the gnome-icon-theme.c source now and it seems I was mistaken that it would be possible to pass a GtkIconTheme in instead. I propose to just #ifndef GNOME_DISABLE_DEPRECATED the GnomeIconTheme using API, so you can include gnome-desktop-item while disabling deprecated libgnomeui APIs. That doesn't change any functionality, since you can't use GnomeIconTheme in this case anyway.
Created attachment 36941 [details] [review] guard deprecated API-using function definitions How about this, then? Fixing just the header file allows you to include it in programs with GNOME_DISABLE_DEPRECATED defined, while the libgnome-desktop library itself is compiled without that define and therefore still includes the necessary symbols.
Comment on attachment 36941 [details] [review] guard deprecated API-using function definitions Ping? Can this be applied in time for GNOME 2.10? It's a trivial fix, needed if you want to include the header while diabling deprecated libgnomeui API.
You should probably send a mail to Mark since he receives a lot of bugzilla mail...
The problem with the second patch is that we actually do need a non-deprecated version of these APIs in some shape or form. If we deprecate the existing ones we should add a new variant of each which takes a GtkIconTheme. I think we need something more like your original patch, but in gnome_desktop_item_find_icon() we should check if we were passed a GnomeIconTheme or a GtkIconTheme. If it is a GtkIconTheme, we should use the GtkIconTheme APIs to lookup the icon. Please give this a good testing, if you can 2005-07-25 Mark McLoughlin <mark@skynet.ie> Partially based on patch from Christian Persch <chpe@gnome.org> in bug #156687 * gnome-desktop-item.c: (gnome_desktop_item_find_icon): if we're passed a GtkIconTheme instead of a GnomeIconTheme, use the GtkIconTheme API to lookup the icon. * libgnome/gnome-desktop-item.h: allow find_icon() and get_icon() take a GtkIconTheme.