RE: Notebook -> signal when a tab is clicked



Hi, Martin!

If the switch-page doesn't work, try "change-current-page", I think
that's the signal I use.

Gtk-WARNING **: gtk_signal_connect(): could not find signal 
"change-current-page" in the `GtkNotebook' class ancestry

:-/ maybe because I'm using gtk1.2 and not gtk2.0...

There is always "select-page" too.  

Gtk-WARNING **: gtk_signal_connect(): could not find signal "select-page" 
in the `GtkNotebook' class ancestry

:_(

See the docs for more info (this area of the documentation really needs
improving):

...maybe I should switch to gk2. Sometime in the near future...

You may be able to get away with the "clicked" signal or perhaps the
"button_press_event" for the GtkLabel/GTkWidget that is used for the
header.  The problem with this is, what happens if the tabs are changed
via the keyboard. - You would also then have to use "key_press_event"
and it all just looks messy then.

I'll try this. Not because it seems to be useful, but the key-events
_do_ work fine by now.

What I want to do is: when something outside the PC emmits something 
concrete (the keyboard or a thing connected to the USB) one page of the 
notebook is shown, but just before some code is run.

In fact, the key_press_event generates an internal event that shows the
page of the notebook and runs the code. When the tab is clicked, the
_same_ internal event must be generated (i.e. I want something to be done
just when the page is shown).

So I was trying to program my own "what to do when a new tab is clicked 
instead of showing the page" function (and I've done) but can't "link" 
correctly the tab to the function.

Thanks for the help!

.-:Namarie:-.



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