From: skeezix Date: Wed, 25 Feb 2009 17:16:18 +0000 (-0500) Subject: Fix for dotdesktop to match spec; need the proper [header] line X-Git-Tag: Release-2010-05/1~201 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19f81acff6391a48637dcb8b2561e0eb69feaee9;p=pandora-libraries.git Fix for dotdesktop to match spec; need the proper [header] line --- diff --git a/include/pnd_discovery.h b/include/pnd_discovery.h index 19982fe..dc9e382 100644 --- a/include/pnd_discovery.h +++ b/include/pnd_discovery.h @@ -61,6 +61,7 @@ void pnd_disco_destroy ( pnd_disco_t *p ); // a function name that simply could // emit_dotdesktop() will determine a filename and create a FILENAME.desktop file in the targetpath // TODO: Copy the icon into this directory as well, if its source is a .pnd or info is in the dico struct +#define PND_DOTDESKTOP_HEADER "[Desktop Entry]" #define PND_DOTDESKTOP_SOURCE "_Source=libpnd" unsigned char pnd_emit_dotdesktop ( char *targetpath, char *pndrun, pnd_disco_t *p ); diff --git a/lib/pnd_discovery.c b/lib/pnd_discovery.c index 1822c0f..e1ec7fd 100644 --- a/lib/pnd_discovery.c +++ b/lib/pnd_discovery.c @@ -270,6 +270,8 @@ unsigned char pnd_emit_dotdesktop ( char *targetpath, char *pndrun, pnd_disco_t return ( 0 ); } + fprintf ( f, "%s\n", PND_DOTDESKTOP_HEADER ); + if ( p -> title_en ) { snprintf ( buffer, 1020, "Name=%s\n", p -> title_en ); fprintf ( f, "%s", buffer );