Re: [api-dev] Managing a menu system wide

2006-02-01 Thread Carsten Driesner

Felix E. Klee wrote:

Am Montag, 30. Januar 2006 13:16 schrieb Carsten Driesner:

you have to do the following:


Thanks for the quick reply.  I do have a couple of questions left:

1. What do you mean by ""?  Is it the system wide
  installation (e.g. "/opt/OpenOffice.org1.1.4/") or is it the installation
  of an individual user (e.g. /home/empf/OpenOffice.org1.1.4/)?
Office installation means the installation of the Office binaries. You 
describe it as system wide installation.




2. Where do I put the file containing the new menu, and what format is it
  supposed to have?

You have to use adapted XML files. For example:
- Open the writermenubar.xml
- Add your menu
- Copy it to the new location.



3. How do I control the position of the new menu on the menu bar?

You have to change the complete menu bar. As Mathias already stated this 
solution is not exactly what you want ( you only want to add a menu to 
the menu bar). But you get an additional feature, which you cannot use 
with add-ons. If you want to add your menu to a specific point into the 
menu bar, you are lost with add-ons (this will be a feature for the next 
major version). You can only add a top-level menu or a sub-menu to the 
"Tools - Add-ons" popup menu.


Regards,
Carsten

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Managing a menu system wide

2006-01-31 Thread Mathias Bauer
Felix E. Klee wrote:

> Am Montag, 30. Januar 2006 23:52 schrieb Mathias Bauer:
>> My suggestion is to add your menu as an OOo Add-On. This is a package
>> usually containing code and some configuration files that define an
>> additional top level menu or toolbar for the component. Of course you
>> can omit the code and provide the configuration files only. The drawback
>> is that the additional menu is always placed between "Tools" and
>> "Window", but its biggest advantage is that it's very simple.
> 
> I assume that I cannot install such a menu system wide.  So, can I install it 
> for every user without having to go through a graphical installer each time?  
> I.e. is installation scriptable?

You can install your menu per system (needs admin rights of course) or
per user (without admin rights), just like you want. The installation
uses the command line interface of unopkg.exe that resides in the
"program" directory of OOo.

If you want to know how such an Add-On menu is configured, please have a
look into the chapter about Add-Ons in the Developers Guide.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Managing a menu system wide

2006-01-31 Thread Felix E. Klee
Am Montag, 30. Januar 2006 23:52 schrieb Mathias Bauer:
> My suggestion is to add your menu as an OOo Add-On. This is a package
> usually containing code and some configuration files that define an
> additional top level menu or toolbar for the component. Of course you
> can omit the code and provide the configuration files only. The drawback
> is that the additional menu is always placed between "Tools" and
> "Window", but its biggest advantage is that it's very simple.

I assume that I cannot install such a menu system wide.  So, can I install it 
for every user without having to go through a graphical installer each time?  
I.e. is installation scriptable?

-- 
Dipl.-Phys. Felix E. Klee
Email: [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (home)
Tel: +49 721 8307937, Fax: +49 721 8307936
Linuxburg, Goethestr. 15A, 76135 Karlsruhe, Germany

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Managing a menu system wide

2006-01-30 Thread Mathias Bauer
Carsten Driesner wrote:

> Hi Felix,
> 
> you have to do the following:
> 
> 1. Create a folder in /share/config/soffice.cfg
> 2. Copy your XML files (f.e. writermenubar.xml) to the folder.
> 3. Add the following XML snippet to  installation>/share/registry/data/org/openoffice/Office/Common.xcu
> ...
>   
>
> 
>  $(insturl)/share/config
> 
>
>   
> ...
> 
> 
> Now you should see that the new configuration data is used for the user 
> interface elements. If it doesn't work, please check that there are no 
> file in the user layer (/user/config/soffice.cfg). 
> These file have a higher priority.

I don't think that this is what Felix wants to do, as he wrote:

>> BTW, I only want to add *one* menu.  I do not want to replace the entire 
>> menu 
>> bar since individual users may have made changes to the menu bar.

IMHO providing this additional menu as an Addons.xcu in a UNO package
without code is easier.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Managing a menu system wide

2006-01-30 Thread Mathias Bauer
Felix E. Klee wrote:

> Am Freitag, 27. Januar 2006 17:22 schrieb Mathias Bauer:
>> >> BTW, I only want to add *one* menu.  I do not want to replace the entire
>> >> menu bar since individual users may have made changes to the menu bar.
>> >
>> > BTW, what about creating the menu dynamically each time OO is started?
>> > AFAICS, this would be a very nice solution since the menu could be
>> > modified using settings stored in a configuration file for each user.
>>
>> I wouldn't do that. OOo's startup performance is bad enough. :-)
> 
> Our customer's PCs that are running OO should be fast enough for building a 
> menu on startup.  The only thing that's preventing me from implementing this 
> solution is that by setting
> 
>   Tools -> Configure -> Events -> Start Application
> 
> one can only define *one* startup event.  AFAICS, this could lead to a 
> serious 
> conflict in case another extension wants to also define a startup event.  Is 
> this assumption correct?  Are there ways to specify multiple events processed 
> on startup (aside from assigning a subroutine/function which calls other 
> subroutines/functions)?

