[webkit-gtk] Custom Filechooser dialog

Simon Schampijer simon at schampijer.de
Fri Feb 10 04:03:52 PST 2012


Hi Martin,

thanks for getting back on this!

On 02/06/2012 06:17 PM, Martin Robinson wrote:
> On Mon, Feb 6, 2012 at 7:44 AM, Simon Schampijer<simon at schampijer.de>  wrote:
>
>> - is the approach above with a 'upload-requested' signal a good one that you
>> would consider of adding as public API or are there other better approaches
>> to solve the issue of having a custom file-chooser?
>
> I think it makes a lot of sense. There's some kind of generic "run an
> open panel" signal that the WebKit layer gets. We could pipe that out
> to a WebKitWebView signal.

Ok, I did an initial patch (attached) to pipe an "upload-requested" 
signal out, the return value is a boolean to indicate whether the 
application handles the upload or not.

We have to get back the information from the application which file(s) 
should be uploaded as well. I wonder how the API would best look like 
for this. We could handle that in the return value, if we get a filename 
back it was handled, if NULL is returned we display the default upload 
dialog. This would be similar signal handling as in 
'create-plugin-widget' where we return a widget from the signal 
callback. Looks like we would have to write a custom GSignalAccumulator 
for this. Other ideas suggestions?

>> - is this an easy addition for someone familiar with the codebase? Is there
>> someone willing to do it or do I have to try and rip my hair out and write
>> an ugly patch first? :)
>
> It's a little hairy to get and build WebKit, but you can always drop
> by the channel and ask for help. :) There's also a lot of good
> documentation:
>
> http://trac.webkit.org/wiki/BuildingGtk
> http://www.webkit.org/coding/contributing.html

Yeah, it uses a lot of disk resources actually :) I am patching the 
Fedora rpm for the moment.

>> - API additions for webkit vs webkit2?
>
> It'd make sense to have it in both ports actually.

Agreed,
    Simon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: upload.patch
Type: text/x-patch
Size: 2025 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20120210/260ca9b6/attachment-0001.bin>


More information about the webkit-gtk mailing list