Cheng Zhao
2d14f6e768
Replace default menu with custom built menu.
2013-05-17 22:14:09 +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
f0448ba231
Trigger 'window:close' command in the 'beforeunload' event handler.
...
When user wants to close the window, the 'beforeunload' event would be
called, then the closing would be cancelled and the 'window:close'
command would be triggered. In the 'window:close' handler, a confirm
dialog could be showed if there are unsaved contents, and if the window
is really meant to be closed, the window would be tried to be closed
again and this time 'beforeunload' handler wont't prevent it.
2013-05-17 20:17:06 +08:00
Cheng Zhao
acf5e21f50
Do unload work in 'unload' event handler instead of 'beforeunload'.
...
In Atom, the 'beforeunload' event never prevents window from closing so
it in fact has the same effect with 'unload' event, I guess using
'beforeunload' instead of 'unload' is because the 'beforeunload' is
guarrenteed to happen when window is closing or application is quiting.
However in Atom Shell the 'unload' event is guarrenteed to happen on
both conditions, just like the 'beforeunload' in Atom, so it's safe to
replace the 'beforeunload' with 'unload' here.
And in Atom Shell, the 'beforeunload' event is mainly used for
preventing window from closing, just like the 'window:close' command in
Atom.
2013-05-17 20:17:03 +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
Cheng Zhao
02e3f4cd9c
Enable harmony collections, also revert previous WeakMap hack.
...
Fixed atom/atom-shell#7 .
2013-05-17 16:21:01 +08:00
probablycorey
8487536280
Store parsed command line args in BrowserMain
2013-05-16 17:33:12 -07:00
Kevin Sawicki
84753e55a7
Add enable/disable helpers to jquery extensions
2013-05-16 17:29:48 -07:00
probablycorey
0c96b30053
Move setupNodePaths method to BrowserMain
2013-05-16 17:28:54 -07:00
probablycorey
27bd476b12
Moving logic into BrowserMain class
2013-05-16 17:25:39 -07:00
Kevin Sawicki
ed69dc12ab
Serialize logged in username with view
2013-05-16 17:16:44 -07:00
Kevin Sawicki
e05b443a69
Tweak service name and warning text
2013-05-16 16:46:25 -07:00
Kevin Sawicki
a4455d2c5f
Use released version of space-pen
2013-05-16 16:42:12 -07:00
probablycorey
8f17889f7f
Open dialog creates new atom window
2013-05-16 16:38:47 -07:00
Kevin Sawicki
a965cb684c
Add some commas to the paths loaded badge
2013-05-16 16:22:53 -07:00
probablycorey
f713429674
Remove unused params
2013-05-16 16:21:29 -07:00
Kevin Sawicki
392ffce8c7
Remove unused requires
v0.10.0
2013-05-16 15:54:10 -07:00
Kevin Sawicki
d7a238b5ec
Guard against possibly null event handler
2013-05-16 15:49:53 -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
Kevin Sawicki & Nathan Sobo
a29015551c
Extract link click callback to method
2013-05-16 15:04:30 -07:00
Kevin Sawicki & Nathan Sobo
83e6a4a57e
Rely on core:focus-next/previous in sign in view
2013-05-16 15:01:23 -07:00
Kevin Sawicki & Nathan Sobo
001183245e
Add core:focus-next/focus-previous
...
Focus now cycles between elements with a positive tabindex on
tab and shift-tab.
2013-05-16 15:00:55 -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
Kevin Sawicki & Nathan Sobo
76e7161608
Extract window event handling into separate class
2013-05-16 14:18:57 -07:00
probablycorey
bc854afead
Make messageIdCounter an instance var of window.atom
2013-05-16 13:48:16 -07:00
probablycorey
1e0b734734
Add hacked interface for WeakMap
...
We need to add the `--harmony_collections` flag to atom-shell.
Related to issue https://github.com/atom/atom-shell/issues/7
2013-05-16 13:46:17 -07:00
Kevin Sawicki & Nathan Sobo
848ce7936f
DRY up subscribe and subscribeToCommand
...
subscribeToCommand now supports unsubscribing by object.
2013-05-16 13:43:18 -07:00
Kevin Sawicki & Nathan Sobo
d76d0a030f
Forward all subscribe arguments from Subscriber to EventEmitter
2013-05-16 13:36:51 -07:00
Kevin Sawicki
e2af4c964d
Bind multiple events to single callback
2013-05-16 12:17:41 -07:00
Kevin Sawicki
4527d8bd51
Remove unneeded catch and default response to empty hash
2013-05-16 12:17:41 -07:00
Kevin Sawicki
a17a282b03
Warn instead of log
2013-05-16 12:17:41 -07:00
Kevin Sawicki
2c050522cd
Enable fields when attaching
2013-05-16 12:17:41 -07:00
Kevin Sawicki
c98e7cab4b
Upgrade to keytar 0.4
2013-05-16 12:17:41 -07:00
Kevin Sawicki
4b49562949
Add token to request when available
2013-05-16 12:17:40 -07:00
Kevin Sawicki
efb388ded4
Add initial sign in screen
...
Signing in generates an OAuth2 token and saves
it to the keychain.
2013-05-16 12:17:40 -07:00
Kevin Sawicki
08e9f19644
Add repository field
2013-05-16 12:16:48 -07:00
Kevin Sawicki
3b35a4b63b
Link atom.sh instead of copying
2013-05-16 12:16:33 -07:00
Garen Torikian
b3b7f1ea97
Change to an H2
...
Otherwise the TOC renders wrong
2013-05-16 12:48:20 -06:00
Kevin Sawicki
075018d03d
Mention disabled packages fix
2013-05-16 11:45:38 -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
Kevin Sawicki & Nathan Sobo
3b0748fe44
Add config.pushAtKeyPath/removeAtKeyPath
2013-05-16 10:51:23 -07:00
Kevin Sawicki & Nathan Sobo
2b49a04227
Return a cloned object from config.get()
...
This prevents mutations to the values of the default settings.
2013-05-16 10:29:08 -07:00
Kevin Sawicki & Nathan Sobo
097ee9f2a9
Remove unneeeded calls to config.update()
2013-05-16 10:14:21 -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
Kevin Sawicki
e2821cbea8
Use map instead of iterating
2013-05-16 09:42:09 -07:00
Kevin Sawicki
e9f9c6e777
Mention fuzzy finder
2013-05-16 08:51:04 -07:00
Kevin Sawicki
95d4391680
Run fuzzy filter on project relative paths
...
This prevents the score being influenced by the
segments contained in the project path.
Closes #553
2013-05-16 08:49:43 -07:00
probablycorey
f65a2826f2
Make atom a global object
2013-05-15 15:32:51 -07:00