Yes, this conflict is possible.

My suggestion is to add your menu as an OOo Add-On. This is a package
usually containing code and some configuration files that define an
additional top level menu or toolbar for the component. Of course you
can omit the code and provide the configuration files only. The drawback
is that the additional menu is always placed between "Tools" and
"Window", but its biggest advantage is that it's very simple.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Managing a menu system wide

2006-01-30 Thread Felix E. Klee
Am Freitag, 27. Januar 2006 17:22 schrieb Mathias Bauer:
> >> BTW, I only want to add *one* menu.  I do not want to replace the entire
> >> menu bar since individual users may have made changes to the menu bar.
> >
> > BTW, what about creating the menu dynamically each time OO is started?
> > AFAICS, this would be a very nice solution since the menu could be
> > modified using settings stored in a configuration file for each user.
>
> I wouldn't do that. OOo's startup performance is bad enough. :-)

Our customer's PCs that are running OO should be fast enough for building a 
menu on startup.  The only thing that's preventing me from implementing this 
solution is that by setting

  Tools -> Configure -> Events -> Start Application

one can only define *one* startup event.  AFAICS, this could lead to a serious 
conflict in case another extension wants to also define a startup event.  Is 
this assumption correct?  Are there ways to specify multiple events processed 
on startup (aside from assigning a subroutine/function which calls other 
subroutines/functions)?

