Commit Graph

159 Commits

Author SHA1 Message Date
Kevin Sawicki
f3a500923c Catch and log errors parsing window state
Previously if a read or parse error occurred the window
would never show and the dev tools would be inaccessible.
2013-06-03 12:14:17 -07:00
Kevin Sawicki
3683f7e097 Move show() to atom.coffee
Co-locates it with hide() and focus() which are similar.
2013-06-03 10:43:43 -07:00
Cheng Zhao
a6c37ff276 💄 on code style. 2013-06-03 22:56:30 +08:00
Cheng Zhao
495b218c7f Make atom.update() work. 2013-06-03 22:48:52 +08:00
Cheng Zhao
1aca554ae3 Make atom.crashMainProcess and atom.crashRenderProcess work. 2013-06-02 00:34:12 +08:00
Cheng Zhao
b1e8a45fbe Remove some dead code. 2013-05-29 12:20:56 +08:00
Cheng Zhao
d4142db847 Restart renderer process instead of reloading.
Chromium has the bug that reloading would cause memory leaks, and V8's
GC would slow down everything, so restarting the renderer process when
the Atom is reloaded would make things much cleaner.
2013-05-29 12:20:55 +08:00
Kevin Sawicki
2bd95a2b57 Merge branch 'master' into atom-shell
Conflicts:
	.gitmodules
2013-05-28 10:47:46 -07:00
Kevin Sawicki
ea7ff135ee 💄 2013-05-28 09:42:20 -07:00
Kevin Sawicki
e84e13fe37 Load internal modules with an atom engines field as packages 2013-05-28 09:25:28 -07:00
Cheng Zhao
462bd77ad5 Make atom.open work with parameters. 2013-05-25 14:38:04 +08:00
Cheng Zhao
a00fe91fca Show Atom's version. 2013-05-24 23:24:46 +08:00
Cheng Zhao
2937404227 Make cibuild work. 2013-05-24 21:29:35 +08:00
Cheng Zhao
ce1c1e1f88 Hide window before doing unload work.
In this way we can give user the feeling of quick close even though the
unloading could take some time.
2013-05-24 20:12:42 +08:00
Cheng Zhao
fa0a35741a Make configuration window work. 2013-05-24 19:45:20 +08:00
Cheng Zhao
cf4c2b5768 Return separate windowStatePath for config window. 2013-05-24 19:33:25 +08:00
Cheng Zhao
0dd823aa38 Merge branch 'master' into atom-shell 2013-05-24 19:12:47 +08:00
Cheng Zhao
b9b8101676 Window without pathToOpen should also has meaningful windowStatePath. 2013-05-24 19:02:53 +08:00
Cheng Zhao
8849eb1186 Remove a few abandonded atom.* functions relying on sendMessageToBrowserProcess. 2013-05-23 14:13:39 +08:00
probablycorey
7f083acdc4 Update atom specs 2013-05-22 15:31:59 -07:00
Kevin Sawicki
80a55bb69a Use correct path variable name 2013-05-22 15:29:37 -07:00
Kevin Sawicki
07e8ee35d9 Add Atom.getAvailablePackageMetadata()
This includes the metadata for all available packages
whether or not they are currently loaded.
2013-05-22 15:29:36 -07:00
Kevin Sawicki
d4e5050fc2 Load packages by name instead of path 2013-05-22 15:29:36 -07:00
Kevin Sawicki
82597aa636 Use same view for installed and available packages 2013-05-22 15:29:36 -07:00
Kevin Sawicki
1fe576752b Unload package when uninstalled 2013-05-22 15:29:35 -07:00
Kevin Sawicki
d2bd937f36 Store packages in hash instead of array
This allows quick lookup by name without having to
memoize the resolved path.
2013-05-22 15:29:35 -07:00
Kevin Sawicki
0c85b40789 Add initial support for installing and uninstalling 2013-05-22 15:29:35 -07:00
Kevin Sawicki
9841df732f Remove unused method 2013-05-22 15:29:35 -07:00
Kevin Sawicki
6b81eebb02 Add initial available packages view 2013-05-22 15:29:34 -07:00
probablycorey
0901e1a34c Allow spec window to store window state
It just stores window dimensions for now.
2013-05-22 11:56:33 -07:00
Cheng Zhao
61f8878e05 Merge branch 'master' into atom-shell
Conflicts:
	package.json
	script/bootstrap
	spec/app/window-spec.coffee
	src/app/window.coffee
