Re: TreeView with right-click



Murray,

The book is quite clear on using connect_notify or overriding the default handler. The issue is that the selection isn't updated until the default signal handler. And the default signal handler returns true so no other signal handlers can process the event.  So I'm pretty sure there's no way to use the sigc call backs and have a valid selection.

By valid selection, i mean a selection that has been updated prior to my sigc call back being performed.

Unless of course there's something I'm missing. which is why I was asking.

Thanks,
Paul

On 9/23/06, Murray Cumming <murrayc murrayc com> wrote:
On Fri, 2006-09-22 at 16:51 -0500, Paul Davis wrote:
> Hey,
>
> I'm banging my head against a wall trying to implement the infamous
> TreeView right-click.
>
> I understand how and what the signal handlers are doing, and I seem to
> be getting screwed because TreeView insists on returning true from its
> signal handling (Thus preventing signal handlers to do anything
> afterwards).
>
> Other than break down and inhert from TreeView to provide a selection
> update, is there anyway to accomplish this?
>
> I spent some time looking through MARC to see if this had come up
> before and I can't find an answer, all I managed to find was this
> message:
>
> http://marc.theaimsgroup.com/?l=gtkmm&m=108664230014661&w=2
>
> About someone that re-implemented the selection update. Which is
> silly.
>
> Anyway, just wondering if anyone had any ideas.

http://bugzilla.gnome.org/show_bug.cgi?id=89780
"Treeview: signal_button_press_event needs connect_notify()"

So you need to either override the default signal handler or use
connect_notify() instead of connect(). If this isn't mentioned in the
reference documentation and book already, then it should be.

--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]