Fix for dotdesktop to match spec; need the proper [header] line
authorskeezix <skeezix@flotsam-vm.(none)>
Wed, 25 Feb 2009 17:16:18 +0000 (12:16 -0500)
committerskeezix <skeezix@flotsam-vm.(none)>
Wed, 25 Feb 2009 17:16:18 +0000 (12:16 -0500)
include/pnd_discovery.h
lib/pnd_discovery.c

index 19982fe..dc9e382 100644 (file)
@@ -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 );
 
index 1822c0f..e1ec7fd 100644 (file)
@@ -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 );