Commit Graph

129 Commits

Author SHA1 Message Date
Max Brunsfeld
dc320181fc Fix handling of .save and .saveAs rejections
* Make Pane.close, Pane.saveActiveItem, and Pane.saveActiveItemAs async.
* Refactor the logic for prompting to save on window unload
2017-05-31 17:46:04 -07:00
Antonio Scandurra
d94c8811f3 Replace CommandRegistry.addBundled with a boolean param in .add 2017-03-17 16:19:25 +01:00
Antonio Scandurra
c4d0944c0d Snapshot more objects 2017-03-10 16:49:53 +01:00
Antonio Scandurra
45d41ca69f Register enter/leave fullscreen events in the main process
This will still notify render processes when such events are triggered
without, however, incurring the additional cost of synchronously
retrieving a `BrowserWindow` (and its properties) via `remote` during
startup.
2017-03-07 10:54:42 +01:00
Nathan Sobo
5839647366 Revert "Forward compositionstart/end events to KeymapManager to avoid IME issues" 2016-11-16 08:53:53 -07:00
Nathan Sobo
3f788ebe7e Forward compositionstart/end events to KeymapManager to avoid IME issues 2016-11-15 13:14:21 -07:00
stereobooster
c6a89a4abe Fix for #10474 2016-10-11 01:19:55 +03:00
Indrek Ardel
55f3311c01 Remove unused variables 2016-09-26 20:52:13 +03:00
Max Brunsfeld
c2c7241eda Destroy AtomEnvironment in beforeunload handler, not unload handler
See https://github.com/electron/electron/issues/7278

