]> git.openpandora.org Git - pandora-libraries.git/commitdiff
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 550b03ece749f2c684c43be06845ab64c3628ab0..367e38b6c032e20796811786361688a57a3b6f82 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 f41d10ab1445025c9ab17467e4f08fe423bdbd10..707e1e1f2fb35af936b701a8781c02c4ca2d4a83 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 f8ea3d76cfb7568401c8afc6718a05b425d7c9a9..eb8ebbade88a37156f73fc646ba88f65e51d651a 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 79e71fcc2d9eecfad03db811dc74fe97966bdbb0..95465bff897d2d9cbcb925ab8f6a1bf7eb1b5a48 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"