Commit Graph

227 Commits

Author SHA1 Message Date
Max Brunsfeld
c26509cfab Throw an error when assertions fail if built from source
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-03-02 10:14:59 -08:00
simurai
ec9aec6686 Merge branch 'master' into sm-custom-title-bar 2017-02-21 21:56:53 +09:00
Nathan Sobo
2ad6f83239 Allow metadata to be passed to atom.assert 2017-02-13 10:29:04 -07:00
Nathan Sobo
c6cae5b8fd Store represented directory paths directly on AtomWindow in main process
Fixes #13729

Previously, when adding a window, we were unable to read its current
project paths out of the hash of the URL during window initialization
because the window still considered itself to be loading. Rather than
fixing this issue, we decided to completely eliminate the sharing of
state between processes in the window.location and instead switch to
cached synchronous RPC for the loadSettings and a dedicated RPC-based
mechanism for the project paths.
2017-02-07 13:15:27 -07:00
simurai
6010c4d7df Add custom-inset title-bar 2017-01-14 16:06:50 +09:00
simurai
c406cc4420 Merge branch 'master' into sm-hidden-all 2017-01-14 10:09:07 +09:00
Nathan Sobo
730c7c82a8 Don't add pane items in built-in resource openers
Calling `workspace.open` in an opener doesn't work properly with options
like `split: left` because it causes the opened item to be added to the
workspace as a side-effect. Since workspace openers are intended to be
used during the process of calling `workspace.open`, we need to use
`openTextFile`, which just creates an editor but does not attach it to
the workspace.
2017-01-09 10:57:31 -07:00
Damien Guard
5a446ff467 Clean up portable mode, try local .atom before ATOM_HOME 2016-12-11 15:59:24 -08:00
Antonio Scandurra
9176a6429f Add core:loaded-shell-environment activation hook
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-11-11 19:08:34 +01:00
Antonio Scandurra
e34bc188d0 Make updateProcessEnv asynchronous
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-11-11 18:39:18 +01:00
Christopher Chedeau
089fa92117 Fix wrong binding on atom-environment.coffee
Context: I'm trying to run atom in the browser and have strict mode enabled and it threw on this line. We need it to be a fat arrow otherwise it's adding it to the window (or undefined in strict mode).
2016-11-03 16:04:17 -07:00
Damien Guard
8229924b96 History API, reopen project menu, command and list view 2016-10-21 15:13:59 -07:00
simurai
2571bbc6f2 Merge branch 'master' into sm-hidden-inset
# Conflicts:
#	src/main-process/atom-application.coffee
2016-10-15 19:45:50 +09:00
simurai
ed2c72a586 Add option to hide the title bar 2016-10-15 19:12:53 +09:00
Nathan Sobo
718cc017e6 Hide click-triggered tooltips when clicking anywhere outside of tooltip
Signed-off-by: Antonio Scandurra <as-cii@github.com>
2016-10-10 14:08:51 -06:00
Antonio Scandurra
18ddcf902b Statically assign a clipboard instance to the TextEditor class 2016-10-07 18:21:09 +02:00
Wliu
0e99232615 Merge pull request #12782 from Ingramz/remove-unused-variables-obvious
Remove unused variables (obvious ones)
2016-09-29 16:58:06 -04:00
Indrek Ardel
55f3311c01 Remove unused variables 2016-09-26 20:52:13 +03:00
Indrek Ardel
f7bd0d451f Update coffee-script to 1.11.0 2016-09-26 17:24:49 +03:00
simurai
1cc79666b1 Add custom-title-bar class
So themes/packages can adapt to the custom title-bar
2016-09-21 21:19:35 +09:00
Nathan Sobo
6aa8d33a05 Add atom.restartApplication
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2016-09-20 11:37:34 -06:00
Damien Guard
6ebd1ad582 Remove accidental logging statements checked in 3eb55d7d 2016-09-08 21:49:48 -07:00
Damien Guard
3eb55d7db0 Add Windows file.ico lost in move to new build 2016-09-08 21:16:55 -07:00
Antonio Scandurra
e6c15ee10b onSaveWindowState -> onSaveWindowStateRequest 2016-09-07 15:47:23 +02:00
Antonio Scandurra
0f6eadcfce Wait for windows' state to be saved before closing the app or any window
Previously, we used to save the window's state in the renderer process
`beforeunload` event handler: because of the synchronous nature of event
handlers and the asynchronous design of IndexedDB, this could
potentially not save anything if windows close fast enough to prevent
IndexedDB from committing the pending transaction containing the state.
(Ref.: https://mzl.la/2bXCXDn)

With this commit, we will intercept the `before-quit` events on
`electron.app` and the `close` event on `BrowserWindow` (which will fire
respectively before quitting the application and before closing a
window), and prevent them from performing the default action. We will
then ask each renderer process to save its state and, finally, close the
window and/or the app.
2016-09-07 13:03:33 +02:00
Max Brunsfeld
4bcdbf4d2f Don't have registry update any editors before initial packages are loaded 2016-08-15 15:29:27 -07:00
Max Brunsfeld
09d232ba41 Introduce TextEditorRegistry::build
This way, we can construct text editors with the right parameters from the start
2016-08-12 12:21:51 -07:00
Max Brunsfeld
e8c834e483 Serialize & deserialize the TextEditorRegistry in AtomEnvironment 2016-08-08 15:38:17 -07:00
Max Brunsfeld
ddfb124cb8 Merge branch 'master' into ns-mb-detangle-editor 2016-08-05 09:39:43 -07:00
Nathan Sobo
0c83d9741f Don’t implement title bar via custom elements 2016-08-02 15:56:45 -06:00
Nathan Sobo
0240206d93 Merge branch 'master' into brumm-master 2016-08-02 15:39:57 -06:00
Max Brunsfeld
20b54505f3 Move logic for assigning grammars to editors into TextEditorRegistry 2016-07-26 10:50:57 -07:00
Max Brunsfeld
4ad801b216 Merge branch 'master' into ns-mb-detangle-editor 2016-07-15 09:39:32 -07:00
Max Brunsfeld
6fe4ce56c7 Call maintainConfig in buildTextEditor 2016-07-12 14:16:55 -07:00
Damien Guard
ce6d45f72a 🎨 Fix fat-arrow linter warning 2016-07-12 10:03:55 -07:00
Max Brunsfeld
eec1b70967 Start moving config observation out of editor into editor registry
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-08 17:41:59 -07:00
Katrina Uychaco
9bf329cef2 Tear down ipc response handler when atom environment is destroyed
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-07-07 15:53:07 -07:00
Philipp Brumm
91102cf26b fix fullscreen class on body not being set when toggling fullscreen via window button
- move handling code to `window-event-handler`
2016-07-02 15:16:30 +02:00
Philipp Brumm
faa1f935f8 make custom titlebar user-configurable and prompt for relaunch on change 2016-07-02 12:28:14 +02:00
Philipp Brumm
e59b5ee31a add title-bar to headPanel instead 2016-07-02 12:28:14 +02:00
Philipp Brumm
4897f4db26 replace OSX window title bar with custom title-bar 2016-07-02 12:28:14 +02:00
Antonio Scandurra
ef3ab03d28 Emit {will,did}SavePath on ipcMain before/after a buffer is saved 2016-05-23 18:37:26 +02:00
Antonio Scandurra
720ad9c0b4 Merge pull request #11474 from atom/wl-electron-37
Update Electron to 0.37
2016-05-23 11:07:21 +02:00
Antonio Scandurra
2d97c50583 Don't install devtron when toggling DevTools 2016-05-20 09:26:39 +02:00
Antonio Scandurra
a624489d0f Fix opening console in DevTools 2016-05-17 13:01:33 +02:00
Lee Dohm
a5c6f2746a Add Devtron to the Developer Tools window 2016-05-13 13:50:09 -07:00
Antonio Scandurra
c5a76d4a7d Persist the entire state on reload
This fixes an annoying problem that prevented the state of marker layers
from being saved when the window was reloaded either via `Cmd+R` in
DevTools or via `Ctrl+Option+Cmd+L` in Atom.

The issue was that we were *always* scheduling `saveState` on an idle
callback: `window.onbeforeunload`, however, doesn't wait for that event
before closing the window, and thus that state was never saved in those
situations.

The solution is to use idle callbacks only during the critical code path
(i.e. on mousedown and keydown), but save it synchronously otherwise.
Saving something to IndexedDB is actually asynchronous too, but it seems
like Chrome fulfills `put` requests that get executed right during
`onbeforeunload`.
2016-04-29 14:41:34 +02:00
joshaber
2f1268dc7c Move copyPathToClipboard to the default commands. 2016-04-28 11:36:17 -04:00
joshaber
694af93009 Implement the show cursor scope functionality in the default commands. 2016-04-25 14:12:38 -04:00
Antonio Scandurra
793f5f9692 Disable zoom every time a display gets added or removed 2016-04-01 16:04:01 +02:00