Commit Graph

121 Commits

Author SHA1 Message Date
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
Machiste Quintana
5d2392ea67 👕 Fix new coffeelint errors 2015-04-06 23:59:54 -04:00
Kevin Sawicki
a9803d3c4d Add explicit return after for loop 2015-03-19 11:48:40 -07:00
liuxiong332
71a279745c invalidate document's drag and drop event to prevent the browser's default open url link. add listener for pane's drop event to open dragged files. 2015-03-09 21:50:17 +08:00
Max Brunsfeld
a1ba470c5b Don't add project paths when opening a file in an existing window 2015-02-24 12:09:10 -08:00
Max Brunsfeld
f7e1629cfc Set multiple project paths for multiple cmd-line paths
Signed-off-by: Jessica Lord <jlord@github.com>
2015-02-12 21:18:18 -08:00
Kevin Sawicki
fd1d872840 Prompt split editors to save on close
Previously an editor that was split into multiple panes would not
prompt to save correctly when the window was unloading.

This adds a new `windowCloseRequested` option passed through from the
beforeunload handler to the editor so that it can specially handle this
case.

Closes #5257
2015-02-04 17:14:46 -08:00
Kevin Sawicki
a4976c32ae Remove release notes from event payload
The release notes are provided by Squirrel on Mac but not by Squirrel for
Windows and the release notes package pulls them down manually anyway
so this field is no longer needed.

Checking for the presence of the release notes previously was preventing the
event from firing on Windows which would cause old release notes to show in
the package.

Closes #3757
2015-02-03 14:57:33 -08:00
Kevin Sawicki
e693254913 Prevent form submits from changing the window URL
Refs atom/settings-view#341
2015-01-13 16:01:24 -08:00