Patch to have krun correctly handle scripts.

Ian Reinhart Geiser ian at geiseri.com
Fri May 7 17:37:10 BST 2004


On Friday 07 May 2004 12:32 pm, David Faure wrote:
> On Friday 07 May 2004 17:15, Ian Reinhart Geiser wrote:
> > On Friday 07 May 2004 10:32 am, Waldo Bastian wrote:
> > > That would then also make it easy for applications like kate to give
> > > application/x-executable-script a higher priority than text/plain
> >
> > wow.
> >
> > here is the updated patch set.
> >
> > a) added x-executable-script with X-KDE-IsAlso=text/plain set
> > b) changed ruby,python,perl,javascript and shell to
> > X-KDE-IsAlso=application/x-executable-script
> > c) changed the code to check the mimetype and execute bit.
>
> [You should call KMimeType::mimeType() only once and store the result into
> a KMimeType::Ptr to avoid calling it twice, but OTOH this code is hardly
> performance critical :)]
>
Made the change.

> Please turn isExecutableFile into a KRun public method, and I'll adjust
> Konqueror accordingly.
Okay, at first i wanted to keep it private because I didnt want to introduce 
confusion between isExecutableFile and isExecutable.... Do you have an 
opinion on a better name, or do you think this is enough?

> I like Waldo's idea a lot.
I knew someone would have a good idea as to how to fix this ;)

Cheers
	-ian reinhart geiser





More information about the kde-core-devel mailing list