Freedesktop desktop entry

Jasper Huijsmans jasper at moongroup.com
Wed Dec 10 22:51:45 CET 2003


Op wo 10-12-2003, om 20:09 schreef Tuukka Mäkinen:
> Hello
> 
> Do you have any ideas about what to do with Freedesktop desktop entry 
> standard?
> http://freedesktop.org/Standards/desktop-entry-spec/desktop-entry-spec-0.9.4.html
> 

Yeah, we need support for this probably also in the panel, xffm, xfrun,
etc. In my opinion the new menu system should be our view of the system
when applications are concerned. The user should be able to add
applications missing from the main menu to his personal menu. 

A general .desktop file handling API would be nice. Besides parsing we
probably will need writing capabilities. 

I don't know what would be the best thing to do for translations. If we
want to be able to recreate a .desktop file with a DesktopEntry, all
translated values need to be saved (perhaps using hash tables). If we
decide we don't need that, only the translation in current locale is
required.

For example something like this:

typedef struct _DesktopEntry DesktopEntry;

struct _DesktopEntry
{
  char *name;
  GHashTable *translated_names;
  char *comment;
  GHashTable *translated_comment;
  char *command;
  gboolean use_terminal;
  ...
};

DesktopEntry *desktop_entry_new ();

DesktopEntry *desktop_entry_new_from_file (const char *path);

void desktop_entry_write_to_file (DesktopEntry *entry, 
                                  const char *path);


I haven't really thought about additional functionality we would need or
could use, but we can just add stuff as we go along.

Since you are the first to start using it, you will be in a better
position to understand the requirements for the API than I am.


	Jasper





More information about the Xfce4-dev mailing list