Wliu
3f471cd94f
Merge remote-tracking branch 'refs/remotes/origin/master' into wl-electron-35
2016-01-25 16:33:50 -05:00
Michael Bolin
9423ec8b3a
Renamed local variables as recommended by @ssorallen.
2016-01-19 12:37:38 -08:00
Michael Bolin
3d5386e514
Honor created() function for an item in a submenu.
...
Fixes #10483 .
2016-01-18 16:39:19 -08:00
Michael Bolin
04b100fab8
Revert "Honor created() function for an item in a submenu."
...
This reverts commit 9917ed39aa .
Sorry, apparently I don't know how to use Git anymore.
I'm just trying to put this up for review and it went straight
to master instead.
2016-01-18 16:36:49 -08:00
Michael Bolin
9917ed39aa
Honor created() function for an item in a submenu.
...
Fixes #10483 .
2016-01-18 16:34:36 -08:00
Michael Bolin
f8d20760af
Revert "Honor created() function for an item in a submenu."
...
This reverts commit 962308509b .
2016-01-18 16:33:35 -08:00
Michael Bolin
962308509b
Honor created() function for an item in a submenu.
...
Fixes #10483 .
2016-01-18 16:32:16 -08:00
Cheng Zhao
2150790596
Use the new style of remote
2015-12-11 10:21:46 +08:00
Nathan Sobo
6de0da792b
Build ContextMenuManager in Atom environment constructor
2015-10-07 15:24:52 -05:00
Max Brunsfeld
7a0fa8ecdc
Merge pull request #8897 from ssorallen/lowercase-optional
...
Use lowercase 'optional' keyword used by docs
2015-09-24 11:26:07 -07:00
Ross Allen
59ba793d64
Use lowercase 'optional' keyword used by docs
...
The docs generator expects 'optional' starting with a lowercase 'o' to
mark arguments as optional. Lowercase 'O' to properly generate the docs.
2015-09-22 14:10:05 -07:00
Thomas Johansen
cc4ee92699
🔥 Remove deprecations from ContextMenuManager
2015-09-22 10:37:05 -06:00
Ross Allen
28f157acd9
Document MenuItem enabled and visible
...
The Electron MenuItem[1] `enabled` and `visible` options are exposed to
Atom context menus in menu_helpers.coffee[2] but are not yet documented.
Both options are passed through to Electron.
[1] http://electron.atom.io/docs/v0.31.0/api/menu-item/
[2] https://github.com/atom/atom/blob/v1.0.7/src/menu-helpers.coffee#L49
2015-08-26 09:00:23 -07:00
Lee Dohm
5884525648
📝 Add returns Disposable to ContextMenuManager.add
2015-05-31 05:27:38 -07:00
Ivan Zuzak
46ab8e7f63
Link to section in API docs for ContextMenuManager::add
2015-04-26 11:23:13 +02:00
Kevin Sawicki
84bab1c67b
Use selector validator provided by clear-cut
2015-04-13 18:03:14 -07:00
Kevin Sawicki
4c6722832b
⬆️ clear-cut@2.0
2015-04-13 18:01:40 -07:00
Kevin Sawicki
5449658011
Remove specificity caching now handled by clear-cut
2015-04-13 17:47:25 -07:00
Kevin Sawicki
80787ef1e2
Remove try/catch around package.json requiring
...
No other requires are ever guarded against and the package.json should
be assumed to be valid JSON.
2015-04-08 09:30:40 -07:00
Kevin Sawicki
ca67d33ebe
Use inlined context menu from package.json when available
2015-04-08 09:16:56 -07:00
Kevin Sawicki
7d592c8b78
includeDeprecations -> includeDeprecatedAPIs
2015-04-03 11:29:16 -07:00
Kevin Sawicki
23d1c72a5f
Remove unused imports
2015-04-03 11:29:14 -07:00
Kevin Sawicki
4884e32a3d
Conditionally include deprecations in ContextMenuManager
2015-04-03 11:29:11 -07:00
Kevin Sawicki
590a4b0fd5
Add explicit return after for loop
2015-03-19 11:48:40 -07:00
Kevin Sawicki
ce33e63532
selector-parser -> selector-validator
2015-03-04 10:02:04 -08:00
Kevin Sawicki
1bb011deed
🎨
2015-03-04 10:02:04 -08:00
Kevin Sawicki
c172f78ab5
Use consistent selector error
2015-03-04 10:02:03 -08:00
Kevin Sawicki
5902bc42e9
Throw error when adding context menu with invalid selector
2015-03-04 10:02:03 -08:00
Max Brunsfeld
02a6ed554d
Make ContextMenuManager::showForEvent private
...
Signed-off-by: Nathan Sobo <nathan@github.com >
2015-01-09 15:47:30 -08:00
Ben Ogle
a47782ddd8
Fix context menu docs Closes #4963
2015-01-09 13:28:57 -08:00
Ben Ogle
3b5bb1501c
💄
2015-01-06 17:09:59 -08:00
Ben Ogle
8c4c15c17a
Fix colons in examples
2015-01-06 17:03:29 -08:00
Ben Ogle
f7f2f4497b
Add docs for cson format to menu manager
2015-01-06 16:51:15 -08:00
Ben Ogle
d4c4ab58b1
More information in the context menu docs
2015-01-06 16:45:31 -08:00
Nathan Sobo
6770570f13
Don't call Grim.deprecate for undefined context menus
...
This preserves the original behavior, in which passing undefined to
atom.contextMenu.add was a no-op that returned a no-op disposable.
Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com >
2014-11-11 16:24:02 -07:00
Nathan Sobo
1eb3d8bf99
Use ‘atom-text-editor’ custom tag name for TextEditorElement
2014-10-09 07:39:14 -07:00
Nathan Sobo
8941b97ed2
Use ‘atom-workspace’ custom tag name for WorkspaceElement
2014-10-09 07:39:14 -07:00
Nathan Sobo
6b9345a97d
Avoid double clone of menu item now that helper does it
2014-10-08 15:56:13 -07:00
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