Patch to have krun correctly handle scripts.

Waldo Bastian bastian at kde.org
Fri May 7 15:32:32 BST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri May 7 2004 14:22, Ian Reinhart Geiser wrote:
> On Friday 07 May 2004 06:17 am, Waldo Bastian wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > On Thu May 6 2004 20:53, Ian Reinhart Geiser wrote:
> > > The only immediate issue with this solution at this point is there are
> > > a hard-coded list of mimetypes we can handle.
> >
> > You could introduce an intermediate mimetype
> > "application/x-executable-code" or perhaps reuse
> > "application/x-executable" and let the applicable executable mimetypes
> > inherit from that. Then you can check for them all with
> > KMimeType::is("application/x-executable-code") without hardcoding
> > anything.
>
> I really am lost when it comes to our mime system.  Your idea of the
> application/x-executable-code is a neat one though.  How would I go about
> performing such a task?  It sounds like the perfect solution though.

I think "application/x-executable-script" is more clear than 
"application/x-executable-code" actually.

To go forward with that, add a x-executable-script.desktop to 
kdelibs/mimetypes/application and modify application/x-python and friends to 
include:
	X-KDE-IsAlso=application/x-executable-script

application/x-executable-script should then include:
	X-KDE-IsAlso=text/plain

There can only be one X-KDE-IsAlso per file.

Since application/x-python-bytecode wouldn't qualify as script, you would 
probably need to use:
	X-KDE-IsAlso=application/x-executable
for that one.

That would then also make it easy for applications like kate to give 
application/x-executable-script a higher priority than text/plain

Cheers,
Waldo
- -- 
bastian at kde.org  |   SUSE Linux 9.1 Order Now!   |  bastian at suse.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAm54AN4pvrENfboIRAi+vAJ0RwURUr/sn0LXU8sO12HXT0DvjEACeMk0C
Cn/PhpzHZvCiBiy3BXJi0Mw=
=/y6V
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list