Re: [glade--]TreeView and button_press_event



Christof Petig wrote:
Fabrice Colin schrieb:

Hello all,

I am experiencing a problem with TreeView handling of
button_press_event. Basically, the handler is never called if the
signal is connected to with connect().

There is a gtkmm bug report on the subject here :
http://bugzilla.gnome.org/show_bug.cgi?id=89780
Basically, one needs to either use a subclass of TreeView, or connect
to the signal with connect_notify().

As glademm generates code that makes use of connect(), I was wondering
if it would be possible to change it so that it uses connect_notify() ?
At the moment, I need to edit the _glade.cc|hh files every time I
rebuild my Glade project...

Let me know if I am missing something, or if what I am suggesting
doesn't make sense ;-)

You always have the option to connect the signal yourself in the ctor.

Ah yes I hadn't thought about that...

Besides that I never heard of connect_notify() - can you explain the difference?

The only thing I know about it is from the explanation given by Murray
Cummings in the bug report I mentioned.
With connect(), it is first passed to the treeview/renderer (where,
unfortunately, "the standard handler stops the further handling of the
signal", ie it is not delivered in turn to the user's handler), whereas
with connect_notify(), the event is passed to the users's handler first
and then to tthe treeview.
Using connect_notify() ensures the application gets the
button_press_event message.

PS: Sorry for the delay - vacations and stress at work (and many unresolved autotool problems with glademm)

No problem, I know what it's like :-))

Thanks for your reply.

Fabrice



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