Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#118 Provide a new list_multisel_dialog() function

open
nobody
None
5
2004-07-09
2004-07-09
Tony Balinski
No

This new builtin macro function,
list_multisel_dialog(), acts as a complement to the
current list_dialog() function. It works in exactly the
same way, except that the user can choose more than one
of the presented lines in the list. These lines are
returned to the user as a single string, with the lines
separated by the newline "\n" character. (Note that
there is no "\n" at the end of the last of the selected
lines returned in the string.)

The same pseudovariable, $list_dialog_button, is used
by both functions to return the number of the dialog
button pressed.

I decided to use a single string return value rather
than an array value for two reasons. Firstly, the input
and output are in the same format. Second, doing things
this way avoids having to deal with indices to an
array, and conversion to an array can already be
performed very readily using split. It was also easier
to implement this way.

As part of this patch I increased the list's maximum
display length on dialog creation from 10 to 25. (I
spend a lot of time simply resizing such dialogs since
10 lines is usually too small a window for me.)
Ideally, this should be configurable (through a
non-saved X resource would be sufficient).

Discussion

  • Tony Balinski
    Tony Balinski
    2004-07-09

     
    Attachments
  • Tony Balinski
    Tony Balinski
    2004-07-27

    Logged In: YES
    user_id=618141

    Corrected a bug whereby the string result had a badly set
    length (the character count was too great by 1).

     
  • Tony Balinski
    Tony Balinski
    2004-07-27

     
    Attachments