[Solved]Toggle check mark in menu items for Python extension

Discussions about using 3rd party extension with OpenOffice.org

[Solved]Toggle check mark in menu items for Python extension

Postby jmarch » Mon Dec 24, 2018 12:41 am

[Solved] I'm developing an OpenOffice extension using Python. I would like to toggle on/off a check mark for the menu item when it is selected. I have added my menu items in Addons.xcu, but I'm not sure how to access them in Python code to toggle the check status when they are clicked. Any help would be really appreciated.
Thanks.
Last edited by jmarch on Fri Jan 11, 2019 4:30 pm, edited 2 times in total.
LibreOffice 6.0.5.2 on Mac Mojave.
jmarch
 
Posts: 5
Joined: Mon Dec 24, 2018 12:36 am

Re: Toggle check mark in menu items for Python extension

Postby hanya » Tue Jan 01, 2019 2:15 pm

Post by calling statusChanged with FeatureStateEvent.State = bool in your dispatch object.
So you need dispatch object and you have to receive object which implements css.frame.XStatusListener when your dispatch provider is called.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
hanya
Volunteer
 
Posts: 885
Joined: Fri Nov 23, 2007 9:27 am
Location: Japan

Re: Toggle check mark in menu items for Python extension

Postby jmarch » Wed Jan 02, 2019 7:20 pm

Thanks! That helped a lot. That is working now.
LibreOffice 6.0.5.2 on Mac Mojave.
jmarch
 
Posts: 5
Joined: Mon Dec 24, 2018 12:36 am


Return to Extensions

Who is online

Users browsing this forum: No registered users and 1 guest