Commit Graph

107 Commits

Author SHA1 Message Date
Nathan Sobo
af02d9f0fd Use config defaults to default themes to atom-dark-* 2013-04-26 15:36:13 -07:00
Nathan Sobo
e8a66ded01 🙊 2013-04-26 15:36:12 -07:00
Nathan Sobo
d857cc7d77 List available themes in general config panel 2013-04-26 15:36:11 -07:00
Nathan Sobo
495230435f Allow packages to be enabled / disabled from general config panel 2013-04-26 15:36:11 -07:00
Nathan Sobo
f0cddf9f32 Serialize the state of the config window on refresh 2013-04-26 15:36:11 -07:00
Nathan Sobo
8980a97895 Add atom.activatePackageConfig, which is called in config windows
This calls an optional `activateConfig` method on the package's main
module, which allows it to add a configuration interface to the
`configView`.
2013-04-26 15:32:47 -07:00
Nathan Sobo
160b80b47f Open a custom config window on 'open-user-configuration' event 2013-04-26 15:32:47 -07:00
Kevin Sawicki
1368026db2 Remove measure calls 2013-04-24 10:12:29 -07:00
Kevin Sawicki
bef3c50fe5 Load scoped properties after grammars load 2013-04-24 10:12:28 -07:00
Cheng Zhao
17e9c6ea3b Restart renderer process when reloaded for 4 times.
Fix #481.
2013-04-08 12:00:52 +08:00
Kevin Sawicki
84107317bb Support opening non-existent files from the CLI
This required changing text-buffer to support having a
path but not underlying file that exists yet.

Now calling RootView.open() with a non-existed path will
open a dirty empty editor to the path and the file will be
created on first save.
2013-04-04 17:08:05 -07:00
Kevin Sawicki
6166f8e681 Remove unused require 2013-04-04 13:40:48 -07:00
Kevin Sawicki
bb2ab15753 Open files specified via CLI in existing window
Activate the window and open an editor when a path is specified
that is already present in an existing window's project.

Closes #357
2013-04-04 13:40:48 -07:00
Corey Johnson & Nathan Sobo
101605e50f Add atom.crashMainProcess and atom.crashRenderProcess 2013-04-03 15:08:16 -07: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
11f140ac5a Don't save/load window state to/from disk when pathToOpen is undefined
This fixes a bug where `meta-n` was not opening a new buffer in the
opened window if window state was previously saved for an `undefined`
path.
2013-04-03 10:27:57 -06:00
Kevin Sawicki
ba028f6358 Support ~/.atom/user.less 2013-04-02 17:37:21 -07:00
Nathan Sobo
bb8b3782b9 Serialize package states independently of RootView
Previously, package specs needed to deactivate the root view to test
their package serialization. Now, specs can just deactivate and then
reactivate the package, relying on serialization infrastructure that's
independent of the lifecycle of the RootView.
2013-03-26 17:35:42 -06:00
Nathan Sobo
f5774972e9 Add atom.deactivatePackage(id)
It serializes the package state to the atom.packageStates hash when
the package is deactivated, which means we will be able to test 
package serialization independent of the overall window lifecycle by
just deactivating and re-activating the package.
2013-03-26 17:35:42 -06:00
Nathan Sobo
4510d31301 Pass options through when loading packages 2013-03-26 17:35:42 -06:00
Nathan Sobo
054626a9a2 Add 'immediate' option to atom.activatePackage to suppress deferral 2013-03-26 17:35:42 -06:00
Nathan Sobo
6e238967a4 💄 Rearrange methods 2013-03-26 17:35:42 -06:00
Nathan Sobo
ae444d1ea3 Add atom.activatePackage(id) method
It will load the specified package if it hasn't already been loaded.
2013-03-26 17:35:42 -06:00
Nathan Sobo
b64f5b2a85 Add atom.loadPackage(id). Rewrite loadPackages in terms of it. 2013-03-26 17:35:42 -06:00
Nathan Sobo
c51f1d2c52 💄 2013-03-26 17:35:41 -06:00
Nathan Sobo
7a4f5ad9d1 Wait until TextMate packages are activated to add grammars/properties
My plan is to cache the loading of packages so we don't have to load
them from the disk repeatedly in specs. The first step of this is
ensuring that load has no side-effects.
2013-03-26 17:35:41 -06:00
Nathan Sobo
2416ff19a4 Add NullGrammar to obviate synchronous load of text grammar on start
It's also an extremely simple grammar, so we'll do less work to
initially tokenize open buffers before loading their real grammars.
2013-03-22 17:35:34 -06:00
Nathan Sobo
ab934cfbfb Replace LoadTextMatePackagesTask with async grammar loading 2013-03-22 15:29:07 -06:00
Corey Johnson & Nathan Sobo
1ad5327c99 Ensure we never load saved window in specs 2013-03-21 18:51:32 -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
Kevin Sawicki & Nathan Sobo
1d1ba5f6d1 Use node's require instead of internal require 2013-03-12 10:38:05 -07:00
Nathan Sobo
bf7fc39434 Rename AtomPackage.packageMain to .mainModule 2013-03-11 16:04:38 -06:00
Nathan Sobo
10d0fdf2d7 Require a deferred package early if needed when deserializing panes
The requiring of a package's main module is now decoupled from package
activation. Non-deferred packages will always be required before the
panes are deserialized. This allows the package to register any
deserializers for objects displayed in the panes.

