After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 156687 - gnome-desktop-icon.c uses GnomeIconTheme
gnome-desktop-icon.c uses GnomeIconTheme
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-10-28 11:10 UTC by Vincent Untz
Modified: 2005-07-25 17:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use GtkIconTheme instead of GnomeIconTheme (3.36 KB, patch)
2005-02-03 14:35 UTC, Christian Persch
committed Details | Review
guard deprecated API-using function definitions (1.98 KB, patch)
2005-02-03 19:45 UTC, Christian Persch
rejected Details | Review

Description Vincent Untz 2004-10-28 11:10:59 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.
Comment 1 Christian Persch 2005-02-03 14:35:07 UTC
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?
Comment 2 Vincent Untz 2005-02-03 16:49:00 UTC
Christian: did you try to run apps with this? I had panel crashes when I did
something similar...
Comment 3 Christian Persch 2005-02-03 19:44:03 UTC
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.
Comment 4 Christian Persch 2005-02-03 19:45:47 UTC
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 5 Christian Persch 2005-02-22 23:32:43 UTC
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.
Comment 6 Vincent Untz 2005-02-26 11:20:13 UTC
You should probably send a mail to Mark since he receives a lot of bugzilla mail...
Comment 7 Mark McLoughlin 2005-07-25 17:09:09 UTC
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.