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 563992 - Request for g_lookup_in_data_dirs() API
Request for g_lookup_in_data_dirs() API
Status: RESOLVED DUPLICATE of bug 328679
Product: glib
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2008-12-10 14:23 UTC by Vincent Untz
Modified: 2008-12-10 18:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Untested patch (1.88 KB, patch)
2008-12-10 14:40 UTC, Vincent Untz
none Details | Review
Test program (398 bytes, text/plain)
2008-12-10 14:47 UTC, Vincent Untz
  Details

Description Vincent Untz 2008-12-10 14:23:57 UTC
It turns out such an API is quite useful if you want to replace gnome_program_locate_file(), for example. It's also useful to find a .desktop file.

I have some trivial code for that in gnome-panel/gnome-panel/libpanel-util/panel-glib.c. I'm just not sure if it should only take a basename as argument, or if relative path is okay, or...
Comment 1 Dan Winship 2008-12-10 14:34:31 UTC
gnome-session does this too (gnome-session/main.c:find_desktop_file_for_app_name)
Comment 2 Vincent Untz 2008-12-10 14:40:53 UTC
Created attachment 124346 [details] [review]
Untested patch

Will test the patch now.
Comment 3 Vincent Untz 2008-12-10 14:47:43 UTC
Created attachment 124348 [details]
Test program

Seems to be working fine.

Note that there should be a s/char/gchar in the patch.
Comment 4 Behdad Esfahbod 2008-12-10 18:50:26 UTC
Devhelp does it too.  Lemme dupe to my older bug that has a more ambitious proposal.

Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 328679 ***