Morgan Veyret <[EMAIL PROTECTED]> writes:
> And this additional patch fixes the invalid docstring.
>
> On 11:18 Sat 20 Sep     , Morgan Veyret wrote:
>> Hello,
>> 
>> here is a small patch that changes the download manager automatic buffer
>> opening behavior.
>> 
>> It adds a new preference:
>> 
>> download_buffer_automatic_open_in_own_window 
>> 
>> which defaults to false.
>> 
>> When true, automatic open with target being OPEN_NEW_BUFFER or
>> OPEN_NEW_BUFFER_BACKGROUND, the download buffer are created in a
>> separate download manager window. So the first time a window is created
>> and subsequent download buffers are opened in the existing window.
>> 
>> I'm new to js and xul so feel free to comment this and tell me this is
>> crap :).
>>  
>> Here it uses a tag for the download manager window thanks to jbms on 
>> #conkeror
>> (thanks for his help). 
>> 
>> Anyway here is the patch.

Hi Morgan,

  Thank you for this.  This is definitely a welcome feature!  I would
prefer a slightly different implementation, though, as described below.

  Rather than adding a new user variable, the handling of the existing
variable `download_buffer_automatic_open_target' could be changed to
accept as a value not only the constants like OPEN_NEW_WINDOW, but also
string tag names.  To duplicate the behavior added by the patch you
sent, the user would put this in the rc:

   download_buffer_automatic_open_target = "download-manager";

  The one pitfall to watch out for is that the constants like
OPEN_NEW_WINDOW are numbers, so:

   ("3" == OPEN_NEW_WINDOW) => true

  but

   ("3" === OPEN_NEW_WINDOW) => false

  Thoughts?  Will you make this change?

-- 
John Foerch

_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror

Reply via email to