On 6 April 2010 13:17, Søren Hauberg <[email protected]> wrote:
> tir, 06 04 2010 kl. 09:42 -0400, skrev Carnë Draug:
>> On 5 April 2010 22:30, Søren Hauberg <[email protected]> wrote:
>> > lør, 03 04 2010 kl. 00:14 -0400, skrev Carnë Draug:
>> >> I noticed that one of the options for the zenity_file_selection
>> >> function (part of the zenity package) is 'anything else' which becomes
>> >> the default selected file. This makes it impossible to have a file as
>> >> default with the same name as any other option. Also, if someone tries
>> >> to use any other option but makes a typo, it will not receive an
>> >> error. Instead, the typo becomes the file selected, even if there's no
>> >> file with that name.
>> >
>> > Yes, this is a potential limitation. Are you actually affected by this
>> > problem? (just curious...)
>>
>> No I am not. I just noticed it and thought I could fix it. Specially
>> if it involves changing the API, the sooner it's done the better.
>
> Okay, I was just curious. I agree that we might as well change the API
> now.
>
>> >> I propose to change this option to "filename=filepath", in a similar
>> >> way to "timeout=XX" (still in trunk).
>> >
>> > I don't quite understand your suggestion. Could you come with an example
>> > of how the user would call the function?
>>
>> zenity_file_selection("Please select the best song ever",
>> "timeout=20", "filename=InertiaticESP.ogg")
>>
>> This would ask the user to select a file, the window would have the
>> title "Please select the best song ever", after 20 seconds it would
>> close the window, and would have selected as default the file
>> "InertiaticESP.ogg".
>
> Hmm, I think we need to stick to the standard approach here, such that
> your example would be
>
> zenity_file_selection("Please select the best song ever",
> "timeout", 20,
> "default_filename", "InertiaticESP.ogg")
>
> This matches other functions such as "plot", where you write
>
> plot (1:10, "r", "linewidth", 4)
>
> Søren
>
If that's the standard then that's okay. I'll change it for that. It
can't be that hard.
If a property does not require a value, such as 'multiple' or
'password', should it become the value of a new property, make it a
property with value 0 or 1, or should the function accept them as
single values? That is, which of the one would be more correct?
zenity_file_selection ("Please select a file", "timeout", 20,
"selection_type", "multiple")
zenity_file_selection ("Please select a file", "timeout", 20, "multiple", 1)
zenity_file_selection ("Please select a file", "timeout", 20, "multiple")
I'm guessing the last one.
Carnë Draug
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev