Commit graph

89 commits

Author SHA1 Message Date
Shelley Vohr
f67c625e6a
don't filter out invisible menu separators (#12825) 2018-05-04 07:59:40 -07:00
Shelley Vohr
7c4964fae6
revert to more graceful template structure check (#12699) 2018-04-24 11:21:26 -04:00
Cheng Zhao
7473b612c5 Make Menu API accept TopLevelWindow 2018-04-19 13:08:37 +09:00
Shelley Vohr
a677c22e1f
re-enable null check against menu item accelerators (#12449) 2018-03-27 20:32:55 -04:00
Shelley Vohr
31d688ad3d
Check menu.popup options are an object (#12325)
* check menu.popup options are an object

* Add a spec for menu.popup options check

* remove stray .only
2018-03-17 06:31:10 +09:00
John Kleinschmidt
2a97e48465
Merge pull request #11968 from electron/refactor-menu-popup
Refactor menu.popup
2018-02-21 14:29:52 -05:00
Charles Kerr
9c56b81b71 Throw an error if menu.popup() has no window 2018-02-20 18:38:05 -06:00
Charles Kerr
5a25b88b50 Fix browserWindow detection in menu.popup() 2018-02-20 18:35:39 -06:00
Shelley Vohr
5065e159f1
positionItem => positioningItem 2018-02-20 11:28:34 -05:00
Cheng Zhao
dc62e51ba4 Fix the cyclic reference in menu delegate (#11967)
* Fix the cyclic reference in menu delegate

* Fix menu tests due to delegate change
2018-02-20 10:11:35 -06:00
Shelley Vohr
fb7fb4972d
options all the things 2018-02-20 11:10:53 -05:00
Shelley Vohr
56f06187d5
forgot to remove old method 2018-02-19 21:03:10 -05:00
Shelley Vohr
6e11a3e53d
add restructured window.popup 2018-02-19 20:59:27 -05:00
Shelley Vohr
cd9e7142e4
add conditional for menu.popup(window, callback) 2018-02-19 13:06:37 -05:00
shelley vohr
5240352326 Remove extra menu separators (#11827)
* add function to remove leading/trailing separators

* change const  name for clarity

* add spec to check filtered separators

* clean method and add edge case spec per review
2018-02-05 11:55:12 -06:00
Cheng Zhao
46330ac2a9 Remove the closed event of Menu
The callback of Menu.popup does more things, and there is actually no
request for the closed event.
2018-01-01 17:22:07 +09:00
Cheng Zhao
73d78d345a Make callback work for old-style Menu.popup call
While the old-style Menu.popup has been deprecated, it is still being
used widely in apps and even in Electron itself.
2018-01-01 17:17:01 +09:00
Cheng Zhao
7b01a8b860 Add callback parameter to Menu.popup 2018-01-01 16:26:19 +09:00
Cheng Zhao
088042841d win: Correctly close popup menu 2017-12-21 15:26:32 +09:00
Heilig Benedek
c586806609 fix flash menu being unresponsive to commands 2017-12-20 15:40:07 +09:00
Felix Rieseberg
8166a64f98 🔧 Last round of feedback 2017-12-12 11:25:01 -08:00
Felix Rieseberg
c4ec8b4545 🔧 Feedback 2017-12-12 11:25:01 -08:00
Felix Rieseberg
5b7f7c8a1a 🔧 Menu returns its properties now 2017-12-12 11:25:01 -08:00
Felix Rieseberg
ffc54967e9 🔧 Fix value shift 2017-12-12 11:25:01 -08:00
Felix Rieseberg
99031834ff 🔧 Cleanup 2017-12-12 11:25:01 -08:00
Felix Rieseberg
3719ee0b53 🔧 Allow for menu.popup({}) 2017-12-12 11:25:01 -08:00
Felix Rieseberg
9e660b1d32 🔧 Always find a window (or error) 2017-12-12 11:25:01 -08:00
Felix Rieseberg
4f901c6d24 🔧 Oh wow, that looks wrong 2017-12-12 11:25:01 -08:00
Alexey Kuzmin
1c8eb03574
Revert "fix: Fix menu.popup() bugs" 2017-12-12 13:59:34 +03:00
Felix Rieseberg
927c63b477 🔧 Last round of feedback 2017-12-11 15:19:33 -08:00
Felix Rieseberg
89b90be6a2 🔧 Feedback 2017-12-11 14:43:35 -08:00
Felix Rieseberg
22e9d665d2 🔧 Menu returns its properties now 2017-12-11 14:03:01 -08:00
Felix Rieseberg
93b46116f4 🔧 Fix value shift 2017-12-11 13:30:35 -08:00
Felix Rieseberg
abd56eda6f 🔧 Cleanup 2017-12-08 14:40:51 -08:00
Felix Rieseberg
955564abd7 🔧 Allow for menu.popup({}) 2017-12-08 14:37:16 -08:00
Felix Rieseberg
bd6767fac6 🔧 Always find a window (or error) 2017-12-08 14:36:52 -08:00
Felix Rieseberg
38bb9baac5 🔧 Oh wow, that looks wrong 2017-12-08 14:36:29 -08:00
Birunthan Mohanathas
4e859b4718 Remove "async" option from menu.popup()
All menus are async now. See "Cleanup MenuRunner API"
https://codereview.chromium.org/2790773002
2017-11-24 10:58:17 +09:00
Felix Rieseberg
d475eaf011
🔧 One commit per character is now hot 2017-11-07 19:44:24 -08:00
Felix Rieseberg
3dcde82485
🔧 Make this easier to read 2017-11-07 18:26:10 -08:00
Felix Rieseberg
1454783450 🔧 Check menu for being falsy 2017-11-07 13:29:14 -08:00
Shelley Vohr
bccaf56200
remove common sense comments 2017-10-25 12:23:41 -04:00
Shelley Vohr
ffd43c1886
remove quotes and const replaces 2017-10-25 10:17:41 -04:00
Shelley Vohr
e8935232b1
clean falsy statements 2017-10-24 18:52:12 -04:00
Shelley Vohr
75f32afcd5
clean up excess code from generateGroupId 2017-10-24 00:24:57 -04:00
Shelley Vohr
f93121b226
don't reassign parameters in Menu.prototype.popup 2017-10-24 00:07:39 -04:00
Shelley Vohr
b1e707d535
abstract out switch case from Menu.prototype.insert 2017-10-23 23:46:39 -04:00
Shelley Vohr
7c0f7329d9
appease the linter overlords 2017-10-23 22:35:42 -04:00
Shelley Vohr
508b614769
remove excess code in delegate 2017-10-23 22:33:23 -04:00
Shelley Vohr
9b364d5be3
refactor menuWillShow 2017-10-23 22:22:39 -04:00