Commit graph

42 commits

Author SHA1 Message Date
Shelley Vohr
6d96f30ed3
refactor: make shell.OpenExternal async (#17135) 2019-05-03 13:53:45 -07:00
Samuel Attard
04a8b9fe5c fix: base::LaunchOptions environ is now environment
Just a rename

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1509795
2019-04-02 14:43:05 -07:00
Shelley Vohr
5ecda17c7a
refactor: make shell.ShowItemInFolder asynchronous (#17121)
* fix: add scoped_blocking_calls to platform_win

https://chromium-review.googlesource.com/c/chromium/src/+/1191582

* feat: make ShowItemInFolder async

* address feedback from review

* fix build
2019-02-27 12:58:23 +00:00
Cheng Zhao
32a4de4a68
chore: make util::Promise a move-only type (#17071) 2019-02-21 12:32:44 +00:00
Charles Kerr
52852b963a fix: beep on Ubuntu (#16350)
beeps on Linux are made by writing BEL to /dev/console,
which requires elevated permissions on Ubuntu. So if
opening /dev/console fails, fall back to /dev/tty.
2019-01-10 13:43:07 -08:00
Shelley Vohr
bea4de9262
fix: use gio as default linux trash impl (#15399)
* fix: use gio as default linux trash impl

* doc: add ELECTRON_TRASH env var
2018-10-26 08:36:56 -07:00
Milan Burda
6d844a0b67 refactor: move media/net from brightray to atom (#15288) 2018-10-19 14:51:43 -04:00
Milan Burda
a9475f3590 feat: add workingDirectory option to shell.openExternal() (#15065)
Allows passing `workingDirectory` to the underlying `ShellExecuteW` API on Windows.

the motivation is that by default `ShellExecute` would use the current working directory, which would get locked on Windows and can prevent autoUpdater from working correctly. We need to be able specify a different `workingDirectory` to prevent this situation.
2018-10-10 22:46:54 +02:00
deepak1556
9264a00dfd Simplify EnsureProcessTerminated() implementations.
https://chromium-review.googlesource.com/c/chromium/src/+/920799
2018-09-11 20:24:03 +02:00
Shelley Vohr
c6f4bbd143
also format missing .cc files 2018-04-18 20:48:45 -04:00
Matt Lyons
424f9aeae6 🐧 Don't wait for xdg-open to exit
Waiting for xdg-open to return freezes Electron application.
Some file managers (ex: Nemo) don't return until some time after they are closed, this freezes the Electron application until the process returns.
The same is true about any application that can potentially be opened with OpenItem
2017-10-24 19:39:54 -07:00
TingPing
98186c4143 Support gio as trash implementation
Ideally this will become the default as `gvfs-trash` is deprecated and nothing more than a wrapper to `gio`
but at least allow easily opting into the modern method.
2017-05-17 23:46:29 -04:00
Cheng Zhao
6db827cc9a Use GetDesktopEnvironment to determien desktop env
Which can get a much more precise result for us.
2017-03-29 16:21:38 +09:00
Anatzum
f9dbdf4522 Updated MoveItemToTrash in platform_util_linux.cc
If ELECTRON_TRASH is null, first check the DESKTOP_SESSION variable and set trash accordingly. Additional desktop environments can be added easily this way with the fallback of ELECTRON_DEFAULT_TRASH.
2017-03-29 16:08:26 +09:00
Cheng Zhao
5639faf069 Also fix the Windows and Linux side of async openExternal 2016-11-17 12:13:07 +09:00
Gabriel Handford
5b260dbee3 Fix win/linux compile (again) 2016-11-17 10:33:24 +09:00
Gabriel Handford
f0ca9dff81 Fix win/linux compile 2016-11-17 10:33:24 +09:00
Gabriel Handford
99a5258999 Callback uses (platform specific) error, with message 2016-11-17 10:33:24 +09:00
Gabriel Handford
08a9af3a85 Linting 2016-11-17 10:33:24 +09:00
Gabriel Handford (linux)
d186fd78e3 Fix header 2016-11-17 10:33:23 +09:00
Gabriel Handford
6524a33ffc Include callback header 2016-11-17 10:33:23 +09:00
Gabriel Handford
cfd2a029ad Fix linting 2016-11-17 10:33:23 +09:00
Gabriel Handford
9ca684d87f Remove redundant method 2016-11-17 10:33:23 +09:00
Gabriel Handford
128feb17cb Fix method call 2016-11-17 10:33:23 +09:00
Gabriel Handford
b266533dfc Shell openExternal can take optional callback (macOS) 2016-11-17 10:33:23 +09:00
Cheng Zhao
20d5a50ac9 Merge pull request #7178 from aichingm/master
🐧 Add support for different trash implementations
2016-09-16 17:43:09 +09:00
Kevin Sawicki
55eab8e385 Return boolean from shell.openItem 2016-09-12 14:29:06 -07:00
Kevin Sawicki
72558654ef Return boolean from shell.showItemInFolder 2016-09-12 14:22:29 -07:00
Mario Aichinger
893fc2cd53 🐧 Add support for different trash implementations
Make the trash implemantation in MoveItemToTrash selectable via an environment variable
2016-09-12 10:41:23 +02:00
Pete Burgers
00ff209fe7 Ensure process is cleaned up, to avoid leaks 2016-04-08 08:35:35 +01:00
Pete Burgers
46365f4076 wait_for_exit param should be const 2016-04-08 08:32:45 +01:00
Pete Burgers
79ba8feaf8 Don't wait for xdg-open to exit when OpenExternal is called (Linux)
Some browsers (eg. Firefox) may not return until the browser window is
closed. This causes the Electron application to lock up while the browser
window is open.

See https://github.com/atom/atom/issues/6320
2016-04-07 17:04:15 +01:00
Kevin Sawicki
f5bed87199 without_activation -> activate 2016-02-17 08:56:58 -08:00
Ben Gotow
d8679b3899 Allow openExternal to open URLs in the background #3224 2016-02-17 08:56:58 -08:00
msullivan
b4674923c9 return bool on shell.openExternal 2015-06-10 11:06:22 -04:00
Cheng Zhao
b987656f1f It is not safe to get exit code once the child is reaped
Continues #1311.
2015-03-29 20:32:23 +08:00
Robo
bedea89dcf shell: return status for moveItemToTrash on all platforms 2015-03-29 00:47:50 +05:30
Cheng Zhao
750db6aed8 base/file_util.h has been moved to base/files/file_util.h 2015-01-27 13:18:30 -08:00
Kevin Sawicki
b6b6fc3bfd Remove All Rights Reserved after GitHub copyright
Closes #762
2014-10-31 11:17:05 -07:00
Cheng Zhao
fd806f81ce linux: Don't set PR_SET_NO_NEW_PRIVS when creating process, fixes #623. 2014-09-05 21:04:27 +08:00
Cheng Zhao
f176b2c58f Switch to use MIT license. 2014-05-04 20:29:08 +08:00
Cheng Zhao
516d46444d Move all sources under atom/. 2014-03-16 08:30:26 +08:00
Renamed from common/platform_util_linux.cc (Browse further)