Deferred packages can contain a 'deferredDeserializers' array in their
package.cson. If we attempt to deserialize an object with a deserializer
in the list, the package's main module will be required first so it has
a chance to register the deserializer. But the package still won't be
activated until an activation event occurs.

We may want to add an additional optional hook called 'load' which is
called at require time. We would not guarantee that the rootView
global would exist, but we could give the package a chance to register
deserializers etc. For now, registering deserializers is a side-effect
of requiring the package.
2013-03-11 15:08:19 -06:00
Kevin Sawicki
2212222c47 Use underscore node module 2013-03-11 11:22:36 -07:00
Nathan Sobo
e4bf73b41c Give the view a chance to update before presenting next dialog 2013-03-07 09:30:28 -08:00
Nathan Sobo
f0398f2331 Ensure modal dialogs are presented in a coherent order
Modal dialogs can be presented while other modal dialogs are already
being displayed. Previously, dialogs were always displayed in the order
they were requested. But say you have two untitled buffers in a
pane and you close all items… You'll display prompt dialogs for both
buffers asking the user if they want to save. If the user answers yes
to the first dialog, they should see the path selection dialog before
they see the save prompt for the second buffer.

This commit uses a stack of queues to store deferred dialogs and allow
dialogs presented by the dismissal of another dialog to take precedence
over other pending dialogs.
2013-03-07 09:30:28 -08:00
probablycorey
d6ae5a1778 Set atom.devMode 2013-03-05 16:10:02 -08:00
Corey Johnson
ad14e65ef9 Add atom.getVersion(callback) 2013-02-25 14:58:11 -08:00
Kevin Sawicki & Nathan Sobo
969327e822 Require user init script path after user keymaps
Previously the user init script path was required before the
packages and user keymaps were loaded which could override
config and keymap settings set by the user init script path.
2013-02-25 11:46:34 -08:00
Kevin Sawicki
9ca7214d39 Add --dev flag and remove --stable flag
Atom now runs in stable mode by default and only
runs in dev mode when the --dev flag is specified.

Closes #198
2013-02-22 11:54:54 -08:00
Kevin Sawicki
9c372fa9bf Load text package before deserializing path state
This is required for any editors that are deserialized
since a fallback grammar is always needed.
2013-02-19 21:55:23 -08:00
Nathan Sobo
7f2747ead0 Make project a global and refactor startup process 2013-02-19 18:26:50 -07:00
Nathan Sobo
9cd6fda3e1 💄 add trailing newlines 2013-02-19 10:02:09 -07:00
Corey Johnson
e7a8e4e3c4 Add atom.update and atom.getUpdateStatus 2013-02-14 16:40:24 -08:00
Corey Johnson
8375c8df38 Use previous package state when the wasn't activated 2013-02-13 16:37:59 -08:00
Corey Johnson
7ade089d04 If an atom package has no state, activate it with an empty object 2013-02-13 10:42:22 -08:00
Corey Johnson & Kevin Sawicki
bb5778b659 Move package related data to Atom from RootView 2013-02-08 17:28:08 -08:00
Corey Johnson & Kevin Sawicki
2d80d27ca7 Modernize command-panel package with package.cson 2013-02-08 17:28:07 -08:00
Kevin Sawicki
cd56d0a1d2 Remove unneeded pack check 2013-02-08 17:28:04 -08:00