On Thu, Oct 05, 2000 at 03:29:23PM +0200, Jean-Marc Lasgouttes wrote:
>
> After looking at the documentation, it seems that fl_setpup_maxpup()
> is safe to use when there already are popups defined, which means that
> you second patch is probably a better approach. Note also that the
> max_number_of_menus variable is not really necessary, since
> fl_setup_maxpup(0) returns exactly this value (and does nothing).
I've tried using fl_setup_maxpup(0) with XForms0.88, but it always returns 32,
even after changing the maximum number.
>
> What about a simple solution: at the beginning of Menus:ShowTocMenu(),
> add a
> fl_setpup_maxpup(max_number_of_menus);
> which ensures we have atleast this number of menus, and costs
> virtually nothing in terms of time.
But how do we know the number of submenus the ToC will use?
We will need to write a function which compute it by scanning the
toclist vector, working similarly to Add_to_toc_menu().
I've taken my original patch and ported it to 1.1.6, and then change it a bit:
I added the function get_new_submenu which is responsible for increasing the
maximum popup number.
The patch also allows showing all the TOC when there are more than 25 chapters.
Let me know if you need a patch for 1.1.5.
patch.gz