MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16356.27977.908634.470673 at karryall.dnsalias.org> Date: Sat, 20 Dec 2003 16:39:53 +0100 From: Olivier Andrieu To: stalkern2 at tin.it Cc: lablgtk at kaba.or.jp Subject: Re: About automatic column sorting and right-click detection In-Reply-To: <200312192244.31974.stalkern2 at tin.it> References: <200312171132.49128.stalkern2 at tin.it> <200312191550.35477.stalkern2@tin.it> <16355.8721.795161.532146@akasha.ijm.jussieu.fr> <200312192244.31974.stalkern2@tin.it> Stalkern 2 [Friday 19 December 2003] : > Yep! Here I have a sample code for an enriched GTK2 List + _I > think_ a free bug! > The bug is IMHO in GtkTree.TreeView.get_path_at_pos when list > headers are visible. Try to use the xy coordinates that are in the button event (via GdkEvent.Button.x and GdkEvent.Button.y) : these functions should get the correct coordinates I think. Anyway, you should connect the button_press event using #after, so that the default handler gets to run and select the row for you : tree_view#event#connect#after#button_press (fun ev -> if GdkEvent.Button.button event = 3 then begin ... view#selection#get_selected_rows ... popup menu end ; true) You also could use GTree.cell_renderer_toggle for check marks. -- Olivier