Commit Graph

52 Commits

Author SHA1 Message Date
Cheng Zhao
3c4966f6a3 Open the file dragged to window. 2013-04-09 15:37:30 +08:00
Nathan Sobo
f03b6207de Make all requires of 'fs-utils' assign to fsUtils var instead of fs 2013-04-03 12:01:37 -06:00
Nathan Sobo
1bbc9f61e9 Remove unsaved buffer prompt on reload now that we handle it correctly 2013-04-02 15:45:17 -06:00
Kevin Sawicki
fab5842651 Support requiring stylesheets without an extension
Stylesheets will attempt to be resolved with both css
and less extensions if no extension is included in the
path specified to requireStylesheet().
2013-03-26 00:11:11 -04:00
Nathan Sobo
a05405370c Serialize the syntax object's grammar overrides with window state 2013-03-22 17:35:35 -06:00
Corey Johnson & Nathan Sobo
f4d339ccac Unify root view state with window state 2013-03-21 18:24:21 -06:00
Kevin Sawicki & Nathan Sobo
501dc9b76c Merge remote-tracking branch 'origin/master' into cefode
Conflicts:
	native/v8_extensions/native.mm
	spec/app/config-spec.coffee
	spec/app/window-spec.coffee
	spec/spec-helper.coffee
	spec/stdlib/fs-utils-spec.coffee
	src/app/atom-package.coffee
	src/app/config.coffee
	src/app/window.coffee
	src/packages/fuzzy-finder/lib/load-paths-handler.coffee
	src/packages/markdown-preview/lib/markdown-preview-view.coffee
	src/packages/tree-view/spec/tree-view-spec.coffee
	src/stdlib/require.coffee
2013-03-20 10:46:50 -06:00
Corey Johnson
4755233f92 💄 2013-03-12 15:55:30 -07:00
Corey Johnson
d916962a80 Defer window close events until all modified pane items are handled
If the user presses cancel, the close event is canceled
2013-03-12 15:55:30 -07:00
Kevin Sawicki & Nathan Sobo
1d1ba5f6d1 Use node's require instead of internal require 2013-03-12 10:38:05 -07:00
probablycorey
9acd401b9e Use fixture files to requireStylesheet 2013-03-11 10:02:19 -07:00
Justin Palmer
a448a79ae6 atom.css -> atom.less 2013-03-11 10:02:19 -07:00
Justin Palmer
b502c811cb move less parsing to requireStylesheet 2013-03-11 10:02:18 -07:00
Corey Johnson & Nathan Sobo
8333f14ef8 Throw away serialized state if its version doesn't match deserializer 2013-03-07 09:30:30 -08:00
Nathan Sobo
20590f590e Make window specs pass without getActiveEditor/getEditors 2013-03-07 09:30:23 -08:00
Kevin Sawicki
d35c871e17 Install atom executable during window.startup()
Previously this was done during `rake install`.

Also default to `~/github/atom` as the default resource path
when no `--resource-path` argument is specified.  This argument
will now be required when running in dev mode if the repository
is not at the default location.

Closes #300
2013-02-22 21:19:34 -08:00
Corey Johnson & Nathan Sobo
2123fabae6 Window is only shutdown if a rootView and project exist
Keeping the shutdown state as a local var in window.coffee causes spec failures because window.shutdown can only be called once in the entire spec suite
2013-02-20 11:31:36 -08:00
Corey Johnson & Nathan Sobo
b24a13991a Make sure window.shutdown is only called once 2013-02-20 10:18:19 -08:00
Corey Johnson & Nathan Sobo
43aa1aaeb7 Rename startApplication to startup and stopApplication to shutdown 2013-02-20 10:02:16 -08:00
Corey Johnson & Nathan Sobo
0b5ea8578f Eliminate rootView.project references. 2013-02-19 18:26:50 -07:00
Nathan Sobo
7f2747ead0 Make project a global and refactor startup process 2013-02-19 18:26:50 -07:00
Kevin Sawicki
3e84e9886c Break out event handler setup into separate method
This mirrors the keymap setup method and allows specs
to reattach handlers after calling shutdown()
2013-02-05 13:17:53 -08:00
Kevin Sawicki
ba811c4119 Un-f a window spec 2013-02-05 12:59:26 -08:00
Justin Palmer & Nathan Sobo
65927ea0cf fix window blur and focus events 2013-02-05 12:03:56 -08:00
Justin Palmer
22770bd663 add onBlur and onFocus events for the window
This allows us to simulate those events and test for them easier
2013-02-05 10:53:35 -08:00
Justin Palmer
4350be62c6 💀 is-focused.
targeting blurred state instead so normal state styles don't need a
special prefix
2013-02-04 16:02:09 -08:00
Jon Rohan
3cf07d29f3 Changing the if-focused event binding to blur. 2013-02-03 09:01:27 -08:00
Nathan Sobo
94f1630152 Bind window focus and focusout events separately to fix spec 2013-02-02 17:02:07 -07:00
Jon Rohan
e54c3d8fbb adding is-focused to body, and styling light ui 2013-02-01 18:40:53 -05:00
Kevin Sawicki
b43c756820 Only deactivate the RootView once during shutdown
Previously window.shutdown() was called multiple times
if window.close() was called since the shutdown handler
was also fired in the native window controller.

