X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fpnd_desktop.c;h=3abf62d294aa8bd2f10760b05d0877b73efb3f1b;hb=8075d3dba75ec1bf935e452595897d160f39244a;hp=3ef81a07e956d2d64f8c94336dc8426732a910ee;hpb=c8131042001660e330bdc9e4cd98be90684a30b4;p=pandora-libraries.git diff --git a/lib/pnd_desktop.c b/lib/pnd_desktop.c index 3ef81a0..3abf62d 100644 --- a/lib/pnd_desktop.c +++ b/lib/pnd_desktop.c @@ -103,11 +103,11 @@ unsigned char pnd_emit_dotdesktop ( char *targetpath, char *pndrun, pnd_disco_t // basics if ( p -> object_type == pnd_object_type_directory ) { - snprintf ( buffer, 1020, "Exec=%s%s -p %s -e %s -b %s", + snprintf ( buffer, 1020, "Exec=%s%s -p \"%s\" -e \"%s\" -b \"%s\"", nohup, pndrun, p -> object_path, p -> exec, p -> appdata_dirname ? p -> appdata_dirname : p -> unique_id ); } else if ( p -> object_type == pnd_object_type_pnd ) { - snprintf ( buffer, 1020, "Exec=%s%s -p %s/%s -e %s -b %s", + snprintf ( buffer, 1020, "Exec=%s%s -p \"%s/%s\" -e \"%s\" -b \"%s\"", nohup, pndrun, p -> object_path, p -> object_filename, p -> exec, p -> appdata_dirname ? p -> appdata_dirname : p -> unique_id ); } @@ -303,6 +303,8 @@ unsigned char pnd_emit_dotinfo ( char *targetpath, char *pndrun, pnd_disco_t *p pnd_conf_get_as_char ( desktoph, "info.viewer_args" ), p -> info_filename ); } else { pargs = NULL; + // WARNING: This might not be quite right; if no viewer-args, shouldn't we still append the info-filename? likewise, + // even if we do have view-args, shouldn't we check if filename is present? } char pndfile [ 1024 ]; @@ -314,9 +316,11 @@ unsigned char pnd_emit_dotinfo ( char *targetpath, char *pndrun, pnd_disco_t *p snprintf ( pndfile, 1020, "%s/%s", p -> object_path, p -> object_filename ); } - if ( ! pnd_apps_exec ( pndrun, pndfile, p -> unique_id, viewer, p -> startdir, pargs, - p -> clockspeed ? atoi ( p -> clockspeed ) : 0, PND_EXEC_OPTION_NORUN ) ) - { + pnd_apps_exec_info_t info; + info.viewer = viewer; + info.args = pargs; + + if ( ! pnd_apps_exec_disco ( pndrun, p, PND_EXEC_OPTION_NORUN | PND_EXEC_OPTION_INFO, &info ) ) { return ( 0 ); }