Commit Graph

78 Commits

Author SHA1 Message Date
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
Corey Johnson & Kevin Sawicki
3b4f07701b Build packages using paths instead of filenames 2013-02-08 17:28:04 -08:00
Corey Johnson
3078d74e5d Refactor atom.coffee's package methods 2013-02-08 17:28:03 -08:00
Corey Johnson
74ae4a6413 Remove getTextMatePackages 2013-02-08 17:28:03 -08:00
Kevin Sawicki
1b2c7faed9 Bind ctrl-meta-f to toggle full screen
Refs #134
2013-02-05 09:36:38 -08:00
Jon Rohan
2788ee2715 rename to 2013-02-01 12:59:57 -05:00
Jon Rohan
f40f4ead3a renaming scheme again 2013-01-31 21:34:00 -05:00
Jon Rohan
194675b8c3 Renaming themes to lowercase-dashes. 2013-01-31 19:48:32 -05:00
Jon Rohan
c2af8712d1 Creating GitHub_Dark and GitHub_Light. 2013-01-31 19:01:44 -05:00
Kevin Sawicki
e5bd097592 Use configDirPath exposed by global config object 2013-01-31 09:41:40 -08:00
Justin Palmer
95d7c89ec5 load styles from ~/.atom/user.css 2013-01-30 16:00:45 -08:00
Kevin Sawicki
4fe021bb61 Memoize built packages
Packages that successfully built are now stored internally
so they can be quickly accessed on future calls instead of
returning an array of newly built packages on each call.
2013-01-28 15:47:17 -08:00
Kevin Sawicki
5d10d6fb44 Load grammars from web worker 2013-01-24 17:22:51 -08:00
Kevin Sawicki
ca596db310 Extend AtomPackage directly in packages index.coffee 2013-01-22 18:26:48 -08:00
Jon Rohan
5b241c1e1c In requireStylesheet, check loadedThemes for the required stylesheet
I've made requireStylesheet also check the loadedThemes for the
requiredStylesheet.

In the event that we have 2 stylesheets with the same name `editor.css`
and `editor.css` I want the `static/` directory stylesheet to be above
the userTheme stylesheet, so that proper cascading occurs. This commit
also adding class names to the styles.
2013-01-21 16:55:21 -08:00
Jon Rohan
20e5b303a7 refactoring all the stylesheets into /Atom - Dark/
Conflicts:
	.atom/themes/Atom - Dark/vim-mode.css
2013-01-17 22:11:45 -08:00
Kevin Sawicki
7f8a64b69c Show window only after root view is attached
This prevents a white flicker when the page
starts to load.
2013-01-17 16:50:25 -08:00
Kevin Sawicki & Nathan Sobo
2fb27bb2dd Store pathToOpen using new atom.set/getWindowState api
When you use `setWindowState`, your data is saved across refreshes.
You can only store state that can be serialized to JSON.
2013-01-10 18:04:22 -07:00
Corey Johnson & Nathan Sobo
6efe533650 Add atom.getPackages so we can access package objects anywhere 2013-01-07 14:28:47 -07:00
Nathan Sobo
08a27cf93d Load grammars from TextMatePackage. Delete TextMateBundle.
TextMatePackage is only designed to load resources out of a TextMate
bundle. It's used only at load time, and from that point out we only
refer to our own global `syntax` data structure to access the data that
it loads.
2012-12-31 18:28:38 -06:00
Nathan Sobo
2d73aa292d Make theme loading more similar to package loading
These changes are mostly aesthetic in nature. I just thought it would 
be a good idea to have theme loading be parallel to package loading as
much as possible. So I localized more logic on the `atom` global.
2012-12-31 14:18:45 -06:00
Corey Johnson
e5e5c497e1 Load themes from ~/.atom/themes 2012-12-26 17:41:48 -08:00
Nathan Sobo
a1d28a9f74 WIP: Start on Package class w/ TextMate- & Atom-specific subclasses
The `load` method on the superclass will provide a general template for
loading the package's resource. Each subclass will be responsible for
loading resources in a manner appropriate for the package type. There's
some initial progress on loading TextMate settings as scoped properties,
translating the TextMate scope selectors to CSS-style atom selectors.
2012-12-23 15:36:06 -06:00
Nathan Sobo
56f19cd01a Kill console.log 2012-12-20 21:39:52 -07:00
Nathan Sobo
c7605b8aa6 Move loadPackages to atom global. Handle '-tmbundle' in regex.
This simplifies the loading of TextMate bundles in the spec and benchmark helpers. Since `loadBundle` was already implemented on `atom`, it made sense to move this logic here. Config is now more focused on its core job of handling configuration, not loading bundles.
2012-12-20 21:34:07 -07:00
Corey Johnson
5ea9a4d365 Load TextMate Bundles from packages directories 2012-12-20 16:25:08 -08:00
Nathan Sobo
7dcb12ada2 RootView talks about packages and packageModules, not extensions
Now you call `rootView.activatePackage`, etc
2012-12-19 19:24:44 -07:00
Nathan Sobo
37f0aa3f90 Replace window.requireExtension with atom.loadPackage
The goal is that `loadPackage` will be the go-to place for loading all kinds of resources out of directories. `requireExtension` was only designed to load and activate extension modules.
2012-12-18 19:47:20 -07:00
Nathan Sobo
cdc1fdf7d7 💄 for atom.coffee. Preparing the LZ for atom.loadBundle 2012-12-18 15:41:57 -07:00
Nathan Sobo
d89549c58a Load config from config.json. Set theme with config.core.theme. 2012-12-12 12:15:08 -08:00