LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   C, GTK, and Gnome Desktop (https://www.linuxquestions.org/questions/programming-9/c-gtk-and-gnome-desktop-730041/)

seandalton0 06-02-2009 12:45 AM

C, GTK, and Gnome Desktop
 
For the sake of conversation let's say I'm building a gnome application menu, and now I'm at the point I need to populate the menus with the actual installed applications. In the past I've simply read the .desktop files in /usr/share/applications/ and parsed out the required information, which became a very CPU intensive process, I was also using Python.

Now I'm trying to do the same thing again, accept in C. I've found that there's a gnomedesktop library for Python that allows you to interface with the Gnome Desktop and from what I've heard, derive these .desktop entries more efficiently than my previous attempt. So what I'm looking for now is the same kind of library for C. I've been looking through the files at 'http://git.gnome.org./cgit/gnome-desktop/tree/libgnome-desktop' , but haven't found much that would assist my goal.

So if someone knows how to do this, or some other means to obtain this information rather than reading the directory contents and parsing out whatever information to build the entries step by step, I would be very grateful.

seandalton0 06-03-2009 03:41 PM

I guess to update my own post, I've been searching around code for a while, mainly the "gnome-main-menu" or "SLAB" code, and I've found a few locations that have proved very useful.

http://git.gnome.org./cgit/gnome-mai...b-gnome-util.h

and

http://git.gnome.org./cgit/gnome-des...desktop-item.h

I've been able to import .desktop files into a GnomeDesktopItem, but I've hit a brick wall right now and have to wait before I can see if I can extrapolate any relevant information. As I figure out more I'll keep this thread updated.


All times are GMT -5. The time now is 06:17 AM.