From kde-panel-devel Thu Jan 31 13:08:48 2013 From: Nowardev-Team Date: Thu, 31 Jan 2013 13:08:48 +0000 To: kde-panel-devel Subject: Re: plasma javascripting Message-Id: X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=135963774500514 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============5617658444544206983==" --===============5617658444544206983== Content-Type: multipart/alternative; boundary=f46d040168dddc219304d49553ed --f46d040168dddc219304d49553ed Content-Type: text/plain; charset=ISO-8859-1 ups too much true in the command line :) print("vlc raw string "+defaultApplication("video/x-ogm+ogg") ) var test=defaultApplication("video/x-ogm+ogg").replace(/.*\//, "") print("removing /usr/bin/ from it : "+test) var test2 = test.split(" ") print ("removing options "+test2[0]) 2013/1/31 Nowardev-Team > thanks , btw with vlc and i guess other non-kde software i managed to fix > with this > > print("vlc raw string "+defaultApplication("video/x-ogm+ogg"), > true) > var test=defaultApplication("video/x-ogm+ogg").replace(/.*\//, "") > print("removing /usr/bin/ from it : "+test) > var test2 = test.split(" ") > print ("removing options "+test2[0]) > > =================================================== > what i get for VLC : > =================================================== > > vlc raw string /usr/bin/vlc %U > removing /usr/bin/ from it : vlc %U > removing options vlc > > > 2013/1/31 Aaron J. Seigo > >> On Wednesday, January 30, 2013 19:25:05 Nowardev-Team wrote: >> > ok :) i managed to fix that with >> > >> > var test = defaultApplication("filemanager").split(" ") >> > print (test[0]) >> >> also fixed properly in master. >> >> note that you can also do: defaultApplication("filemanager", true) to get >> the >> .desktop file for it rather than the executable >> >> -- >> Aaron J. Seigo >> _______________________________________________ >> Plasma-devel mailing list >> Plasma-devel@kde.org >> https://mail.kde.org/mailman/listinfo/plasma-devel >> >> > --f46d040168dddc219304d49553ed Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
ups =A0too much true in the command line :)=A0<= /div>

print("vlc raw string =A0 =A0 =A0 =A0 = =A0 =A0 "+defaultApplication("video/x-ogm+ogg") )
= var test=3DdefaultApplication("video/x-ogm+ogg").replace(/.*\//, = "")
print("removing /usr/bin/ from it =A0: =A0 =A0 =A0 =A0 =A0 =A0 = =A0 "+test)
var test2 =3D test.split(" ")
print ("removing options =A0 =A0 =A0 =A0 =A0 =A0 "+test2[0])


2013/1/31 Nowardev-Team <nowardev@gmai= l.com>
thanks , btw with vlc and i guess other non-kde software i= managed to fix with this=A0

print("vlc raw st= ring =A0 =A0 =A0 =A0 =A0 =A0 "+defaultApplication("video/x-ogm+og= g"), true)
var test=3DdefaultApplication("video/x-ogm+ogg").replace(/.*= \//, "")
print("removing /usr/bin/ from it =A0: = =A0 =A0 =A0 =A0 =A0 =A0 =A0 "+test)
var test2 =3D test.split= (" ")
print ("removing options =A0 =A0 =A0 =A0 =A0 =A0 "+test2[0])=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
what i get for VLC :
=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

vlc raw string =A0 =A0 =A0 =A0 =A0 =A0 /usr/bin/vlc %U<= /div>
removing /usr/bin/ from it =A0: =A0 =A0 =A0 =A0 =A0 =A0 =A0 vlc %= U
removing options =A0 =A0 =A0 =A0 =A0 =A0 vlc
<= div class=3D"gmail_extra">

2013/1/31 Aaron J. Seigo <aseigo@kde.org>
On Wednesday, January 30, 2013 19:25:05 Nowardev-Team wrote:
> ok :) =A0i managed to fix that with
>
> var test =3D defaultApplication("filemanager").split(" = ")
> print (test[0])

also fixed properly in master.

note that you can also do: defaultApplication("filemanager", true= ) to get the
.desktop file for it rather than the executable

--
Aaron J. Seigo

_____________= __________________________________
Plasma-devel mailing list
Plasma-devel@kde.= org
https://mail.kde.org/mailman/listinfo/plasma-devel



--f46d040168dddc219304d49553ed-- --===============5617658444544206983== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --===============5617658444544206983==--