To: luther at dpt-info.u-strasbg.fr Cc: lablgtk at kaba.or.jp Subject: Re: file_selection_complete patch. In-Reply-To: <20001218132340.A29055 at lambda.u-strasbg.fr> References: <20001211163431.A15168 at lambda.u-strasbg.fr> <20001212104754R.garrigue@kurims.kyoto-u.ac.jp> <20001218132340.A29055@lambda.u-strasbg.fr> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20001220125012A.garrigue at kurims.kyoto-u.ac.jp> Date: Wed, 20 Dec 2000 12:50:12 +0900 From: Jacques Garrigue Lines: 35 From: Sven LUTHER > I noticed the file_selection widget lacked support for the complete function, > so i added it and am sending you here the corresponding patch. I hope it is > ok especially as regarding the file_selection constructor, as i am not that > familiar with the labels and optional argument. Thanks for noticing this lacking function. I often realize that this is not so much a pain to have to write the stub by hand (anyway you need to read the docs to do something nice), but that checking that you forgot nothing is really hard. Particularly when the library itself is also evoluting... > How do you program it so that if the filter optional argument is present, you > call the complete method with it, or otherwise you don't do anything (maybe > some of the may stuff i saw all over the place ?) Indeed, this is what may does, which is just equivalent to let f ?opt () = begin match opt with None -> () | Some x -> set_opt x end; ... If you were to include this, you would probably add it to Fileselection.set. But here, complete is not simply a filter, but is rather intended to be called for completing a partial input, like when you press tab. So I removed the constructor part of your code. So bad there is no real concept of filter in GTK's file selector. The one Jun made for labltk had one, and this is really nice. Cheers, Jacques Garrigue