[code] [textadept] In-place Menu Editing

From: Mitchell <m.att.foicica.com>
Date: Wed, 28 May 2014 01:50:57 -0400 (EDT)


I've just committed a change that allows for in-place menu editing. This
should show up in the nightly for 28 May. It is now possible to append
menu items (including full sub-menus) to Textadept's existing menubar,
context menu, and tab context menu. For example, to append to Textadept's
"Tools" menu:

   local tools = textadept.menu.menubar[4]
   tools[#tools + 1] = {title = 'Test',
     {'foo', {ui.print, 'foo'}},
     {'bar', {ui.print, 'bar'}}

It will place a 'Test' submenu at the end of the "Tools" menu that
prints text for menu items selected. Similarly you can append single menu

   tools[#tools + 1] = {'Label', command}

`textadept.menu`'s API now exposes `menubar`, `context_menu`, and
`tab_context_menu` table fields and removes the `set_menubar()` and
`set_contextmenus()` functions.


You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 28 May 2014 - 01:50:57 EDT

This archive was generated by hypermail 2.2.0 : Wed 28 May 2014 - 06:40:31 EDT