Re: Bug in notebook




Dave Cole <dave@dccs.com.au> writes:

> It seems that gtk_notebook_set_page() does not work if you have not
> previously called a gtk_widget_show() on the notebook widget.

s/notebook widget/notebook page/

Basically, the reason why this occurs is that notebook pages
that are not shown don't show up at all - no tabs, no nothing -
so it makes no sense to switch the notebook to such a page.

Now, when the notebook is first created admittedly, it makes 
little sense to say "this page isn't
visible so you can't switch to it", but it is a little
difficult to distinguish that from trying to switch
the notebook to an existing page that isn't visible.

But the code that is used to switch away from the
initial page if it was never shown is in gtk_notebook_size_request
and there is no easy way to tell if the notebook has been
size_requested yet or not. 

Fixing things so it could decide whether it was safe to switch 
to a hidden page would probably require moving that code 
to gtk_notebook_map(). (Not a bad place for it anyways.)

If somebody wants to make up and test a patch for this,
I think it would count as a bug-fix, but it seems like
a low-priority thing to me.

Regards,
                                        Owen



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