v0.3 #3
EdoFro
announced in
Announcements
Replies: 1 comment
|
I added an init script, that executes automatically when Freeplane starts and applies the mod to the tabbed panel automatically. I added also an option in Freeplane's preferences panel for the user to activate/inactivate this behavior. I think it is a good example for an init script, because it also looks if the addon is active. That means that if the user decided to inactivate this addon as a whole, the init script won't do anything. here is the init script: import org.freeplane.main.addons.AddOnsController
//is addon active?
def isTabbedPanelModAddOnActive = AddOnsController.getController().getInstalledAddOn('tabbedPanelMod')['active']
//user wants to execute command on start up? (user preferences)
def runOnStartingFreeplane = config.getBooleanProperty('tabbedPanelMod_runOnStartingFreeplane',false)
//if both true, then it executes the script
if(isTabbedPanelModAddOnActive && runOnStartingFreeplane){
menuUtils.executeMenuItems(['addons.tabbedPanelMod.TabbedPanelMod_on_single_node'])
}
bye, |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
v0.3
This discussion was created from the release v0.3.
All reactions