[api-dev] Transient menu changes are too transient

2007-09-11 Thread Tobias Krais
Hi together, one year ago I implemented some additional menu items for OOo menus in Java. I added these items transient. But now we discovered that they are too transient for us: when opening a document, the menu items are added. When changing the document into "Page view" mode (German: "Seitenans

Re: [api-dev] Transient menu changes are too transient

2007-09-11 Thread Carsten Driesner
Tobias Krais wrote: Hi together, one year ago I implemented some additional menu items for OOo menus in Java. I added these items transient. But now we discovered that they are too transient for us: when opening a document, the menu items are added. When changing the document into "Page view" mo

Re: [api-dev] Transient menu changes are too transient

2007-09-11 Thread Tobias Krais
Hi Carsten, > This is not a bug but how the OpenOffice.org framework works. The > controller will be removed from the frame and another controller is > attached. The layout manager which controls the user interface elements > has to destroy all element when a controller is detached. Your transient

Re: [api-dev] Transient menu changes are too transient

2007-09-18 Thread Tobias Krais
Hi Carsten, at the moment I am implementing you solution: > Solution: You have to implement a > com.sun.star.frame.XFrameActionListener which must be registered at the > frame. Whenever you receive the event FrameAction_COMPONENT_ATTACHED you > have to make the transient changes again. Changing

Re: [api-dev] Transient menu changes are too transient

2007-09-18 Thread Tobias Krais
Hi again, > I think the COMPONENT_REATTACHED is the proper place to change the menus > again. well, this is not the right place to redo the changes: at the time this event is fired, I cannot retrieve the menubar, it is null. When changing to the page view I can perform the changes when the CONTEX

Re: [api-dev] Transient menu changes are too transient

2007-09-18 Thread Carsten Driesner
Tobias Krais wrote: Hi again, I think the COMPONENT_REATTACHED is the proper place to change the menus again. well, this is not the right place to redo the changes: at the time this event is fired, I cannot retrieve the menubar, it is null. When changing to the page view I can perform the cha