On Thu, 7 Dec 2000 [EMAIL PROTECTED] wrote: > Anyway, back to my desire for automatically updated labels in the InsetRef popup. >This code would lead directly to it if we: > 1. Call ChangeRefsIfUnique() from the InsetLabel d-tor. > 2. Emit an updateRefs signal from ChageRefs(). > > Angus But I think we want something more. I was thinking recently about this exact issue, and I was wondering if we could use the same mechanism as the menu code itself will use. I was considering building up every menu from a set of signals (I think JMarc mentioned this), something like : addMenu(menuid, name, shortcut); addToMenu(parentmenu, itemid, name, shortcut); removeFromMenu(parentmenu, itemid, name, shortcut); attachMenu(parentmenu, itemid, menuid); itemChanged(parentmenu, itemid, newname, newshortcut); disableItem(), enableItem() etc. or something (I haven't really thought this through). Actually Menu is probably a bad name, we want to change TOC/ref dialog from these signals as well. It would be especially convenient for Qt if "itemid" was globally unique integer >= 2 (or <= -2). This way we can have piecewise updates of TOC / Ref menus in a consistent framework (anyone who cares can listen in). TOC is a little unclear, though it's been discussed (though I had an idle thought that perhaps the FinishUndo() calls would be a superset of places we need to send signals ? I don't know). I can even see TOC signals delivering the parent section of a subsection's itemid (makes the dialog easier on Qt for heirarchical purposes). Note that for lyxaction entries, the menuid could jsut be the action number. For other things like the Documents submenu, we could reserve a space in the action number lists for the dynamic stuff. Basically what I'm saying is, I'm not sure ad-hoc updating methods would necessarily be a good idea until a sensible framework is in place. What do people think ? thanks john p.s. dynamic creation of menus sucks - luckily it can't work for tear-off menus, so we *have* to have an update scheme. I would just rather see a finer-grain system. -- FOCUS: So where does this common feeling of frustration come from that unites all the PC users? Everybody experiences it every day that these things simply don't work like they should. Bill Gates: Because it's cool. It's like, "Yeah, been there done that - oh, yeah, I know that bug." - I can understand that phenomenon sociologically, not technically.