From 19f81acff6391a48637dcb8b2561e0eb69feaee9 Mon Sep 17 00:00:00 2001 From: skeezix Date: Wed, 25 Feb 2009 12:16:18 -0500 Subject: [PATCH] Fix for dotdesktop to match spec; need the proper [header] line --- include/pnd_discovery.h | 1 + lib/pnd_discovery.c | 2 ++ 2 files changed, 3 insertions(+) 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 ); -- 2.39.5