Nathan Sobo
6ce5356505
Fix handling of submenus in conversion of legacy context menu format
2014-10-02 10:47:03 -06:00
Nathan Sobo
b2cc28fb5b
Rename commandOptions to commandDetail on context menu items
2014-09-30 12:15:56 -06:00
Nathan Sobo
eb929cb7a2
Honor item specificity while still preserving addition order
...
Rather than using order to specify item precedence, we now construct
a set of menu items for each element traversing upward from the target.
When merging items for a given element, we pass the specificity to the
merge function, which uses it to decide whether or not to clobber
existing items. When assembling the overall menu, we don’t ever clobber
to ensure that items added for elements closer to the target always win
over items matching further up the tree.
2014-09-30 12:06:27 -06:00
Nathan Sobo
cf80b92f9a
Remove logging
2014-09-30 12:06:27 -06:00
Nathan Sobo
36d5359ef4
Restore original context menu ordering
...
Previously I used CSS specificity to order the most specific / recently
added menu items for a given element *first* when building up the
context menu. When a duplicate label was found for a given menu I would
refrain from inserting it. Now instead I order things the opposite way.
The most specific / recently added items come later and items with the
same label are clobbered by later items.
2014-09-30 12:06:26 -06:00
Nathan Sobo
915cfe15f5
Clear context menus between specs
2014-09-30 12:06:26 -06:00
Nathan Sobo
f9bf42db64
Remove commented line
2014-09-30 12:06:26 -06:00
Nathan Sobo
ff76e36f7d
Only display ‘Inspect Element’ item in dev mode
2014-09-30 12:06:26 -06:00
Nathan Sobo
740778e129
Auto-detect context menu items in the old format
2014-09-30 12:06:26 -06:00
Nathan Sobo
483e746439
Use new format for platform menus
2014-09-30 12:06:26 -06:00
Nathan Sobo
aec6df828e
fixup! Call context menu item ::created hooks with the click event
2014-09-30 12:06:09 -06:00
Nathan Sobo
703197bcca
Deprecate old style calls to ContextMenuManager::add
2014-09-30 12:06:09 -06:00
Nathan Sobo
2142c8e63e
:public: Document new ContextMenuManager::add API
2014-09-30 12:06:09 -06:00
Nathan Sobo
782f9c609e
Add shouldDisplay hook for context menu items
...
If present, if a falsy value is returned from this function for a given
context menu invocation, the item will not be displayed.
2014-09-30 12:06:09 -06:00
Nathan Sobo
3a567b3c5b
Call context menu item ::created hooks with the click event
2014-09-30 12:06:08 -06:00
Nathan Sobo
c5b395579b
Add devMode flag to individual items
2014-09-30 12:06:08 -06:00
Nathan Sobo
f8225a6441
Make arguments atom.contextMenu.add consistent with atom.menu.add
2014-09-30 12:06:08 -06:00
Ben Ogle
6379f87b8a
ContextMenuManager is Extended
2014-09-16 13:40:37 -07:00
Ben Ogle
70e1d14f96
Add KeymapManager::onDidLoadBundledKeymaps
2014-09-10 17:28:47 -07:00
Ivan Žužak
a00b3b2cc9
Merge pull request #3394 from atom/iz-builtin-context-menu-commands
...
Add cut/copy/paste built-in context menu items
2014-08-28 20:41:21 +02:00
Ivan Zuzak
096255f283
Support built-in context menu items
2014-08-27 13:54:55 +02:00
Ben Ogle
a296364e53
Fixup doc strings that don’t parse correctly
...
We can’t have a huge indent on the second line of a list item. Markdown
parses it as a code block. :(
2014-08-26 10:47:36 -07:00
Kevin Sawicki
af67671f60
📝 Convert ContextMenuManager docs
2014-08-25 15:08:45 -07:00
Ivan Zuzak
cd1a17fb0a
Support multiple separators in context menu
2014-07-14 17:10:13 -07:00
Philip Schatz
624c0bf9f1
allow multiple labels for the same command
2014-06-17 23:36:59 -04:00
Philip Schatz
2fdcf7a124
remove duplicate context menu entries
2014-06-13 21:30:55 -04:00
Corey Johnson
ce527aea10
Pull out menu item building into seperate method
2014-06-03 10:51:46 -07:00
Corey Johnson
950338ed22
Fix linter errors
2014-06-03 10:17:53 -07:00
erikhakan@gmail.com
aef75238ec
added separator for submenu
2014-05-28 21:58:23 +02:00
Erik Håkansson
419b1ec348
Submenus now work with old context menu structure
2014-05-28 21:50:42 +02:00
Erik Håkansson
6295c2ddc4
minor changes
2014-05-24 23:52:08 +02:00
Erik Håkansson
5ca6d01911
renamed variable to make code more understandable
2014-05-24 23:52:08 +02:00
Erik Håkansson
6d9fed6644
removed unnecessary newlines
2014-05-24 23:52:08 +02:00
Erik Håkansson
3c8bfb8bc8
Context menus can now handle different types and commands, as well as submenus
2014-05-24 23:52:08 +02:00
Cheng Zhao
6fa6863244
Don't popup context menu with no items, fixes #2032 .
...
On OS X popuping an empty context menu would have no effect but on Linux
an empty menu container would still be showed.
2014-05-20 22:36:51 +08:00
Kevin Sawicki
020c5e795a
Remove unneeded .
2014-04-17 11:24:53 -07:00
Kevin Sawicki
a46fcc1985
📝 doc parameters in context-menu-manager.coffee
2014-02-06 15:50:21 -08:00
Kevin Sawicki
cee0b951fb
Remove empty Private: comments
2014-02-06 10:11:32 -08:00
Kevin Sawicki
932a792289
Remove Private: prefix
2014-02-06 10:02:53 -08:00
Kevin Sawicki
ece269f158
📝 Consistently mention what classes have global instances
2014-02-04 10:06:37 -08:00
Kevin Sawicki
98694e5407
Use a class instead of id for workspace view
2013-12-02 08:23:29 -08:00
Kevin Sawicki
86ae743e9d
Use correct workspace view id
2013-12-02 08:17:31 -08:00
Kevin Sawicki
a3c9e01595
Rename root-view element id to workspace-view
2013-11-26 11:02:53 -08:00
Kevin Sawicki
9d51d1a143
Use jquery provided by space-pen
2013-10-16 13:34:41 -07:00
Kevin Sawicki
e2ecff22c2
Use underscore-plus instead of underscore
2013-10-15 13:57:34 -07:00
Matt Colyer
f82449c814
Only show context menu separator when it makes sense.
2013-09-19 14:44:15 -07:00
Matt Colyer
c39ced381d
Implement declarative context menu loading
2013-09-19 14:21:31 -07:00
Matt Colyer
037d39e943
Rewrite based on feedback
2013-09-18 09:53:57 -07:00
Matt Colyer
2f419a639c
s/ContextMenuMap/ContextMenu/g
2013-09-17 14:34:05 -07:00