This prevented proper serialization of the RootView
from occurring when then window was closed via meta-w or
meta-W since it was called a second time when already
empty of packages and editors.
2013-01-07 14:41:10 -08:00
Kevin Sawicki
0e082878f3 Close window on meta-W 2013-01-07 13:41:27 -08:00
Corey Johnson
5eb16d8304 Add window.removeStylesheet 2012-12-26 17:41:49 -08:00
Nathan Sobo
ca2527f4b8 Meta-w closes spec windows again.
This adds a 'core:close' event to meta-w in the default bindings, and modifies window to listen for it.
2012-10-24 12:35:31 -06:00
Nathan Sobo
b71fa308a3 Always run window.startup when window.coffee is required
When we actually want to attach the root view in window-bootstrap.coffee, we call `window.attachRootView(path)` instead of calling `window.startup(path)`. Having `startup` called automatically means we can be sure any code we add there runs in every environment (including benchmark and specs). This is where we do things like setup the global keymap, parse text mate bundles and themes, and establish the window close handler. Any globals other than the root view that we want to be available in all environments should be established here. Right now that's just the keymap, but soon I want to add a global pasteboard.
2012-10-24 12:34:45 -06:00
Nathan Sobo
461ec70e7b Fix window spec 2012-08-30 16:19:38 -06:00
Nathan Sobo
d0c767ac15 Fix spy 2012-08-29 20:54:39 -05:00
Corey Johnson
6f99b61dd3 Now storing a window's state based on its rootDirectory (instead of on windowNumber) 2012-08-29 10:59:45 -07:00
Corey Johnson & Nathan Sobo
12b06ddf0c Get spec suite running (lots of failures) 2012-08-27 17:36:36 -05:00
Nathan Sobo
c2c8724ad0 Initial commit 2012-08-10 13:32:19 -06:00
Nathan Sobo
2df05e235a Break out window.applyStylesheet from window.requireStylesheet
This will be useful in applying generated stylesheets associated with themes.
2012-08-08 16:09:23 -06:00
Nathan Sobo
53d6c4960a Fix specs that broke due to no subscription on Buffer from UndoManager 2012-07-05 20:06:09 -06:00
Nathan Sobo
c90c2e80d6 Replace @buffer reference on Editor with @getBuffer method 2012-07-04 12:34:44 -06:00
Nathan Sobo
9cae4d3d8f Rename RootView.editors -> getEditors 2012-07-02 19:47:38 -06:00
Nathan Sobo
bd5c1f8694 Rename RootView.activeEditor -> getActiveEditor 2012-07-02 19:46:33 -06:00
Nathan Sobo
b4d77fd107 Load user configuration as part of RootView initialization, before any editors are created 2012-06-20 16:06:45 -06:00
Corey Johnson & Nathan Sobo
951f76f2bf Serialize root view state to a string of JSON when storing it on the window upon refresh
This avoid situations where arrays in the window state pointed to a different constructor than the current context's Array constructor.
2012-06-15 15:34:07 -06:00
Corey Johnson
8ab167fd00 Reloading when there are modified buffers pops up a dialog. 2012-06-12 10:52:11 -07:00
Nathan Sobo
d2a1da7ba6 Window spec no longer nukes the jasmine stylesheet 2012-06-04 12:07:37 -06:00
Nathan Sobo
d204c6f5a8 Don't load user configuration in window specs (who knows what's in there?!) 2012-04-23 14:19:50 -06:00
Nathan Sobo
e89a2255cf Tear down editors and unsubscribe from buffers on window unload to prevent exceptions when typing after reload 2012-04-18 11:01:30 -06:00