On Mon, Aug 02, 2010 at 08:50:30AM -0400, Jeff Clough wrote:
> On Mon, 2010-08-02 at 20:22 +0800, Gregory Hosler wrote:
> 
> > a pages page number can and will change whenever it's position in the number
> > sequence 0 to N-1 changes.
> 
> Are there situations where something internal to GTK will change this?

The numbers are alwasy consecutive 0 to N-1.  So they can change iff the
tabs can change.

> To be more specific, if I'm interested in page 2 (and have that page
> number in a variable somewhere) and *I* don't make any changes to the
> page order, delete or add any pages, is it safe to assume it will
> *always* be page 2?

If tab reordering/detaching/moving among tab groups/whatever is enabled
the numbers can change in result of user's actions.

Anyway, if you need to maintain an association if the tabs do change you
can use a widget name → widget map for page identification (easy with
names set in Glade or simply using object-data on the notebook) and
gtk_notebook_page_num() to look up the page number if you have the
widget.

Yeti

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to