[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kopete-devel
Subject:    Re: [kopete-devel] [PATCH] Incoming file transfer in chat window v2
From:       "Roman Jarosz" <roman.jarosz () gmail ! com>
Date:       2008-08-26 7:23:16
Message-ID: op.ughf42xdrj95b0 () localhost
[Download RAW message or body]

On Mon, 25 Aug 2008 21:20:48 +0200, Olivier Goffart <ogoffart@kde.org> wrote:

> Le dimanche 24 août 2008, Roman Jarosz a écrit  :
>> Hi,
>>
>> here's next version of my patch.
>>
>> Changes since last version
>> * disabled javascript as many people don't like it to be enabled.
>> * added unique id into Message class which is also used for file  
>> transfer
>> id. * file transfer information in Messages are stored in separate  
>> objects
>> so we don't waste memory
>> * if protocol doesn't specify icon we show icon for current file  
>> extension.
>> * use Kopete default font for buttons
>> * some cleanups and fixes
>>
>> http://kedge.wz.cz/kopete/kopeteft4.png
>
> Hi, I'm happy with the patch, it's almost good.
>
> Last problem:
> -	setOnlyLocalReferences( true );
> Why exactly do you need to enable network reference?
>
> Again you have security issue  (presence leak in that case, ...)
>
> Otherwise i have to say the patch is very cool.

Fixed and commited.

Thanks go to OffEagle and Gof for helping me.

>> If we want to support Adium file transfer chat styles we have to use
>> javascript so i'm starting a pool :)
>
> Why exactly? Do they have javascript embedded?
> What is the javascript for?

The javascript is there to notify Adium that it should save/cancel
file transfer request. They ft style specs look like this

<button onclick="%saveFileHandler%">

and before the request is shown in Adium the %saveFileHandler% is
replaced with something like client.save(22); (22 is ft id)

So if we don't have the saveFileHandlerId which I've added
(and the id isn't in Adium specs) we can't find the button
and add click listener on it. So the only way is to use JavaScript
for Adium styles or change specification and already created
styles.

> Maybe this should be fixed in adium too.

>> 1. Should we add option into Kopete config dialog (as Michal suggested)  
>> to
>>    allow users to turn on javascript and use Adium ft styles
>
> We could eventually show a warning message box when loading an adium  
> style.
> (can we detect them?) with an option to enable it.

We can look for %saveFileHandlerId% tag in style and if it doesn't
contain it then it isn't valid Kopete FT style. So more or less 
we can detect it.

>> 2. Do we want to use only non javascript ft styles which means
>>    <form action="..."><input type="submit"></form> or <a  
>> href="..."></a>.
>
>
>

Roman
_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic