diff options
author | 2012-06-06 15:28:53 -0400 | |
---|---|---|
committer | 2012-06-06 15:28:53 -0400 | |
commit | 33ed52fcdcbbfcd00a59c5064a9b16f65eba3266 (patch) | |
tree | 62b39488aced07138cfa9450c72954a423342b99 /core/gui.lua | |
parent | bcfd004c998b66b5c769d491fa4aa60cf6ef6696 (diff) | |
download | textadept-33ed52fcdcbbfcd00a59c5064a9b16f65eba3266.tar.gz textadept-33ed52fcdcbbfcd00a59c5064a9b16f65eba3266.zip |
Removed 'gtk-' stock menus and changed 'separator' to ''.
Diffstat (limited to 'core/gui.lua')
-rw-r--r-- | core/gui.lua | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/core/gui.lua b/core/gui.lua index bc6f034a..a81877b0 100644 --- a/core/gui.lua +++ b/core/gui.lua @@ -468,18 +468,17 @@ local get_split_table local goto_view --- --- Creates a GTK menu, returning the userdata. +-- Creates a menu, returning the userdata. -- @param menu_table A table defining the menu. It is an ordered list of tables --- with a string menu item, integer menu ID, and optional keycode and modifier --- mask. The latter two are used to display key shortcuts in the menu. The --- string menu item is handled as follows: --- `'gtk-*'` - a stock menu item is created based on the GTK stock-id. --- `'separator'` - a menu separator item is created. --- Otherwise a regular menu item with a mnemonic is created. --- Submenus are just nested menu-structure tables. Their title text is defined --- with a `title` key. +-- with a string menu item, integer menu ID, and optional GDK keycode and +-- modifier mask. The latter two are used to display key shortcuts in the +-- menu. `_` characters are treated as a menu mnemonics. If the menu item is +-- empty, a menu separator item is created. Submenus are just nested +-- menu-structure tables. Their title text is defined with a `title` key. +-- @usage gui.menu{ { '_New', 1 }, { '_Open', 2 }, { '' }, { '_Quit', 4 } } +-- @usage gui.menu{ { '_New', 1, keys.get_gdk_key('cn') } } -- @see keys.get_gdk_key -- @class function --- @name gtkmenu -local gtkmenu +-- @name menu +local menu ]] |