Getting currently-selected Gtk::Notebook page



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm trying to get the CURRENTLY-selected Gtk::Notebook page. This is driving me bananas, because all that I 
can get is the PREVIOUSLY-selected Gtk::Notebook page, which is utterly useless to me.

The gtk+ C-language callbacks for the "switch-page" signal give me:

"switch-page"                                                     
            void        user_function      (GtkNotebook *notebook, 
                                            GtkNotebookPage *page,
                                            gint page_num,         
                                            gpointer user_data);

I tested this in C, and the page_num variable does in fact deliver the correct number.

But in Perl all I can shift out of there is the notebook widget itself.

Calls to $w->get_current_page(), and $w->page just give me the PREVIOUSLY-selected page.

Even more bizarre: if I get the widget directly using GTK::GladeXML's get_widget() function, and perform 
these same get_current_page() operations on it, I still get the PREVIOUSLY-selected page, NOT the one that is 
sitting there on screen, looking right at me.

How can I fix this? My project is quite stuck without this working.

- -ken
- -- 
- ---------------
The world's most affordable web hosting.
http://www.nearlyfreespeech.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE/hMcje8HF+6xeOIcRArvaAKC9xGhS3TwYiDw320weAzFXAk5PdgCgp6Eg
skLh1aDTt6gdjWY6Ggkh1N0=
=2kho
-----END PGP SIGNATURE-----



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