nous-
f54c94d6c9
Fixes electron/electron#12147 ( #12193 )
2018-03-15 13:29:32 +09:00
Charles Kerr
e400585a0e
Apply further ES6 bikeshedding
2018-03-13 17:09:47 +09:00
Charles Kerr
2d90e763ad
Use idiomatic ES6 when merging options
2018-03-13 16:23:39 +09:00
Charles Kerr
379bd79de4
Remove unnecessary work when merging options
2018-03-13 16:18:50 +09:00
Charles Kerr
685948bcaa
Parent's visibility trumps inherited 'show' option
2018-03-13 00:28:34 +09:00
Samuel Attard
795447f61a
Implement dialog (alert/confirm) blocking as a user switch after the first dialog
...
* This is to enable more browser-like behavior so that users who run third-party code
will not be DOS'ed with alerts and confirms. This is already handled like this
in most major browsers so this will greatly help these developers
2018-03-06 11:19:15 +09:00
Shelley Vohr
199cf31b9e
deprecate screen.getMenuBarHeight
2018-03-05 19:45:51 -05:00
Cheng Zhao
35cbe9d140
Fix dockMenu not being referenced in JavaScript ( #12062 )
...
* Fix dockMenu not being referenced in JavaScript
* spec: Test garbage collecting dock menu
2018-02-26 22:15:06 -08:00
shelley vohr
18362eb948
improve Menu and MenuItem testing ( #12015 )
...
* split menu/menuitem and add some tests
* fix ipc send issue
* feedback: make tests less brittle
* clean up MenuItem accelerator and label tests
2018-02-23 07:53:59 -06:00
John Kleinschmidt
2a97e48465
Merge pull request #11968 from electron/refactor-menu-popup
...
Refactor menu.popup
2018-02-21 14:29:52 -05:00
shelley vohr
193febd18c
deprecate boolean highlightMode param ( #11993 )
...
* deprecate boolean highlightMode param
* add process.noDeprecations check
* fix native method override
* add todo
2018-02-20 22:30:32 -06:00
shelley vohr
719e5a93b4
deprecation for webContents.openDevTools ( #11986 )
...
* deprecate old openDevTools param
* add deprecation check and existence check
* fix method issues
2018-02-20 22:30:02 -06:00
Charles Kerr
f59d078eea
Use more idiomatic JS in WebContents' init()
2018-02-20 19:20:11 -06: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
Charles Kerr
708f39a1a5
update a few menu.popup() calls to use the new API
2018-02-20 14:02:24 -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
211b542ae4
remove setZoomLevelLimits
2018-02-20 08:57:48 -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
Samuel Attard
a20b379f26
fix windows tests
2018-02-16 16:02:10 +11:00
Samuel Attard
6318cd781d
Update to use Squirrel.Mac that supports CDN releases
2018-02-15 14:00:46 +11:00
acheronfail
d1d50a4c92
Implement App-Scoped Security scoped bookmarks ( #11711 )
...
* implementation of security scoped bookmarks
* option is now only available on mas builds
2018-02-12 13:25:06 -05:00
Samuel Attard
66b57858b8
Fix child touch bar items not updating ( #11812 )
...
* Fix child touch bar items not updating
Deep children of a TouchBar didn't cause the top level touch bar to update, now they do
Fixes #11761 .
* Remove unused newValue property in TB setter
2018-02-12 12:53:04 -05:00
kaylie
3c64062f69
Replace custom function with Object.values()
2018-02-05 20:03:28 -08: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
8ae3d9dd0b
Simplify the public PowerObserver interface
2018-02-05 15:28:58 +09:00
Thiago de Arruda
56b53e71aa
Implement powerMonitor 'shutdown' event for Linux.
...
The event is emitted when the OS is rebooting/shutting down, and allows
an electron app to call `e.preventDefault()` in order to delay shutdown
and exit cleanly.
2018-02-05 15:21:31 +09:00
Shelley Vohr
db6d84de74
don't inherit isBrowserView for spawned child windows
2018-02-01 00:09:37 -05:00
Samuel Attard
32a1395bcf
Merge pull request #11565 from electron/add-load-file-helper
...
Add window.loadFile and webContents.loadFile helper methods
2018-01-23 09:08:23 +11:00
Cheng Zhao
bd271cffb9
Throw when inAppPurchase is used on unsupported platforms
2018-01-10 18:53:55 +09:00
Cheng Zhao
ac6f895f64
Turn InAppPurchase into an EventEmitter
2018-01-10 16:37:05 +09:00
Adrien Fery
b2542a27c3
Update code style
2018-01-10 13:14:18 +09:00
Adrien Fery
eb2520488f
Adapt code style
2018-01-10 13:14:18 +09:00
Adrien Fery
f3ae566164
Add in-app purchase for MacOS
2018-01-10 13:14:18 +09:00
Zeke Sikelianos
eb89e12c5b
Merge pull request #11532 from sethlu/camelcase-menuitem-role
...
Make MenuItem roles camelCase-compatible
2018-01-04 09:53:58 -08:00
Samuel Attard
1553b54779
Add window.loadFile and webContents.loadFile helper methods
2018-01-04 11:38:56 +13: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
Zhuo Lu
b8ec84c761
Fix syntax
2018-01-01 02:23:32 +08:00
Zhuo Lu
d45914c3f7
MenuItem roles camelCase-compatible
2017-12-28 13:28:20 +08:00
Kyle Corry
5aac091f40
Add Support for Pop!_OS GNOME Session
...
Similar to this PR: https://github.com/electron/electron/pull/10355 , Pop!_OS suffers from the same problem. Using Ubuntu AppIndicator will not show the icon currently unless the XDG_CURRENT_DESKTOP variable is modified. This commit will add support for pop so that this workaround is not needed.
Ref: https://github.com/pop-os/pop/issues/84
2017-12-21 14:16:15 -05:00
Cheng Zhao
088042841d
win: Correctly close popup menu
2017-12-21 15:26:32 +09:00
Cheng Zhao
e4770c7604
Coding style fixes
2017-12-20 18:48:09 +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
Felix Rieseberg
9646f0c99a
🔧 Sprinkle some ES6 across the file
2017-12-01 17:18:57 -08:00
Felix Rieseberg
c5abe96b39
🔧 Hide subprocess window
2017-12-01 17:18:37 -08:00
Cheng Zhao
b161a4f515
Merge pull request #11166 from sethlu/openrecent
...
feat: Recent documents menu item
2017-11-28 10:55:14 +09:00
Zhuo Lu
dcdc3621ac
Rename roles
2017-11-27 17:26:22 +09:00
Zhuo Lu
5d44dbaf54
Redesign recent documents role API
...
- For more flexibility in designing the recent documents menu, now there can be one menu item (known issue: you may specify more but AppKit doens't display more than one) in the submenu list, rather than separating the labels with a tab.
- Also added is the role `clearrecent` that can be given to a menu item that can clear the recent documents.
2017-11-27 17:26:22 +09:00
Zhuo Lu
828d233f2a
Rollback duplicated feature
2017-11-27 17:26:22 +09:00
Zhuo Lu
0b9cea334f
Specify "Clear Menu" through label option
...
Like a bit of a hack right now, conforming to the existing menu item definition
2017-11-27 17:26:22 +09:00
Zhuo Lu
4da2eb9366
Introduce openrecent role
...
- Does not yet accept any options except label--"Clear Menu" can't be modified through exposed node API
- If `openrecent` is present across multiple menu items, the last seen will be visible in the main menu due to that it is designed to behave like a singleton
2017-11-27 17:26:22 +09:00
Zhuo Lu
f0bff74995
Add "Open Recent" submenu to default
2017-11-27 17:26:22 +09:00
Cheng Zhao
1c0ea0286e
Merge pull request #11235 from electron/standard-10
...
infra: Upgrade to StandardJS 10
2017-11-27 15:42:52 +09: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
f7d6e3fa7b
🔧 Disable standard/no-callback-literal where necessary
2017-11-23 13:53:03 -08:00
Felix Rieseberg
f81bfb7b86
🔧 Fix style issues
2017-11-23 13:42:48 -08:00
Charles Kerr
9c217fc6c7
Merge pull request #11224 from electron/browser-view-window
...
feature: Add `BrowserWindow.fromBrowserView()`
2017-11-23 14:41:36 +01:00
Felix Rieseberg
037f76c47b
🐛 Ooops, fix that
2017-11-22 17:07:57 -08:00
Felix Rieseberg
4d18cbe728
🔧 BrowserView.fromWebContents()
2017-11-22 16:59:00 -08:00
Felix Rieseberg
7630ac6e90
🔧 Return null if not found
2017-11-22 15:48:11 -08:00
Felix Rieseberg
8c5aad8b17
🔧 Add BrowserWindow.fromBrowserView()
2017-11-22 14:36:54 -08:00
Felix Rieseberg
05bae0b4c4
🔧 Util is no longer used here
2017-11-20 09:52:13 -08:00
Felix Rieseberg
b029c088db
🔧 Bonus ;
2017-11-20 09:48:33 -08:00
Felix Rieseberg
b8b3b441a7
🔧 util._extend is deprecated, too
2017-11-20 09:46:02 -08:00
Felix Rieseberg
5b18bea7e3
🔧 Alex has good ideas
2017-11-18 10:59:09 -08:00
Felix Rieseberg
cf7e9df3a0
🔧 Appease the linter
2017-11-18 01:02:09 -08:00
Felix Rieseberg
9a2d103e7f
:thinking_face: What if we made it an Error again?
2017-11-18 00:51:14 -08:00
Heilig Benedek
cafb9477b0
lint fix
2017-11-13 15:46:46 +09:00
Heilig Benedek
13b86598e8
don't show osr dummy window when dialog is shown on mac
2017-11-13 15:46:46 +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
Charles Kerr
1c09dede1a
singletons that are retroactively turned into EventEmitters should call the EventEmitter ctor
2017-11-01 23:05:27 -05:00
Shelley Vohr
bb04b22ec8
Merge pull request #10888 from electron/menu_refactor
...
refactor menu.js to bring it up to readability and es6 standards
2017-10-26 00:31:47 -04:00
Cheng Zhao
4db34ff092
Merge pull request #10711 from yuya-oc/did-attach-webview
...
Add did-attach-webview event
2017-10-26 10:55:50 +09: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
7593bec687
update reviewed items
2017-10-24 19:36:06 -04:00
Shelley Vohr
e8935232b1
clean falsy statements
2017-10-24 18:52:12 -04:00
Shelley Vohr
98df153750
convert to map and remove shift param
2017-10-24 15:47:09 -04:00
Shelley Vohr
491a00fd84
clean main process desktop_capturer
2017-10-24 12:49:37 -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
Shelley Vohr
9038987e1d
significant cleanup; all tests still passing
2017-10-23 20:04:22 -04:00
Shelley Vohr
3fc5d51a96
clean up delegate
2017-10-23 18:35:16 -04:00
Shelley Vohr
577c0042b0
update to ES6
2017-10-23 14:47:47 -04:00
Shelley Vohr
87802b2c17
initial port of things into a Menu class
2017-10-23 12:11:59 -04:00
Shelley Vohr
61a93c711c
clean up popup
2017-10-23 00:47:02 -04:00
Shelley Vohr
f9c3123f5f
clean up menuWillShow
2017-10-23 00:16:35 -04:00
Shelley Vohr
1cd53768ab
clean up indexToInsertByPosition
2017-10-22 23:57:23 -04:00
Shelley Vohr
b7ebee985b
refactor indexOfItemById
2017-10-22 23:51:33 -04:00
Yuya Ochiai
6326c6727e
Add did-attach-webview event
2017-10-07 22:52:20 +09:00
Birunthan Mohanathas
945fef8a5a
Merge pull request #10483 from jublonet/fix-double-downloads
...
Use Squirrel.Windows --checkForUpdate
2017-09-27 20:26:24 +03:00
Shelley Vohr
c932871bb1
change default to null
2017-09-26 20:35:14 -04:00
Shelley Vohr
f49f7d65a5
remove check on items instance
2017-09-26 14:38:34 -04:00
Shelley Vohr
afe033a6e1
stray semicolon fml
2017-09-26 12:10:16 -04:00
Shelley Vohr
4753ada7a9
rewrite method with only id parameter
2017-09-26 12:05:45 -04:00
Shelley Vohr
5217718d7b
conform to linter standard
2017-09-26 09:50:47 -04:00
Shelley Vohr
ea42851c9b
add first pass at getMenuItemById
2017-09-26 09:47:13 -04:00
Alexandre Lachèze
e1a232e7c8
Add support for css in content_scripts
2017-09-14 17:23:33 +09:00
J.M
6442e6b5e8
Use Squirrel.Windows --checkForUpdate
...
Avoid downloading updates twice. Fix #5057 .
2017-09-11 00:54:08 +02:00
Owais Lone
dc43dc2a13
Add support for indicators in Ubuntu Gnome Session
...
Ubuntu is switching to Gnome in 17.10 but it's not going to be the stock Gnome session. It's going to support the existing Unity APIs. Support has already landed for application indicators and likely other APIs (Launcher,etc) will be supported soon. The Ubuntu Gnome session will have `XDG_CURRENT_DESKTOP=ubuntu:GNOME` environment variable.
Ref: https://didrocks.fr/2017/08/23/ubuntu-gnome-shell-in-artful-day-7/
2017-08-25 23:25:08 +05:30
Cheng Zhao
d233fc044a
Pass dpiVertical and dpiHorizontal to print settings
2017-08-22 13:54:49 +09:00
Samuel Attard
15db4ee450
Merge pull request #10275 from electron/windowclose-exception
...
Fixing uncaught exception on window close
2017-08-19 13:58:55 +10:00
Hari Juturu
340431750b
Removing try/catch
2017-08-17 10:56:37 -07:00
Cheng Zhao
f6792c0232
Merge pull request #10264 from electron/fix-sandbox-crash-on-background-tab
...
Fix sandbox crash when opening a background tab
2017-08-17 15:57:29 +09:00
Hari Juturu
9120774c00
Fixing uncaught exception on window close
2017-08-15 14:59:48 -07:00
Kevin Sawicki
34fff57646
Grant the devtools access to the extension origins
2017-08-15 16:19:21 +03:00
Thiago de Arruda
1709b8e39d
Fix sandbox crash when opening a background tab
...
When a link is clicked with the middle mouse button, chrome opens a window with
"background-tab" disposition. This is not currently handled in sandbox mode,
causing an api::WebContents to leak leading to eventual crash(since it has no
wrapper).
Also fix the event handler for "-add-new-contents" by having it call
`event.preventDefault()` when the window creation should be cancelled.
2017-08-15 09:55:39 -03:00
John Kleinschmidt
ccdff72ee4
Merge pull request #9918 from alexstrat/add-extensions-loading-api
...
Introduce Chrome extensions management APIs independent of Dev Tools Extensions
2017-08-07 20:06:22 -04:00
Samuel Attard
59e85c0f33
Fix stupid or check in scrubber defaults
2017-07-27 17:49:05 +10:00
Kevin Sawicki
959231f766
Merge pull request #9834 from shubham2892/input-type-file-treating-packaged-app-as-directory
...
Fix treat packaged app as directory
2017-07-18 10:21:07 -07:00
Shubham
b25a1d10a2
🍎 Add treatPackageasDirectory as an option
2017-07-18 10:13:25 -07:00
Kevin Sawicki
fc53ac3d38
Always register closed listeners
2017-07-17 11:55:16 -07:00
Kevin Sawicki
86b1deedfa
Inherit enabled-sandbox in opened windows
2017-07-17 11:55:15 -07:00
Kevin Sawicki
61167ca296
Inherit nativeWindowOpen from parent window
2017-07-17 11:55:15 -07:00
Alexandre Lachèze
03ec155ecb
Oops
2017-07-05 17:34:04 +02:00
Alexandre Lachèze
cba53604eb
Introduce extensions management APIs indépendant of Dev Tools Extensions
...
- introduce API BrowserWindow#[add,remove,get]Extension
- make [add,remove, get]DevToolsExtension use newly introduced API
- make the app persist only the extensions added via
#addDevToolsExtension
2017-07-03 20:01:08 +02:00
Cheng Zhao
5fbcb6ef4e
Merge pull request #9396 from drulm/printtopdf-custom-pagesize
...
Add Math.ceil to pageSize.height and pageSize.width to printToPDF() o…
2017-06-26 14:48:44 +09:00
Kevin Sawicki
f9f697298d
Add FIXME link to #6828
2017-06-14 14:12:51 -07:00
Kevin Sawicki
626a1550dc
Send cached visibility state when guest DOM is ready
2017-06-14 14:11:38 -07:00
Boik
2e9ace6f59
Use Buffer.from instead of deprecated new Buffer
...
Use Buffer.from instead of deprecated new Buffer.
2017-06-12 16:57:42 +08:00
Vanessa Yuen
43271c162a
use includes
instead of indexOf
2017-06-09 14:45:47 -07:00