Added X-Pandora-UID to .desktop
authorskeezix <skeezix@flotsam-vm.(none)>
Tue, 22 Dec 2009 16:26:57 +0000 (11:26 -0500)
committerskeezix <skeezix@flotsam-vm.(none)>
Tue, 22 Dec 2009 16:26:57 +0000 (11:26 -0500)
Changed _Source to X-Pandora-Source
Cleaned up a header collision from old copy/paste
Fixed discotest to use correct header

include/pnd_desktop.h
include/pnd_discovery.h
lib/pnd_desktop.c
test/discotest.c

index 550b03e..367e38b 100644 (file)
@@ -6,14 +6,13 @@
 extern "C" {
 #endif
 
-
 #define PND_PNDHUP_KEY "launcher.hupscript"
 #define PND_PNDHUP_FILENAME "pnd_hup.sh"
 
 // 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"
+#define PND_DOTDESKTOP_SOURCE "X-Pandora-Source=libpnd"
 unsigned char pnd_emit_dotdesktop ( char *targetpath, char *pndrun, pnd_disco_t *p );
 
 // emit_icon() will attempt to copy the icon from a PXML directory, or from a pnd file if appended,
index f41d10a..707e1e1 100644 (file)
@@ -70,16 +70,6 @@ typedef struct {
 
 void pnd_disco_destroy ( pnd_disco_t *p ); // a function name that simply could not be avoided
 
-// 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 );
-
-// emit_icon() will attempt to copy the icon from a PXML directory, or from a pnd file if appended,
-// to the given directory; returns 1 on sucess, otherwise is a fail.
-unsigned char pnd_emit_icon ( char *targetpath, pnd_disco_t *p );
-
 // TODO: A way to release the disco-lists and reclaim RAM :)
 
 #ifdef __cplusplus
index f8ea3d7..eb8ebba 100644 (file)
@@ -67,6 +67,10 @@ unsigned char pnd_emit_dotdesktop ( char *targetpath, char *pndrun, pnd_disco_t
     fprintf ( f, "%s", buffer );
   }
 
+  if ( p -> unique_id ) {
+    fprintf ( f, "X-Pandora-UID=%s\n", p -> unique_id );
+  }
+
 #if 1
   if ( p -> desc_en && p -> desc_en [ 0 ] ) {
     snprintf ( buffer, 1020, "Comment=%s\n", p -> desc_en ); // no [en] needed I suppose, yet
index 79e71fc..95465bf 100644 (file)
@@ -8,6 +8,7 @@
 #include "pnd_apps.h"
 #include "pnd_pxml.h"
 #include "pnd_discovery.h"
+#include "pnd_desktop.h"
 #include "pnd_locate.h"
 #include "pnd_utility.h"