Date: Mon, 10 Nov 2003 11:50:58 +0100 From: Claudio Sacerdoti Coen To: Jacques Garrigue Cc: lablgtk at kaba.or.jp Subject: Re: GTree row selection event Message-ID: <20031110105058.GA19281 at cs.unibo.it> References: <20031107100532.GA17659 at cs.unibo.it> <20031110104118V.garrigue at kurims.kyoto-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031110104118V.garrigue at kurims.kyoto-u.ac.jp> Thank you Jacques. > Indeed, the documentation just says it is called when the state of a > row has to be toggled. Unfortunately. > Have a look at examples/tree.ml. I had of course! > To see the new selection, you should use #selection#connect#after#changed. I do. But still it has some problems: 1. no event structure (I can not detect a double-click) 2. the documentation of Gtk says that the event may be raised multiple times and/or it may not be raised at all (depending on the selection mode etc.). Perhaps I misunderstood the specification, but anyway it does not seem very reassuring. > The rest of the behaviour is at it should be in `BROWSE mode. > If you want to start from an empty selection, you should use `MULTIPLE mode. > view#selection#set_mode `MULTIPLE Ah, OK. I missed it. Thanks. My "solution" for now is the following: 1. I intercept #selection#changed to detect the single click 2. I intercept #event_ops#button_pressed to detect the double click [ I use a reference to pass information from the single-click callback to the double-click one ] It is not very nice but I can live with it. Cheers, C.S.C. -- ---------------------------------------------------------------- Real name: Claudio Sacerdoti Coen PhD Student in Computer Science at University of Bologna E-mail: sacerdot@cs.unibo.it http://www.cs.unibo.it/~sacerdot ----------------------------------------------------------------