2013-05-22 20:52:42 +08:00
probablycorey
b58fcc5395 Specs run (but fail hardcore) 2013-05-21 17:04:00 -07:00
probablycorey
f23cb1aa79 Window state works now
The state is now stored in ~/.atom/.storage/SHA-OF-PATH. It is written
to every time it is set.
2013-05-21 14:12:15 -07:00
Cheng Zhao
4faf48233b 💄 2013-05-20 22:36:49 +08:00
Cheng Zhao
bf6e0752f8 Remove atom.presentModal and its helper methods.
Since all the dialogs are modal and blocking now, there is no need to
keep the atom.presentModal which is used to emulate the blocking
behavior.
2013-05-20 22:25:57 +08:00
Cheng Zhao
6e012ed24f Adopt to new open/save dialog API. 2013-05-20 22:23:27 +08:00
Cheng Zhao
60fcb97a3e Send window commands instead of invoking window APIs directly.
For some events generated on the browser side, like reloading, closing
window, we should not handle those events directly, instead we should
send the corresponding commands to the renderer and let the renderer
deal with it.

The window.reload() is also moved to atom.reload(), because I saw things
like toggleFullScreen(), focus(), toggleDevTools() are also there.
2013-05-20 14:19:12 +08:00
Cheng Zhao
0ad96ca7da Make a few window related atom.* functions work. 2013-05-20 11:55:27 +08:00
Cheng Zhao
c8891c1008 Adopt to API change of dialog.showMessageBox. 2013-05-18 12:21:25 +08:00
Cheng Zhao
6260d350ac Should always show devtools instead of toggling when getting error. 2013-05-17 23:07:34 +08:00
Cheng Zhao
b27cd33116 Implement atom.confirm with atom-shell's dialog API.
Note that the dialog.showMessageBox is blocking, so we don't need to use
the '@presentModal'.
2013-05-17 20:39:37 +08:00
Cheng Zhao
d1ca0a8f8f Use toggleDevTools instead of showDevTools. Fixes atom/atom-shell#8.
Currently the toggleDevTools of atom-shell is simulated by keeping state
of devtools, because there is no way to know the state of devtools in
brightray, so it could not behave correctly sometimes.

This problem will be solved when brightray is patched and atom-shel gets
updated.
2013-05-17 19:02:03 +08:00
Cheng Zhao
e7b35d27e7 Revert ae7dce4575.
Now require('package') won't wrong resolve to the package.json, so
reverting previous workaround.
2013-05-17 18:48:02 +08:00
probablycorey
8f17889f7f Open dialog creates new atom window 2013-05-16 16:38:47 -07:00
probablycorey
92ec78cd8a Show dev tools when toggleDevTools is triggered
Eventually want make toggle work as expected. Related to https://github.com/atom/atom-shell/issues/8
2013-05-16 15:14:50 -07:00
probablycorey
889ccdb58d Throw error when sendMessageToBrowserProcess is called 2013-05-16 15:13:31 -07:00
probablycorey
09ab319328 Atom.show no longer used
The window is shown automatically when it is created.
2013-05-16 14:19:53 -07:00
probablycorey
bc854afead Make messageIdCounter an instance var of window.atom 2013-05-16 13:48:16 -07:00
probablycorey
ae7dce4575 Rename package.coffee to base-package.coffee
Related to https://github.com/atom/atom-shell/issues/6
2013-05-16 10:57:41 -07:00
probablycorey
ee12977a9f Use ipc to store and retrieve windowState
I'll want to change the interface in the future. For now I am trying
to keep the code as simple and small as possible.
2013-05-16 09:57:07 -07:00