Signed-off-by: Nathan Sobo <nathan@github.com>
2016-09-20 16:10:05 -07:00
Max Brunsfeld
db022e7779 Return void from beforeunload handler to allow window unload
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-09-07 16:33:53 +02:00
Antonio Scandurra
e02863e86e Destroy AtomEnvironment on window unload
Signed-off-by: Nathan Sobo <nathan@github.com>
2016-08-12 18:15:51 +02:00
Nathan Sobo
89ef73a64b Unsubscribe from full-screen events when AtomEnvironment is destroyed 2016-08-02 16:43:06 -06:00
Philipp Brumm
974995f50a check for on method
during `window-event-handler-spec`, `applicationDelegate.getCurrentWindow`
seems to return a truncated version of a browserWindow object, which does not include the `on` method
2016-07-06 14:22:17 +02: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
Antonio Scandurra
a3bed908d7 Don't partially serialize after unloading editor window 2016-03-07 17:14:52 +01:00
Antonio Scandurra
12587073d2 🎨 isQuitting -> isUnloading 2016-03-07 10:52:16 +01:00
Antonio Scandurra
311cde36c9 Call saveState(isQuitting: true) on beforeUnload 2016-03-04 17:06:53 +01:00
Ben Ogle
0d118afb6b Send keyup events through the keymapManager 2016-02-21 13:41:26 -08:00
Max Brunsfeld
43656a9861 Load packages before deserializing state 2016-02-18 09:17:34 -08:00
Antonio Scandurra
8dbb9cfd55 Use CommandRegistry to listen for native-key-bindings 2015-11-24 16:24:51 +01:00
Wliu
1593cdbf7a 🐛 Fix toggle-menu-bar command 2015-10-19 18:19:43 -04:00
Thomas Johansen
2cb77aa4b9 🐛 Use fat arrow to capture correct scope
Fixes #9187
2015-10-17 16:55:57 +02:00
Nathan Sobo
a6a175c4a6 Don’t hide window when reloading specs 2015-10-14 16:40:40 -06:00
Nathan Sobo
903ecca1f7 Parameterize document on AtomEnvironment 2015-10-13 19:48:56 -06:00
Nathan Sobo
65ae175e72 Pass explicit window global into AtomEnvironment on construction 2015-10-13 19:35:51 -06:00
Nathan Sobo
3876deddf3 Merge branch 'master' into ns-alternative-test-env 2015-10-13 17:59:46 -06:00
Nathan Sobo
919571f328 Use ApplicationDelegate in WindowEventHandler
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2015-10-13 17:29:41 -06:00
Nathan Sobo
f989ed65e1 Move ipc handling from WindowEventHandler to ApplicationDelegate
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2015-10-13 16:57:02 -06:00
Nathan Sobo
83a0cf28cd 🎨
Signed-off-by: Max Brunsfeld <maxbrunsfeld@github.com>
2015-10-13 15:47:45 -06:00
Nathan Sobo
93de5ccb79 Assign window.onbeforeunload instead of addEventListener
This allows us to cancel the unloading if the user doesn’t confirm the
save dialog.
2015-10-12 15:32:36 -06:00
Max Brunsfeld
7617c35856 Rename AtomEnvironment::removeEditorWindow -> ::destroy 2015-10-08 17:51:27 -07:00
Nathan Sobo
e838863bc7 Handle window/document events in startEditorWindow and remove initialize 2015-10-07 15:24:54 -05:00
Nathan Sobo
1940d4584b Fix typos
/cc @izuzak since I don’t want to open a PR for this
2015-09-30 15:01:52 -06:00
Nathan Sobo
292289aed7 Handle clicks on descendants of links correctly in window event handler 2015-09-18 20:48:50 -06:00
Nathan Sobo
3bc68b91ba Handle document/window commands via command registry 2015-09-18 20:48:49 -06:00
Nathan Sobo
9e59ab1e45 Don’t use jQuery in window-event-handler or its spec 2015-09-18 20:48:48 -06:00
Wliu
01b9c3a0b0 👕 No fat arrow 2015-08-28 18:06:04 -04:00
Wliu
f3b457d8ba Add a notification when toggling the menu bar
Refs #4289
2015-08-28 17:33:46 -04:00
Nathan Sobo
a13e002079 Use atom.getCurrentWindow() 2015-07-07 20:19:22 -05:00
Nathan Sobo
a4d716c491 Call native method on WebContents instead of sendActionToFirstResponder
Fixes #6587
2015-07-07 16:34:35 -05:00
Max Brunsfeld
6282e7e533 Merge pull request #7234 from atom/mb-keep-state-when-auto-updating
Avoid saving state when closing windows due to auto-update
2015-06-12 10:50:57 -07:00
Max Brunsfeld
e47221bc3f Never save window state in the middle of quitting 2015-06-11 17:24:12 -07:00
Nicklas Gummesson
51dcc84fce Bind core:cut to native action
Using same pattern as the others
2015-06-11 23:10:26 +02:00
Mostafa Eweda
952f92c367 Remove uneeded require to url 2015-05-27 11:38:06 -07:00
Mostafa Eweda
5e7bc308d4 Remove the protocol parse and check in the window-event-handler 2015-05-27 11:20:49 -07:00
Mostafa Eweda
4c9e6c5a27 Revert "Merge pull request #6977 from atom/revert-6813-local-initial-paths"
This reverts commit 0c66802278, reversing
changes made to bdce576ab9.
2015-05-27 11:18:15 -07:00
Max Brunsfeld
0dcdfa1e89 Revert "Initial paths shouldn't be normalized on save and restore (could contain uris)" 2015-05-27 10:26:59 -07:00
Mostafa Eweda
b0dd7b974f Fix integration tests 2015-05-22 12:49:25 -07:00
Mostafa Eweda
d22eb697cc Include remote paths, but skip normalization in the save/restore execution flow 2015-05-19 19:05:44 -07:00
liuxiong332
e46d3b0d27 Merge remote-tracking branch 'origin' into pane-resize
Conflicts:
	src/pane-element.coffee
	src/pane.coffee
2015-04-15 10:09:41 +08:00