Menu

#2200 Lost nested sub-menus for new scripts in add-ons

Next Release
new
nobody
None
normal
minor
HaveNotTried
none
Windows
7
2015-03-07
2014-11-24
No

--------My original post in the Open Discussion -------

There are disappearing sub-menus in my add-on.
When I put "/menu_bar/NewMenu" in the property field <menuLocation>, everything is fine. But if i try to put all my macros under "/menu_bar/NewMenu/NewSubMenu", "/menu_bar/NewMenu/NewSubMenu2", etc... then nothing happens when I load the add-on. No "NewMenu" or "NewMenu/NewSubMenu" actually appears in the menu bar at all.
I am puzzled. And it is pretty problematic, because I wanted to organize all my scripts in a menu tree to get them organized and ready available. After all, Freeplane itself is about tree structures. You can't blame users to be longing for that capability when organizing scripts. Am I doing something wrong? Can you offer some advise about this?

-----------Volker hint to solve it------------

Miguel, the problem seems to be ScriptingRegistration.registerScripts():
else {
if (!registeredLocations.contains(location)) {
addSubMenu(menuBuilder, parentLocation(location), location, getMenuTitle(location));
registeredLocations.add(location);
}
titleKey = metaData.getTitleKey(executionMode);
scriptLocation = location + "/" + titleKey;
}
This doesn't work recursively. Would you like to fix it and send me a pull request?
Regards, Volker

---------Volker final statment about this-----------

Ok, please create a new issue in Mantis. I'll see when I find the time to fix it.
Volker

Related

SourceForge Support: Feature Requests: #342
Old Bug Tickets replaced by GitHub Issues: #2200

Discussion

  • Miguel Boyer

    Miguel Boyer - 2015-03-05

    Dear Volker:
    Did you find any time slot to take care of this for the next release? I wish you could. Anyway, just a reminder. Thank you so much.

     
  • Volker Börchers

    Miguel, thanks for the reminder. I'll do my very best to work on this issue for 1.3.x. The next release (1.4) will probably have a different menu management due to the introduction of ribbons menu. Maybe the fix would work then as well.

    Best regards,
    Volker

     
    • Miguel Boyer

      Miguel Boyer - 2015-03-07

      That's so frigging cool...
      Thank you so much, Volk !!!

      2015-03-07 17:40 GMT+01:00 "Volker Börchers" boercher@users.sf.net:

      Miguel, thanks for the reminder. I'll do my very best to work on this
      issue for 1.3.x. The next release (1.4) will probably have a different menu
      management due to the introduction of ribbons menu. Maybe the fix would
      work then as well.

      Best regards,
      Volker


      Status: new
      Group: Next Release
      Created: Mon Nov 24, 2014 11:43 AM UTC by Miguel Boyer
      Last Updated: Thu Mar 05, 2015 10:39 AM UTC
      Owner: nobody

      --------My original post in the Open Discussion -------

      There are disappearing sub-menus in my add-on.
      When I put "/menu_bar/NewMenu" in the property field <menuLocation>,
      everything is fine. But if i try to put all my macros under
      "/menu_bar/NewMenu/NewSubMenu", "/menu_bar/NewMenu/NewSubMenu2", etc...
      then nothing happens when I load the add-on. No "NewMenu" or
      "NewMenu/NewSubMenu" actually appears in the menu bar at all.
      I am puzzled. And it is pretty problematic, because I wanted to organize
      all my scripts in a menu tree to get them organized and ready available.
      After all, Freeplane itself is about tree structures. You can't blame users
      to be longing for that capability when organizing scripts. Am I doing
      something wrong? Can you offer some advise about this?

      -----------Volker hint to solve it------------

      Miguel, the problem seems to be ScriptingRegistration.registerScripts():
      else {
      if (!registeredLocations.contains(location)) {
      addSubMenu(menuBuilder, parentLocation(location), location,
      getMenuTitle(location));
      registeredLocations.add(location);
      }
      titleKey = metaData.getTitleKey(executionMode);
      scriptLocation = location + "/" + titleKey;
      }
      This doesn't work recursively. Would you like to fix it and send me a pull
      request?
      Regards, Volker

      ---------Volker final statment about this-----------

      Ok, please create a new issue in Mantis. I'll see when I find the time to
      fix it.
      Volker


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/freeplane/bugs/2200/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Old Bug Tickets replaced by GitHub Issues: #2200