-- 
Dipl.-Phys. Felix E. Klee
Email: [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (home)
Tel: +49 721 8307937, Fax: +49 721 8307936
Linuxburg, Goethestr. 15A, 76135 Karlsruhe, Germany

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Managing a menu system wide

2006-01-30 Thread Felix E. Klee
Am Montag, 30. Januar 2006 13:16 schrieb Carsten Driesner:
> you have to do the following:

Thanks for the quick reply.  I do have a couple of questions left:

1. What do you mean by ""?  Is it the system wide
  installation (e.g. "/opt/OpenOffice.org1.1.4/") or is it the installation
  of an individual user (e.g. /home/empf/OpenOffice.org1.1.4/)?

2. Where do I put the file containing the new menu, and what format is it
  supposed to have?

3. How do I control the position of the new menu on the menu bar?

-- 
Dipl.-Phys. Felix E. Klee
Email: [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (home)
Tel: +49 721 8307937, Fax: +49 721 8307936
Linuxburg, Goethestr. 15A, 76135 Karlsruhe, Germany

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Managing a menu system wide

2006-01-30 Thread Carsten Driesner

Hi Felix,

you have to do the following:

1. Create a folder in /share/config/soffice.cfg
2. Copy your XML files (f.e. writermenubar.xml) to the folder.
3. Add the following XML snippet to installation>/share/registry/data/org/openoffice/Office/Common.xcu

...
 
  
   
$(insturl)/share/config
   
  
 
...


Now you should see that the new configuration data is used for the user 
interface elements. If it doesn't work, please check that there are no 
file in the user layer (/user/config/soffice.cfg). 
These file have a higher priority.


Regards,
Carsten

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Managing a menu system wide

2006-01-27 Thread Mathias Bauer
Felix E. Klee wrote:

> Am Freitag, 27. Januar 2006 16:09 schrieb Felix E. Klee:
>> BTW, I only want to add *one* menu.  I do not want to replace the entire
>> menu bar since individual users may have made changes to the menu bar.
> 
> BTW, what about creating the menu dynamically each time OO is started?  
> AFAICS, this would be a very nice solution since the menu could be modified 
> using settings stored in a configuration file for each user.

I wouldn't do that. OOo's startup performance is bad enough. :-)

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Managing a menu system wide

2006-01-27 Thread Felix E. Klee
Am Donnerstag, 26. Januar 2006 15:35 schrieb Laurent Godard:
> did you try to put it at share level ?
> /opt/OpenOffice.org1.1.4/share/config/soffice.cfg/writermenubar.xml

I just tried adding a menu called "Something New", but it doesn't appear, 
probably because I used bad syntax or because I need to somehow tell OO that 
this particular file exists.  Also, I added

  

to

  ~/OpenOffice.org1.1.4/user/config/soffice.cfg/META-INF/manifest.xml

but still no success.  Some info about "writermenubar.xml" on my system:

$ cd /opt/OpenOffice.org1.1.4/share/config/soffice.cfg
$ ls -l writermenubar.xml 
-rw-rw-rw-  1 root root 548 Jan 27 15:59 writermenubar.xml
$ cat writermenubar.xml 


http://openoffice.org/2001/menu"; menu:id="menubar">


  
  




BTW, I only want to add *one* menu.  I do not want to replace the entire menu 
bar since individual users may have made changes to the menu bar.

Any idea what's going wrong?

-- 
Dipl.-Phys. Felix E. Klee
Email: [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (home)
Tel: +49 721 8307937, Fax: +49 721 8307936
Linuxburg, Goethestr. 15A, 76135 Karlsruhe, Germany

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Managing a menu system wide

2006-01-27 Thread Felix E. Klee
Am Freitag, 27. Januar 2006 16:09 schrieb Felix E. Klee:
> BTW, I only want to add *one* menu.  I do not want to replace the entire
> menu bar since individual users may have made changes to the menu bar.

BTW, what about creating the menu dynamically each time OO is started?  
AFAICS, this would be a very nice solution since the menu could be modified 
using settings stored in a configuration file for each user.

But where does one put code that is to be started on startup?  I see that one 
can assign exactly *one* event to program start.  Is that it?  What if 
another "plugin" also wants to start a macro on program start?

-- 
Dipl.-Phys. Felix E. Klee
Email: [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (home)
Tel: +49 721 8307937, Fax: +49 721 8307936
Linuxburg, Goethestr. 15A, 76135 Karlsruhe, Germany

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Managing a menu system wide

2006-01-26 Thread Jürgen Schmidt

Laurent Godard wrote:

Hi Felix,

I've set up a custom menu for several users.  Now, if I want to change 
that menu, e.g. by adding a new item, I have to do that for every of 
these users by modifying the following file:


   ~/OpenOffice.org1.1.4/user/config/soffice.cfg/writermenubar.xml

This is quite tediuos and error prone.  Is it possible to tell 
"writermenubar.xml" to read the definition of a particular menu from a 
system wide file?


did you try to put it at share level ?
/opt/OpenOffice.org1.1.4/share/config/soffice.cfg/writermenubar.xml


that should work and in a future version we will probably be able to 
provide a clean solution to deploy such configuration changes with a UNO 
package either per user or for all users of the same installation.


Juergen



Laurent



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Managing a menu system wide

2006-01-26 Thread Laurent Godard

Hi Felix,

I've set up a custom menu for several users.  Now, if I want to change that 
menu, e.g. by adding a new item, I have to do that for every of these users 
by modifying the following file:


   ~/OpenOffice.org1.1.4/user/config/soffice.cfg/writermenubar.xml

This is quite tediuos and error prone.  Is it possible to tell 
"writermenubar.xml" to read the definition of a particular menu from a system 
wide file?


did you try to put it at share level ?
/opt/OpenOffice.org1.1.4/share/config/soffice.cfg/writermenubar.xml

Laurent

--
Laurent Godard <[EMAIL PROTECTED]> - Ingénierie OpenOffice.org
Indesko >> http://www.indesko.com
Nuxeo CPS >> http://www.nuxeo.com - http://www.cps-project.org
Livre "Programmation OpenOffice.org", Eyrolles 2004

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [api-dev] Managing a menu system wide

2006-01-26 Thread Felix E. Klee
Am Donnerstag, 26. Januar 2006 13:11 schrieb Felix E. Klee:
> This is quite tediuos and error prone.  Is it possible to tell
> "writermenubar.xml" to read the definition of a particular menu from a
> system wide file?

Perhaps by somehow including a system wide file into 

~/OpenOffice.org1.1.4/user/config/soffice.cfg/writermenubar.xml

?  Is this possible?

-- 
Dipl.-Phys. Felix E. Klee
Email: [EMAIL PROTECTED] (work), [EMAIL PROTECTED] (home)
Tel: +49 721 8307937, Fax: +49 721 8307936
Linuxburg, Goethestr. 15A, 76135 Karlsruhe, Germany

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]