Re: Signals



Perhaps enabling the button press event in the notebook (with add_events() or set_events()) could do the trick.

If not, connect a function to the button press event of the notebook that just returns true (or false, I can't remember): this should prevent the signal from being propagated.

yann

On 06/02/11 18:01, Martin Dolezal wrote:
Hello,
I am quite new to gtkmm, working with it only for few weekends. I was
using signals for Buttons, CheckButtons, etc, working fine. But I also
used signal for Gtk::Paned in the way:

myHPaned.signal_button_press_event().connect(sigc::mem_fun(*this,
&MyMain::onHPanedClick));

My intention is to detect double click on divider between left and right
part of this HPaned and respond to it in some way. That's working
(checking GdkEventButton's type in onHPanedClick). But in right part of
this HPaned I have Frame (added by pack2) and in this frame I have
Gtk::Notebook. I just realized that double-clicking on this Notebook's
pages' captions calls onHPanedClick too. I didn't know that connected
signals are sent to all children widgets too. Is that so or do I connect
signal in some wrong way? And second question - what's the proper way to
detect if the double-click was made on the HPaned itself (well, on the
divider in the middle to be correct) and not on its children? Should I
somehow use GdkWindow *window in GdkEventButton parameter received by
onHPanedClick?

Thanks,
Martin
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list



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