Comparar commits

...

119 Commits

Autor SHA1 Mensagem Data
Kevin Sawicki 1245835e96 Upgrade to fuzzy-finder@0.49.0 2014-04-14 11:10:45 -07:00
Kevin Sawicki e174bdfa40 Upgrade to language-ruby@0.22.0 2014-04-14 10:29:05 -07:00
Cheng Zhao 3d8bc89c42 Upgrade to atom-shell@0.11.10 2014-04-15 00:56:50 +08:00
Kevin Sawicki 5fc6524493 Upgrade to link@0.22.0 2014-04-14 09:34:54 -07:00
Kevin Sawicki 6e6c93e6bb Upgrade to markdown-preview@0.62.0 2014-04-14 09:16:42 -07:00
Kevin Sawicki fd48ad1c67 Upgrade to language-todo@0.10.0 2014-04-14 09:04:03 -07:00
Kevin Sawicki 5163166990 Upgrade to fuzzy-finder@0.48.0 2014-04-14 09:00:08 -07:00
Kevin Sawicki ff1d07bec9 Upgrade to keybinding-resolver@0.17.0 2014-04-12 09:47:18 -07:00
Kevin Sawicki 6d56283448 Upgrade to tree-view@0.89.0 2014-04-11 12:29:32 -07:00
Kevin Sawicki 7c1a7f52a5 📝 Use TomDoc in src/browser/ files 2014-04-11 10:50:33 -07:00
Kevin Sawicki 590c6be33d Add back dialog require used for path prompting
Closes #1861
2014-04-11 10:42:49 -07:00
Kevin Sawicki f1ca7fdbfd Upgrade to open-on-github@0.28.0 2014-04-11 10:40:18 -07:00
Kevin Sawicki a8b135b4bc Merge pull request #1859 from atom/ks-newline-above-indent-level
Only alter indentation when it is too low
2014-04-11 10:39:50 -07:00
Kevin Sawicki 1afdd62a5d Only alter indentation when it is too low
Previously insert newline above would use the current line's
indent level which could be the less than the proper level if the
newline should be further indented based on the increase indent
pattern being used.
2014-04-11 10:07:50 -07:00
Corey Johnson d47e8fc583 Fix indentation error 2014-04-11 09:45:54 -07:00
Corey Johnson 3644a36d67 Clearing a selection will also finalize the selection
Fixes #1843
2014-04-11 09:44:57 -07:00
Cheng Zhao bb98b3ef38 Upgrade to atom-shell@0.11.9 2014-04-11 20:03:47 +08:00
Cheng Zhao 356a7b014a Merge pull request #1856 from atom/cz-open-folder
Add "Open Folder" menu on Linux and Windows
2014-04-11 03:38:13 +00:00
Cheng Zhao 1ea0ef4ea2 Show both "Open File" and "Open Folder" menu on Linux and Windows.
These two platforms do not have a dialog that can select both files and
folders, so we have to use two menu items for two dialogs.
2014-04-11 11:29:38 +08:00
Cheng Zhao f37ca3e19c Add application:open-file and application:open-folder command. 2014-04-11 11:29:38 +08:00
Kevin Sawicki 8afd90b9f8 Upgrade to tree-view@0.88.0 2014-04-10 17:44:19 -07:00
Corey Johnson 613e05f4ac Merge pull request #1855 from atom/cj-remember-last-window-dimensions
Remember last window dimensions
2014-04-10 16:39:01 -07:00
Kevin Sawicki 068eeca862 Upgrade to language-sql@0.8.0 2014-04-10 15:34:36 -07:00
Corey Johnson 0502afb0c3 Merge pull request #1848 from atom/cj-auto-update-no-breaky
Make auto-updating more resilient
2014-04-10 14:52:20 -07:00
Corey Johnson e1491ca154 Merge remote-tracking branch 'origin/master' into cj-remember-last-window-dimensions 2014-04-10 14:49:34 -07:00
Corey Johnson e9a975fd92 Don't use version as a method 2014-04-10 14:42:51 -07:00
Kevin Sawicki 1459123b15 Prepare 0.86.0 release 2014-04-10 14:38:53 -07:00
Kevin Sawicki 9996eb825f Upgrade to git-diff@0.28.0 2014-04-10 14:16:58 -07:00
Corey Johnson 10392942d5 Merge remote-tracking branch 'origin/master' into cj-auto-update-no-breaky 2014-04-10 14:10:15 -07:00
Kevin Sawicki c452d05f44 Upgrade to open-on-github@0.27.0 2014-04-10 13:59:51 -07:00
Kevin Sawicki 1043f75c72 Merge pull request #1857 from atom/ks-touch-strategy
Update text-buffer for new touch invalidation strategy
2014-04-10 13:59:18 -07:00
Kevin Sawicki ec69bb5ffe Upgrade to spell-check@0.33.0 2014-04-10 13:31:38 -07:00
Kevin Sawicki 41cc0ecab4 Upgrade to text-buffer 2.0.1 2014-04-10 13:09:59 -07:00
Kevin Sawicki 67f8ddc314 Upgrade to text-buffer 2.0 2014-04-10 13:09:59 -07:00
Kevin Sawicki 10d626d63a Upgrade to language-coffee-script@0.22.0 2014-04-10 12:23:11 -07:00
Kevin Sawicki 2ec526508b Upgrade to find-and-replace@0.97.0 2014-04-10 11:34:57 -07:00
Cheng Zhao 6017ff585f Do not use deprecated app.exit API. 2014-04-10 17:33:26 +08:00
Cheng Zhao e6d656830f Upgrade to atom-shell@0.11.8 2014-04-10 15:59:59 +08:00
Kevin Sawicki 1a15c3394e Upgrade to find-and-replace@0.96.0 2014-04-09 15:42:09 -07:00
Kevin Sawicki b328a69f50 Check that label exists when comparing to other items
Previously separators would be removed when merging menus that
contained multiple separators.

Refs atom/find-and-replace#159
2014-04-09 11:39:38 -07:00
Kevin Sawicki e9ee6dca25 Upgrade to fuzzy-finder@0.47.0 2014-04-09 11:02:01 -07:00
Corey Johnson a2f73fd6b0 Remove unneeded fat arrows 2014-04-09 10:13:09 -07:00
Kevin Sawicki 9f09173d0f Upgrade to fs-plus 2.2.1 2014-04-09 10:03:16 -07:00
Kevin Sawicki 1e052c1113 Upgrade to markdown-preview@0.61.0 2014-04-09 09:29:01 -07:00
probablycorey b72bb4ab65 Fix default size bug 2014-04-08 17:27:52 -07:00
Kevin Sawicki 24f751ec83 Upgrade to keybinding-resolve@0.16.0 2014-04-08 17:14:24 -07:00
probablycorey d72e3d9c81 Add AtomWindow::getWindowDimensions 2014-04-08 17:11:20 -07:00
Kevin Sawicki 0aeb32ad70 Upgrade to language-javascript@0.22.0 2014-04-08 17:03:32 -07:00
probablycorey 3393583b72 Use windowDimensions from load settings if they exist 2014-04-08 16:57:52 -07:00
probablycorey 6fcd905d4f Use windowDimensions instead of initialSize 2014-04-08 16:57:18 -07:00
probablycorey 993534337c Update restoreWindowDimensions 2014-04-08 15:26:08 -07:00
probablycorey 03814246ef Rename to storeDefaultWindowDimensions 2014-04-08 15:25:49 -07:00
probablycorey 053965602c Apply default dimensions 2014-04-08 14:19:03 -07:00
probablycorey b45c1c7548 Store the default windows position.
Based on the last closed window or the last focused window
2014-04-08 12:35:36 -07:00
Kevin Sawicki e96d821653 Upgrade to language-coffee-script@0.21.0 2014-04-08 11:23:35 -07:00
Kevin Sawicki e3448b0a46 Upgrade to atom-light-ui@0.24.0 2014-04-08 11:06:57 -07:00
Kevin Sawicki d07eea405f Upgrade to feedback@0.29.0 2014-04-08 10:44:35 -07:00
probablycorey 87d008c337 Revert "Merge pull request #1844 from atom/cj-move-functionality-to-workspace"
This reverts commit 2d7dda066c, reversing
changes made to 96e3c63291.
2014-04-08 10:44:08 -07:00
Kevin Sawicki 4a55c90c63 Upgrade to markdown-preview@0.60.0 2014-04-08 10:34:16 -07:00
Kevin Sawicki 7bce6cb10a Upgrade to language-html@0.19.0 2014-04-08 09:58:45 -07:00
Kevin Sawicki 32499351dc Upgrade to language-xml@0.11.0 2014-04-08 09:57:59 -07:00
Corey Johnson 2d7dda066c Merge pull request #1844 from atom/cj-move-functionality-to-workspace
Move functionality from Project to Workspace
2014-04-08 09:52:29 -07:00
probablycorey 837f3c553f Don't explode the array 2014-04-08 09:07:55 -07:00
Cheng Zhao 96e3c63291 Show console when window error happened, fixes #1805. 2014-04-08 15:27:41 +08:00
Cheng Zhao d5da396c0f Upgrade to atom-shell@0.11.7 2014-04-08 15:27:41 +08:00
probablycorey 4b089b62a6 Destructure item instead of calling it i 2014-04-07 17:01:11 -07:00
probablycorey be8514b864 Use _.clone instead of new Array 2014-04-07 16:56:35 -07:00
probablycorey e826b66dd2 Don't destructure underscore 2014-04-07 16:56:17 -07:00
Nathan Sobo 83d6fc2374 Upgrade to atom-keymap@0.17.0 to keep default action on abortKeyBinding 2014-04-07 17:20:38 -06:00
Kevin Sawicki ecdaf48308 Upgrade to find-and-replace@0.95.0 2014-04-07 16:11:10 -07:00
probablycorey a79885eafb Add 'the' 2014-04-07 15:43:53 -07:00
probablycorey a3c9a65838 Remove redundant non-public documentation 2014-04-07 15:35:25 -07:00
probablycorey 8ca5d6db35 Remove trailing whitespace 2014-04-07 15:29:15 -07:00
probablycorey 980c17e50c Pass current version to AutoUpdateManager 2014-04-07 15:28:42 -07:00
Kevin Sawicki c9bf8f04b8 Upgrade to bracket-matcher@0.30.0 2014-04-07 15:23:38 -07:00
probablycorey 6613b9fd4d Don't send autoUpdateManager to ApplicationMenu 2014-04-07 15:19:48 -07:00
probablycorey 3168751c97 Enable Restart and Install Update item 2014-04-07 15:04:06 -07:00
probablycorey 6bc471cef1 Only emit window:update-available event after window is loaded 2014-04-07 14:55:50 -07:00
probablycorey 4b3240eeee Use EventEmitter instead of emissary
To be consistent with other browser process classes
2014-04-07 14:55:12 -07:00
probablycorey 1f9de98eb2 Make AtomWindow emit window:loaded 2014-04-07 14:54:27 -07:00
probablycorey 7eea30fa7f Make new windows receive previously triggered update-available events 2014-04-07 14:26:07 -07:00
probablycorey 63e51af87d Move window_udpate-evailable emitter to method 2014-04-07 14:25:35 -07:00
probablycorey bbc6433a75 Update comment 2014-04-07 14:18:16 -07:00
probablycorey d4ae836225 Use hidden menu items for update processes 2014-04-07 14:17:44 -07:00
probablycorey 789f29e0b5 AutoUpdateManager barely works 2014-04-07 12:25:55 -07:00
Kevin Sawicki c584c158d7 Upgrade to language-python@0.15.0 2014-04-07 11:54:13 -07:00
Kevin Sawicki d63c4f88fd Upgrade to go-to-line@0.19.0 2014-04-07 11:49:42 -07:00
Kevin Sawicki db327b92f3 🐧 Use alt-shift-up/down for cursors 2014-04-07 11:41:08 -07:00
Kevin Sawicki cd01e6f2ad Upgrade to grammar-selector@0.24.0 2014-04-07 11:34:44 -07:00
Kevin Sawicki b1be4e9183 Upgrade to tree-view@0.87.0 2014-04-07 11:29:44 -07:00
Kevin Sawicki 009a142273 Upgrade to link@0.21.0 2014-04-07 11:26:57 -07:00
Kevin Sawicki f0f00fd317 🐧 Map F11 to toggle full screen 2014-04-07 11:21:00 -07:00
probablycorey f5ea098417 Don't overwrite menu item's metadata field 2014-04-07 11:04:55 -07:00
probablycorey 82081aa5e9 Rename methods 2014-04-07 10:21:37 -07:00
probablycorey 33adaab8b1 Add getMenu method 2014-04-07 10:21:25 -07:00
probablycorey e21a1339a2 Use AutoUpdateManager 2014-04-07 10:20:32 -07:00
Kevin Sawicki b90849fa66 Upgrade to autoflow@0.16.0 2014-04-07 09:39:47 -07:00
probablycorey 23d3405ae7 Rename to AutoUpdateManager
So it isn't confused with Atom Shell's auto-updater class
2014-04-07 09:38:36 -07:00
probablycorey d39c422da9 Add content to AutoUpdater 2014-04-07 09:37:44 -07:00
Kevin Sawicki 053c0f703a Upgrade to language-gfm@0.31.0 2014-04-07 09:31:55 -07:00
probablycorey 1c91bd3100 Create AutoUpdater class 2014-04-07 09:14:35 -07:00
Kevin Sawicki 0ffb5da515 Upgrade to language-coffee-script@0.20.0 2014-04-07 09:03:47 -07:00
Kevin Sawicki b7db7f6c99 Upgrade to lanuage-gfm@0.30.0 2014-04-07 09:01:34 -07:00
Kevin Sawicki cae9782e24 Upgrade to language-xml@0.10.0 2014-04-07 08:49:29 -07:00
Kevin Sawicki 5dbab7bb89 Upgrade to language-make@0.10.0 2014-04-07 08:48:30 -07:00
Cheng Zhao ceab8e8166 Upgrade to atom-shell@0.11.6 2014-04-07 22:58:28 +08:00
Cheng Zhao 97cb440a7c Click on dock should open a new window when there is no window opened.
Fixes #1779.
2014-04-07 16:42:13 +08:00
Cheng Zhao fcdb42dbe4 Do not build source maps when compiling coffee scripts.
Since we do not ship coffee script sources and source map files in final
build, the source maps generated here actually have no use, and would
cause lots of networking erros since each compiled .js would try to load
their corresponding source map file.

This doesn't affect dev mode because it has its own way to generate
source maps on the fly.

Closes #1836.
2014-04-05 19:30:18 +08:00
probablycorey 11a91fb974 Move editor-created specs to Workspace 2014-04-04 15:31:44 -07:00
probablycorey 1d426e8fd2 Move editor-created event to Workspace 2014-04-04 15:31:44 -07:00
probablycorey 6f0094e6ce Move editor removal specs to Workspace 2014-04-04 15:31:44 -07:00
probablycorey 915cad39e8 Set atom.workspace in Workspace spec 2014-04-04 15:31:44 -07:00
probablycorey d8f0743888 Fix bug in Project::getEditors 2014-04-04 15:31:44 -07:00
probablycorey 7685b27218 Move editor tracking to workspace 2014-04-04 15:31:20 -07:00
probablycorey 3aab0b7f51 Fix problem with Workspace::eachEditor 2014-04-04 15:31:01 -07:00
probablycorey 2f5735e264 Use existing remove method 2014-04-04 15:31:01 -07:00
probablycorey 56bea31b5e Move Project::eachEditor to Workspace::eachEditor 2014-04-04 15:31:01 -07:00
probablycorey 52d5e205c7 Update Workspace::getOpeners 2014-04-04 15:30:22 -07:00
probablycorey 0f5f6c8657 Move openers to workspace 2014-04-04 15:30:22 -07:00
21 arquivos alterados com 292 adições e 214 exclusões
-2
Ver Arquivo
@@ -68,8 +68,6 @@ module.exports = (grunt) ->
installDir = process.env.INSTALL_PREFIX ? '/usr/local'
coffeeConfig =
options:
sourceMap: true
glob_to_multiple:
expand: true
src: [
-2
Ver Arquivo
@@ -18,8 +18,6 @@
'enter': 'editor:newline'
'shift-tab': 'editor:outdent-selected-rows'
'ctrl-K': 'editor:delete-line'
'ctrl-shift-up': 'editor:add-selection-above'
'ctrl-shift-down': 'editor:add-selection-below'
'.tool-panel.panel-left, .tool-panel.panel-right':
'escape': 'tool-panel:unfocus'
+2
Ver Arquivo
@@ -138,6 +138,8 @@
'cmd-j': 'editor:join-lines'
'cmd-D': 'editor:duplicate-lines'
'cmd-L': 'editor:split-selections-into-lines'
'ctrl-shift-up': 'editor:add-selection-above'
'ctrl-shift-down': 'editor:add-selection-below'
'cmd-alt-[': 'editor:fold-current-row'
'cmd-alt-]': 'editor:unfold-current-row'
+4 -1
Ver Arquivo
@@ -11,11 +11,12 @@
'ctrl-alt-p': 'window:run-package-specs'
'ctrl-alt-s': 'application:run-all-specs'
'ctrl-shift-o': 'application:open-dev'
'F11': 'window:toggle-full-screen'
# Sublime Parity
'ctrl-N': 'application:new-window'
'ctrl-W': 'window:close'
'ctrl-o': 'application:open'
'ctrl-o': 'application:open-file'
'ctrl-q': 'application:quit'
'ctrl-T': 'pane:reopen-closed-item'
'ctrl-n': 'application:new-file'
@@ -84,6 +85,8 @@
'ctrl-/': 'editor:toggle-line-comments'
'ctrl-j': 'editor:join-lines'
'ctrl-D': 'editor:duplicate-lines'
'alt-shift-up': 'editor:add-selection-above'
'alt-shift-down': 'editor:add-selection-below'
'ctrl-alt-[': 'editor:fold-current-row'
'ctrl-alt-]': 'editor:unfold-current-row'
+1 -1
Ver Arquivo
@@ -14,7 +14,7 @@
# Sublime Parity
'ctrl-N': 'application:new-window'
'ctrl-W': 'window:close'
'ctrl-o': 'application:open'
'ctrl-o': 'application:open-file'
'ctrl-T': 'pane:reopen-closed-item'
'ctrl-n': 'application:new-file'
'ctrl-s': 'core:save'
+4 -4
Ver Arquivo
@@ -4,10 +4,10 @@
submenu: [
{ label: 'About Atom', command: 'application:about' }
{ label: 'View License', command: 'application:open-license' }
{ label: "VERSION", enabled: false }
{ label: "Restart and Install Update", command: 'application:install-update', visible: false}
{ label: "Check for Update", command: 'application:check-for-update', visible: false}
{ label: "Downloading Update", command: 'application:check-for-update', enabled: false, visible: false}
{ label: 'VERSION', enabled: false }
{ label: 'Restart and Install Update', command: 'application:install-update', visible: false}
{ label: 'Check for Update', command: 'application:check-for-update', visible: false}
{ label: 'Downloading Update', enabled: false, visible: false}
{ type: 'separator' }
{ label: 'Preferences...', command: 'application:show-settings' }
{ label: 'Open Your Config', command: 'application:open-your-config' }
+2 -1
Ver Arquivo
@@ -4,7 +4,8 @@
submenu: [
{ label: 'New &Window', command: 'application:new-window' }
{ label: '&New File', command: 'application:new-file' }
{ label: '&Open...', command: 'application:open' }
{ label: '&Open File...', command: 'application:open-file' }
{ label: 'Open Folder...', command: 'application:open-folder' }
{ label: 'Reopen Last &Item', command: 'pane:reopen-closed-item' }
{ type: 'separator' }
{ label: '&Preferences...', command: 'application:show-settings' }
+2 -1
Ver Arquivo
@@ -4,7 +4,8 @@
submenu: [
{ label: 'New &Window', command: 'application:new-window' }
{ label: '&New File', command: 'application:new-file' }
{ label: '&Open...', command: 'application:open' }
{ label: '&Open File...', command: 'application:open-file' }
{ label: 'Open Folder...', command: 'application:open-folder' }
{ label: 'Reopen Last &Item', command: 'pane:reopen-closed-item' }
{ type: 'separator' }
{ label: '&Preferences...', command: 'application:show-settings' }
+30 -30
Ver Arquivo
@@ -1,7 +1,7 @@
{
"name": "atom",
"productName": "Atom",
"version": "0.85.0",
"version": "0.86.0",
"description": "A hackable text editor for the 21st Century.",
"main": "./src/browser/main.js",
"repository": {
@@ -12,10 +12,10 @@
"url": "https://github.com/atom/atom/issues"
},
"license": "All Rights Reserved",
"atomShellVersion": "0.11.5",
"atomShellVersion": "0.11.10",
"dependencies": {
"async": "0.2.6",
"atom-keymap": "^0.16.0",
"atom-keymap": "^0.17.0",
"bootstrap": "git://github.com/atom/bootstrap.git#6af81906189f1747fd6c93479e3d998ebe041372",
"clear-cut": "0.4.0",
"coffee-script": "1.7.0",
@@ -23,7 +23,7 @@
"delegato": "1.x",
"emissary": "^1.2.1",
"first-mate": "^1.5.1",
"fs-plus": "^2.2",
"fs-plus": "^2.2.1",
"fstream": "0.1.24",
"fuzzaldrin": "~1.1",
"git-utils": "^1.2.2",
@@ -50,7 +50,7 @@
"serializable": "1.x",
"space-pen": "3.1.1",
"temp": "0.5.0",
"text-buffer": "^1.4.6",
"text-buffer": "^2.0.1",
"theorist": "1.x",
"underscore-plus": "^1.1.2",
"vm-compatibility-layer": "0.1.0"
@@ -59,75 +59,75 @@
"atom-dark-syntax": "0.15.0",
"atom-dark-ui": "0.26.0",
"atom-light-syntax": "0.16.0",
"atom-light-ui": "0.23.0",
"atom-light-ui": "0.24.0",
"base16-tomorrow-dark-theme": "0.13.0",
"solarized-dark-syntax": "0.14.0",
"solarized-light-syntax": "0.7.0",
"archive-view": "0.30.0",
"autocomplete": "0.27.0",
"autoflow": "0.15.0",
"autoflow": "0.16.0",
"autosave": "0.13.0",
"background-tips": "0.10.0",
"bookmarks": "0.22.0",
"bracket-matcher": "0.29.0",
"bracket-matcher": "0.30.0",
"command-palette": "0.20.0",
"dev-live-reload": "0.30.0",
"exception-reporting": "0.17.0",
"feedback": "0.28.0",
"find-and-replace": "0.94.0",
"fuzzy-finder": "0.46.0",
"git-diff": "0.27.0",
"go-to-line": "0.18.0",
"grammar-selector": "0.23.0",
"feedback": "0.29.0",
"find-and-replace": "0.97.0",
"fuzzy-finder": "0.49.0",
"git-diff": "0.28.0",
"go-to-line": "0.19.0",
"grammar-selector": "0.24.0",
"image-view": "0.32.0",
"keybinding-resolver": "0.15.0",
"link": "0.20.0",
"markdown-preview": "0.59.0",
"keybinding-resolver": "0.17.0",
"link": "0.22.0",
"markdown-preview": "0.62.0",
"metrics": "0.32.0",
"open-on-github": "0.26.0",
"open-on-github": "0.28.0",
"package-generator": "0.30.0",
"release-notes": "0.26.0",
"settings-view": "0.107.0",
"snippets": "0.40.0",
"spell-check": "0.32.0",
"spell-check": "0.33.0",
"status-bar": "0.39.0",
"styleguide": "0.28.0",
"symbols-view": "0.49.0",
"tabs": "0.34.0",
"timecop": "0.17.0",
"tree-view": "0.86.0",
"tree-view": "0.89.0",
"update-package-dependencies": "0.6.0",
"welcome": "0.12.0",
"whitespace": "0.22.0",
"wrap-guide": "0.18.0",
"language-c": "0.14.0",
"language-coffee-script": "0.19.0",
"language-coffee-script": "0.22.0",
"language-css": "0.13.0",
"language-gfm": "0.29.0",
"language-gfm": "0.31.0",
"language-git": "0.9.0",
"language-go": "0.8.0",
"language-html": "0.18.0",
"language-html": "0.19.0",
"language-hyperlink": "0.9.0",
"language-java": "0.9.0",
"language-javascript": "0.21.0",
"language-javascript": "0.22.0",
"language-json": "0.8.0",
"language-less": "0.6.0",
"language-make": "0.9.0",
"language-make": "0.10.0",
"language-objective-c": "0.11.0",
"language-perl": "0.8.0",
"language-php": "0.14.0",
"language-property-list": "0.7.0",
"language-python": "0.14.0",
"language-ruby": "0.21.0",
"language-python": "0.15.0",
"language-ruby": "0.22.0",
"language-ruby-on-rails": "0.12.0",
"language-sass": "0.8.0",
"language-shellscript": "0.8.0",
"language-source": "0.7.0",
"language-sql": "0.7.0",
"language-sql": "0.8.0",
"language-text": "0.6.0",
"language-todo": "0.9.0",
"language-todo": "0.10.0",
"language-toml": "0.12.0",
"language-xml": "0.9.0",
"language-xml": "0.11.0",
"language-yaml": "0.6.0"
},
"private": true,
+10 -1
Ver Arquivo
@@ -1424,7 +1424,7 @@ describe "Editor", ->
editor.undo()
expect(editor.getCursorBufferPosition()).toEqual [3,4]
it "indents the new line to the same indent level as the current line when editor.autoIndent is true", ->
it "indents the new line to the correct level when editor.autoIndent is true", ->
atom.config.set('editor.autoIndent', true)
editor.setText(' var test')
@@ -1444,6 +1444,15 @@ describe "Editor", ->
expect(editor.lineForBufferRow(1)).toBe ' '
expect(editor.lineForBufferRow(2)).toBe ' var test'
editor.setText('function() {\n}')
editor.setCursorBufferPosition([1,1])
editor.insertNewlineAbove()
expect(editor.getCursorBufferPosition()).toEqual [1,2]
expect(editor.lineForBufferRow(0)).toBe 'function() {'
expect(editor.lineForBufferRow(1)).toBe ' '
expect(editor.lineForBufferRow(2)).toBe '}'
describe ".backspace()", ->
describe "when there is a single cursor", ->
changeScreenRangeHandler = null
+17 -3
Ver Arquivo
@@ -432,9 +432,9 @@ describe "EditorView", ->
editorView.setFontFamily('sans-serif')
it "positions the cursor to the clicked row and column", ->
{top, left} = editorView.pixelOffsetForScreenPosition([3, 30])
editorView.renderedLines.trigger mousedownEvent(pageX: left, pageY: top)
expect(editor.getCursorScreenPosition()).toEqual [3, 30]
{top, left} = editorView.pixelOffsetForScreenPosition([3, 30])
editorView.renderedLines.trigger mousedownEvent(pageX: left, pageY: top)
expect(editor.getCursorScreenPosition()).toEqual [3, 30]
describe "double-click", ->
it "selects the word under the cursor, and expands the selection wordwise in either direction on a subsequent shift-click", ->
@@ -464,6 +464,20 @@ describe "EditorView", ->
editorView.renderedLines.trigger mousedownEvent(editorView: editorView, point: [3, 12], originalEvent: {detail: 1}, shiftKey: true)
expect(editor.getSelectedBufferRange()).toEqual [[3, 10], [3, 12]]
it "stops selecting by word when another selection is made", ->
expect(editor.getCursorScreenPosition()).toEqual(row: 0, column: 0)
editorView.renderedLines.trigger mousedownEvent(editorView: editorView, point: [0, 8], originalEvent: {detail: 1})
editorView.renderedLines.trigger 'mouseup'
editorView.renderedLines.trigger mousedownEvent(editorView: editorView, point: [0, 8], originalEvent: {detail: 2})
editorView.renderedLines.trigger 'mouseup'
expect(editor.getSelectedText()).toBe "quicksort"
editorView.renderedLines.trigger mousedownEvent(editorView: editorView, point: [3, 10])
editorView.renderedLines.trigger mousemoveEvent(editorView: editorView, point: [3, 12], which: 1)
editorView.renderedLines.trigger 'mouseup'
expect(editor.getSelectedBufferRange()).toEqual [[3, 10], [3, 12]]
describe "when clicking between a word and a non-word", ->
it "selects the word", ->
expect(editor.getCursorScreenPosition()).toEqual(row: 0, column: 0)
+25 -6
Ver Arquivo
@@ -133,6 +133,7 @@ class Atom extends Model
initialize: ->
window.onerror = =>
@openDevTools()
@executeJavaScriptInDevTools('InspectorFrontendAPI.showConsole()')
@emit 'uncaught-error', arguments...
@unsubscribe()
@@ -222,12 +223,26 @@ class Atom extends Model
else
@center()
storeDefaultWindowDimensions: ->
dimensions = JSON.stringify(atom.getWindowDimensions())
localStorage.setItem("defaultWindowDimensions", dimensions)
getDefaultWindowDimensions: ->
{windowDimensions} = @getLoadSettings()
return windowDimensions if windowDimensions?
dimensions = null
try
dimensions = JSON.parse(localStorage.getItem("defaultWindowDimensions"))
catch error
console.warn "Error parsing default window dimensions", error
localStorage.removeItem("defaultWindowDimensions")
{width, height} = screen.getPrimaryDisplay().workAreaSize
dimensions ? {x: 0, y: 0, width: Math.min(1024, width), height: height}
restoreWindowDimensions: ->
workAreaSize = screen.getPrimaryDisplay().workAreaSize
windowDimensions = @state.windowDimensions ? {}
{initialSize} = @getLoadSettings()
windowDimensions.height ?= initialSize?.height ? workAreaSize.height
windowDimensions.width ?= initialSize?.width ? Math.min(workAreaSize.width, 1024)
windowDimensions = @state.windowDimensions ? @getDefaultWindowDimensions()
@setWindowDimensions(windowDimensions)
storeWindowDimensions: ->
@@ -383,6 +398,10 @@ class Atom extends Model
toggleDevTools: ->
ipc.sendChannel('call-window-method', 'toggleDevTools')
# Public: Execute code in dev tools.
executeJavaScriptInDevTools: (code) ->
ipc.sendChannel('call-window-method', 'executeJavaScriptInDevTools', code)
# Public: Reload the current window.
reload: ->
ipc.sendChannel('call-window-method', 'restart')
@@ -435,7 +454,7 @@ class Atom extends Model
exit: (status) ->
app = remote.require('app')
app.emit('will-exit')
app.exit(status)
remote.process.exit(status)
# Public: Is the current window in development mode?
inDevMode: ->
+37 -48
Ver Arquivo
@@ -12,24 +12,25 @@ class ApplicationMenu
constructor: (@version) ->
@menu = Menu.buildFromTemplate @getDefaultTemplate()
Menu.setApplicationMenu @menu
global.atomApplication.autoUpdateManager.on 'state-changed', (state) =>
@showUpdateMenuItem(state)
# Public: Updates the entire menu with the given keybindings.
#
# * template:
# The Object which describes the menu to display.
# * keystrokesByCommand:
# An Object where the keys are commands and the values are Arrays containing
# the keystroke.
# template - The Object which describes the menu to display.
# keystrokesByCommand - An Object where the keys are commands and the values
# are Arrays containing the keystroke.
update: (template, keystrokesByCommand) ->
@translateTemplate(template, keystrokesByCommand)
@substituteVersion(template)
@menu = Menu.buildFromTemplate(template)
Menu.setApplicationMenu(@menu)
@showUpdateMenuItem(global.atomApplication.autoUpdateManager.getState())
# Flattens the given menu and submenu items into an single Array.
#
# * menu:
# A complete menu configuration object for atom-shell's menu API.
# menu - A complete menu configuration object for atom-shell's menu API.
#
# Returns an Array of native menu items.
flattenMenuItems: (menu) ->
@@ -41,8 +42,7 @@ class ApplicationMenu
# Flattens the given menu template into an single Array.
#
# * template:
# An object describing the menu item.
# template - An object describing the menu item.
#
# Returns an Array of native menu items.
flattenMenuTemplate: (template) ->
@@ -54,44 +54,36 @@ class ApplicationMenu
# Public: Used to make all window related menu items are active.
#
# * enable:
# If true enables all window specific items, if false disables all window
# specific items.
# enable - If true enables all window specific items, if false disables all
# window specific items.
enableWindowSpecificItems: (enable) ->
for item in @flattenMenuItems(@menu)
item.enabled = enable if item.metadata?['windowSpecific']
# Replaces VERSION with the current version.
substituteVersion: (template) ->
if (item = _.find(@flattenMenuTemplate(template), (i) -> i.label == 'VERSION'))
if (item = _.find(@flattenMenuTemplate(template), ({label}) -> label == 'VERSION'))
item.label = "Version #{@version}"
# Toggles Install Update Item
showInstallUpdateItem: (visible=true) ->
if visible
@showDownloadingUpdateItem(false)
@showCheckForUpdateItem(false)
# Sets the proper visible state the update menu items
showUpdateMenuItem: (state) ->
checkForUpdateItem = _.find(@flattenMenuItems(@menu), ({label}) -> label == 'Check for Update')
downloadingUpdateItem = _.find(@flattenMenuItems(@menu), ({label}) -> label == 'Downloading Update')
installUpdateItem = _.find(@flattenMenuItems(@menu), ({label}) -> label == 'Restart and Install Update')
if (item = _.find(@flattenMenuItems(@menu), (i) -> i.label == 'Restart and Install Update'))
item.visible = visible
return unless checkForUpdateItem? and downloadingUpdateItem? and installUpdateItem?
# Toggles Downloading Update Item
showDownloadingUpdateItem: (visible=true) ->
if visible
@showInstallUpdateItem(false)
@showCheckForUpdateItem(false)
checkForUpdateItem.visible = false
downloadingUpdateItem.visible = false
installUpdateItem.visible = false
if (item = _.find(@flattenMenuItems(@menu), (i) -> i.label == 'Downloading Update'))
item.visible = visible
# Toggles Check For Update Item
showCheckForUpdateItem: (visible=true) ->
if visible
@showDownloadingUpdateItem(false)
@showInstallUpdateItem(false)
if (item = _.find(@flattenMenuItems(@menu), (i) -> i.label == 'Check for Update'))
item.visible = visible
switch state
when 'idle', 'error', 'no-update-available'
checkForUpdateItem.visible = true
when 'checking', 'downloading'
downloadingUpdateItem.visible = true
when 'update-available'
installUpdateItem.visible = true
# Default list of menu items.
#
@@ -100,6 +92,7 @@ class ApplicationMenu
[
label: "Atom"
submenu: [
{ label: "Check for Update", metadata: {autoUpdate: true}}
{ label: 'Reload', accelerator: 'Command+R', click: => @focusedWindow()?.reload() }
{ label: 'Close Window', accelerator: 'Command+Shift+W', click: => @focusedWindow()?.close() }
{ label: 'Toggle Dev Tools', accelerator: 'Command+Alt+I', click: => @focusedWindow()?.toggleDevTools() }
@@ -112,17 +105,15 @@ class ApplicationMenu
# Combines a menu template with the appropriate keystroke.
#
# * template:
# An Object conforming to atom-shell's menu api but lacking accelerator and
# click properties.
# * keystrokesByCommand:
# An Object where the keys are commands and the values are Arrays containing
# the keystroke.
# template - An Object conforming to atom-shell's menu api but lacking
# accelerator and click properties.
# keystrokesByCommand - An Object where the keys are commands and the values
# are Arrays containing the keystroke.
#
# Returns a complete menu configuration object for atom-shell's menu API.
translateTemplate: (template, keystrokesByCommand) ->
template.forEach (item) =>
item.metadata = {}
item.metadata ?= {}
if item.command
item.accelerator = @acceleratorForCommand(item.command, keystrokesByCommand)
item.click = => global.atomApplication.sendCommand(item.command)
@@ -132,11 +123,9 @@ class ApplicationMenu
# Determine the accelerator for a given command.
#
# * command:
# The name of the command.
# * keystrokesByCommand:
# An Object where the keys are commands and the values are Arrays containing
# the keystroke.
# command - The name of the command.
# keystrokesByCommand - An Object where the keys are commands and the values
# are Arrays containing the keystroke.
#
# Returns a String containing the keystroke in a format that can be interpreted
# by atom shell to provide nice icons where available.
+55 -104
Ver Arquivo
@@ -1,9 +1,9 @@
AtomWindow = require './atom-window'
ApplicationMenu = require './application-menu'
AtomProtocolHandler = require './atom-protocol-handler'
AutoUpdateManager = require './auto-update-manager'
BrowserWindow = require 'browser-window'
Menu = require 'menu'
autoUpdater = require 'auto-updater'
app = require 'app'
dialog = require 'dialog'
fs = require 'fs'
@@ -66,13 +66,13 @@ class AtomApplication
@pathsToOpen ?= []
@windows = []
@autoUpdateManager = new AutoUpdateManager(@version)
@applicationMenu = new ApplicationMenu(@version)
@atomProtocolHandler = new AtomProtocolHandler(@resourcePath)
@listenForArgumentsFromNewProcess()
@setupJavaScriptArguments()
@handleEvents()
@setupAutoUpdater()
@openWithOptions(options)
@@ -96,6 +96,8 @@ class AtomApplication
addWindow: (window) ->
@windows.push window
@applicationMenu?.enableWindowSpecificItems(true)
window.once 'window:loaded', =>
@autoUpdateManager.emitUpdateAvailableEvent(window)
# Creates server to listen for additional atom application launches.
#
@@ -127,59 +129,21 @@ class AtomApplication
setupJavaScriptArguments: ->
app.commandLine.appendSwitch 'js-flags', '--harmony'
# Enable updates unless running from a local build of Atom.
setupAutoUpdater: ->
return if /\w{7}/.test(@version) # Only released versions should check for updates.
autoUpdater.setFeedUrl "https://atom.io/api/updates?version=#{@version}"
autoUpdater.on 'checking-for-update', =>
@applicationMenu.showDownloadingUpdateItem(false)
@applicationMenu.showInstallUpdateItem(false)
@applicationMenu.showCheckForUpdateItem(false)
autoUpdater.on 'update-not-available', =>
@applicationMenu.showCheckForUpdateItem(true)
autoUpdater.on 'update-available', =>
@applicationMenu.showDownloadingUpdateItem(true)
autoUpdater.on 'update-downloaded', (event, releaseNotes, releaseVersion, releaseDate, releaseURL) =>
atomWindow.sendCommand('window:update-available', [releaseVersion, releaseNotes]) for atomWindow in @windows
@applicationMenu.showInstallUpdateItem(true)
autoUpdater.on 'error', (event, message) =>
@applicationMenu.showCheckForUpdateItem(true)
# Check for update after Atom has fully started and the menus are created
setTimeout((-> autoUpdater.checkForUpdates()), 5000)
checkForUpdate: ->
@onUpdateNotAvailable ?= =>
autoUpdater.removeListener 'error', @onUpdateError
dialog.showMessageBox type: 'info', buttons: ['OK'], message: 'No update available.', detail: "Version #{@version} is the latest version."
@onUpdateError ?= (event, message) =>
autoUpdater.removeListener 'update-not-available', @onUpdateNotAvailable
dialog.showMessageBox type: 'warning', buttons: ['OK'], message: 'There was an error checking for updates.', detail: message
autoUpdater.once 'update-not-available', @onUpdateNotAvailable
autoUpdater.once 'error', @onUpdateError
autoUpdater.checkForUpdates()
# Registers basic application commands, non-idempotent.
handleEvents: ->
@on 'application:run-all-specs', -> @runSpecs(exitWhenDone: false, resourcePath: global.devResourcePath)
@on 'application:run-benchmarks', -> @runBenchmarks()
@on 'application:quit', -> app.quit()
@on 'application:new-window', -> @openPath(initialSize: @getFocusedWindowSize())
@on 'application:new-window', -> @openPath(windowDimensions: @focusedWindow()?.getDimensions())
@on 'application:new-file', -> (@focusedWindow() ? this).openPath()
@on 'application:open', -> @promptForPath()
@on 'application:open', -> @promptForPath(type: 'all')
@on 'application:open-file', -> @promptForPath(type: 'file')
@on 'application:open-folder', -> @promptForPath(type: 'folder')
@on 'application:open-dev', -> @promptForPath(devMode: true)
@on 'application:inspect', ({x,y}) -> @focusedWindow().browserWindow.inspectElement(x, y)
@on 'application:open-documentation', -> shell.openExternal('https://atom.io/docs/latest/?app')
@on 'application:install-update', -> autoUpdater.quitAndInstall()
@on 'application:check-for-update', => @checkForUpdate()
@on 'application:install-update', -> @autoUpdateManager.install()
@on 'application:check-for-update', => @autoUpdateManager.check()
if process.platform is 'darwin'
@on 'application:about', -> Menu.sendActionToFirstResponder('orderFrontStandardAboutPanel:')
@@ -219,6 +183,10 @@ class AtomApplication
event.preventDefault()
@openUrl({urlToOpen, @devMode})
app.on 'activate-with-no-open-windows', (event) =>
event.preventDefault()
@emit('application:new-window')
# A request from the associated render process to open a new render process.
ipc.on 'open', (processId, routingId, options) =>
if options?
@@ -250,10 +218,8 @@ class AtomApplication
#
# If it isn't handled globally, delegate to the currently focused window.
#
# * command:
# The string representing the command.
# * args:
# The optional arguments to pass along.
# command - The string representing the command.
# args - The optional arguments to pass along.
sendCommand: (command, args...) ->
unless @emit(command, args...)
focusedWindow = @focusedWindow()
@@ -282,8 +248,8 @@ class AtomApplication
#
# A new window will be created if there is no currently focused window.
#
# * eventName: The event to listen for.
# * pathToOpen: The path to open when the event is triggered.
# eventName - The event to listen for.
# pathToOpen - The path to open when the event is triggered.
openPathOnEvent: (eventName, pathToOpen) ->
@on eventName, ->
if window = @focusedWindow()
@@ -300,45 +266,25 @@ class AtomApplication
focusedWindow: ->
_.find @windows, (atomWindow) -> atomWindow.isFocused()
# Public: Get the height and width of the focused window.
#
# Returns an object with height and width keys or null if there is no
# focused window.
getFocusedWindowSize: ->
if focusedWindow = @focusedWindow()
[width, height] = focusedWindow.getSize()
{width, height}
else
null
# Public: Opens multiple paths, in existing windows if possible.
#
# * options
# + pathsToOpen:
# The array of file paths to open
# + pidToKillWhenClosed:
# The integer of the pid to kill
# + newWindow:
# Boolean of whether this should be opened in a new window.
# + devMode:
# Boolean to control the opened window's dev mode.
# options -
# :pathsToOpen - The array of file paths to open
# :pidToKillWhenClosed - The integer of the pid to kill
# :newWindow - Boolean of whether this should be opened in a new window.
# :devMode - Boolean to control the opened window's dev mode.
openPaths: ({pathsToOpen, pidToKillWhenClosed, newWindow, devMode}) ->
@openPath({pathToOpen, pidToKillWhenClosed, newWindow, devMode}) for pathToOpen in pathsToOpen ? []
# Public: Opens a single path, in an existing window if possible.
#
# * options
# + pathToOpen:
# The file path to open
# + pidToKillWhenClosed:
# The integer of the pid to kill
# + newWindow:
# Boolean of whether this should be opened in a new window.
# + devMode:
# Boolean to control the opened window's dev mode.
# + initialSize:
# Object with height and width keys.
openPath: ({pathToOpen, pidToKillWhenClosed, newWindow, devMode, initialSize}={}) ->
# options -
# :pathToOpen - The file path to open
# :pidToKillWhenClosed - The integer of the pid to kill
# :newWindow - Boolean of whether this should be opened in a new window.
# :devMode - Boolean to control the opened window's dev mode.
# :windowDimensions - Object with height and width keys.
openPath: ({pathToOpen, pidToKillWhenClosed, newWindow, devMode, windowDimensions}={}) ->
if pathToOpen
[basename, initialLine] = path.basename(pathToOpen).split(':')
if initialLine
@@ -358,7 +304,7 @@ class AtomApplication
bootstrapScript ?= require.resolve('../window-bootstrap')
resourcePath ?= @resourcePath
openedWindow = new AtomWindow({pathToOpen, initialLine, bootstrapScript, resourcePath, devMode, initialSize})
openedWindow = new AtomWindow({pathToOpen, initialLine, bootstrapScript, resourcePath, devMode, windowDimensions})
if pidToKillWhenClosed?
@pidsToOpenWindows[pidToKillWhenClosed] = openedWindow
@@ -390,11 +336,9 @@ class AtomApplication
# responsible for opening the URL. A new window will be created with
# that package's `urlMain` as the bootstrap script.
#
# * options
# + urlToOpen:
# The atom:// url to open.
# + devMode:
# Boolean to control the opened window's dev mode.
# options -
# :urlToOpen - The atom:// url to open.
# :devMode - Boolean to control the opened window's dev mode.
openUrl: ({urlToOpen, devMode}) ->
unless @packages?
PackageManager = require '../package-manager'
@@ -410,7 +354,8 @@ class AtomApplication
if pack.urlMain
packagePath = @packages.resolvePackagePath(packageName)
bootstrapScript = path.resolve(packagePath, pack.urlMain)
new AtomWindow({bootstrapScript, @resourcePath, devMode, urlToOpen, initialSize: @getFocusedWindowSize()})
windowDimensions = @focusedWindow()?.getDimensions()
new AtomWindow({bootstrapScript, @resourcePath, devMode, urlToOpen, windowDimensions})
else
console.log "Package '#{pack.name}' does not have a url main: #{urlToOpen}"
else
@@ -418,13 +363,11 @@ class AtomApplication
# Opens up a new {AtomWindow} to run specs within.
#
# * options
# + exitWhenDone:
# A Boolean that if true, will close the window upon completion.
# + resourcePath:
# The path to include specs from.
# + specPath:
# The directory to load specs from.
# options -
# :exitWhenDone - A Boolean that if true, will close the window upon
# completion.
# :resourcePath - The path to include specs from.
# :specPath - The directory to load specs from.
runSpecs: ({exitWhenDone, resourcePath, specDirectory, logFile}) ->
if resourcePath isnt @resourcePath and not fs.existsSync(resourcePath)
resourcePath = @resourcePath
@@ -451,10 +394,18 @@ class AtomApplication
#
# Once paths are selected, they're opened in a new or existing {AtomWindow}s.
#
# * options
# + devMode:
# A Boolean which controls whether any newly opened windows should be in
# dev mode or not.
promptForPath: ({devMode}={}) ->
dialog.showOpenDialog title: 'Open', properties: ['openFile', 'openDirectory', 'multiSelections', 'createDirectory'], (pathsToOpen) =>
# options -
# :type - A String which specifies the type of the dialog, could be 'file',
# 'folder' or 'all'. The 'all' is only available on OS X.
# :devMode - A Boolean which controls whether any newly opened windows
# should be in dev mode or not.
promptForPath: ({type, devMode}={}) ->
type ?= 'all'
properties =
switch type
when 'file' then ['openFile']
when 'folder' then ['openDirectory']
when 'all' then ['openFile', 'openDirectory']
else throw new Error("#{type} is an invalid type for promptForPath")
dialog.showOpenDialog title: 'Open', properties: properties.concat(['multiSelections', 'createDirectory']), (pathsToOpen) =>
@openPaths({pathsToOpen, devMode})
+12 -3
Ver Arquivo
@@ -7,9 +7,12 @@ path = require 'path'
fs = require 'fs'
url = require 'url'
_ = require 'underscore-plus'
{EventEmitter} = require 'events'
module.exports =
class AtomWindow
_.extend @prototype, EventEmitter.prototype
@iconPath: path.resolve(__dirname, '..', '..', 'resources', 'atom.png')
@includeShellLoadTime: true
@@ -38,7 +41,10 @@ class AtomWindow
loadSettings.initialPath = path.dirname(pathToOpen)
@browserWindow.loadSettings = loadSettings
@browserWindow.once 'window:loaded', => @loaded = true
@browserWindow.once 'window:loaded', =>
@emit 'window:loaded'
@loaded = true
@browserWindow.loadUrl @getUrl(loadSettings)
@browserWindow.focusOnWebView() if @isSpec
@@ -132,12 +138,15 @@ class AtomWindow
action = if args[0]?.contextCommand then 'context-command' else 'command'
ipc.sendChannel @browserWindow.getProcessId(), @browserWindow.getRoutingId(), action, command, args...
getDimensions: ->
[x, y] = @browserWindow.getPosition()
[width, height] = @browserWindow.getSize()
{x, y, width, height}
close: -> @browserWindow.close()
focus: -> @browserWindow.focus()
getSize: -> @browserWindow.getSize()
minimize: -> @browserWindow.minimize()
maximize: -> @browserWindow.maximize()
+76
Ver Arquivo
@@ -0,0 +1,76 @@
autoUpdater = require 'auto-updater'
dialog = require 'dialog'
_ = require 'underscore-plus'
{EventEmitter} = require 'events'
IDLE_STATE='idle'
CHECKING_STATE='checking'
DOWNLOADING_STATE='downloading'
UPDATE_AVAILABLE_STATE='update-available'
NO_UPDATE_AVAILABLE_STATE='no-update-available'
ERROR_STATE='error'
module.exports =
class AutoUpdateManager
_.extend @prototype, EventEmitter.prototype
constructor: (@version) ->
@state = IDLE_STATE
# Only released versions should check for updates.
return if /\w{7}/.test(@version)
autoUpdater.setFeedUrl "https://atom.io/api/updates?version=#{@version}"
autoUpdater.on 'checking-for-update', =>
@setState(CHECKING_STATE)
autoUpdater.on 'update-not-available', =>
@setState(NO_UPDATE_AVAILABLE_STATE)
autoUpdater.on 'update-available', =>
@setState(DOWNLOADING_STATE)
autoUpdater.on 'error', (event, message) =>
@setState(ERROR_STATE)
console.error "Error Downloading Update: #{message}"
autoUpdater.on 'update-downloaded', (event, @releaseNotes, @releaseVersion) =>
@setState(UPDATE_AVAILABLE_STATE)
@emitUpdateAvailableEvent(@getWindows()...)
@check(hidePopups: true)
emitUpdateAvailableEvent: (windows...) ->
return unless @releaseVersion? and @releaseNotes
for atomWindow in windows
atomWindow.sendCommand('window:update-available', [@releaseVersion, @releaseNotes])
setState: (state) ->
return unless @state != state
@state = state
@emit 'state-changed', @state
getState: ->
@state
check: ({hidePopups}={})->
unless hidePopups
autoUpdater.once 'update-not-available', @onUpdateNotAvailable
autoUpdater.once 'error', @onUpdateError
autoUpdater.checkForUpdates()
install: ->
autoUpdater.quitAndInstall()
onUpdateNotAvailable: =>
autoUpdater.removeListener 'error', @onUpdateError
dialog.showMessageBox type: 'info', buttons: ['OK'], message: 'No update available.', detail: "Version #{@version} is the latest version."
onUpdateError: (event, message) =>
autoUpdater.removeListener 'update-not-available', @onUpdateNotAvailable
dialog.showMessageBox type: 'warning', buttons: ['OK'], message: 'There was an error checking for updates.', detail: message
getWindows: ->
global.atomApplication.windows
+3 -1
Ver Arquivo
@@ -630,7 +630,9 @@ class Editor extends Model
@moveCursorToBeginningOfLine()
@moveCursorLeft()
@insertNewline()
@setIndentationForBufferRow(bufferRow, indentLevel) if @shouldAutoIndent()
if @shouldAutoIndent() and @indentationForBufferRow(bufferRow) < indentLevel
@setIndentationForBufferRow(bufferRow, indentLevel)
if onFirstLine
@moveCursorUp()
+2 -2
Ver Arquivo
@@ -92,10 +92,10 @@ class MenuManager
merge: (menu, item) ->
item = _.deepClone(item)
if item.submenu? and match = _.find(menu, (i) => i.submenu? and @normalizeLabel(i.label) == @normalizeLabel(item.label))
if item.submenu? and match = _.find(menu, ({label, submenu}) => submenu? and label and @normalizeLabel(label) is @normalizeLabel(item.label))
@merge(match.submenu, i) for i in item.submenu
else
menu.push(item) unless _.find(menu, (i) => @normalizeLabel(i.label) == @normalizeLabel(item.label))
menu.push(item) unless _.find(menu, ({label}) => label and @normalizeLabel(label) is @normalizeLabel(item.label))
# OSX can't handle displaying accelerators for multiple keystrokes.
# If they are sent across, it will stop processing accelerators for the rest
+1
Ver Arquivo
@@ -99,6 +99,7 @@ class Selection
clear: ->
@marker.setAttributes(goalBufferRange: null)
@marker.clearTail() unless @retainSelection
@finalize()
# Public: Modifies the selection to encompass the current word.
#
+7 -4
Ver Arquivo
@@ -37,18 +37,21 @@ class WindowEventHandler
@reloadRequested = false
confirmed
@subscribe $(window), 'blur unload', ->
atom.storeDefaultWindowDimensions()
@subscribe $(window), 'unload', ->
atom.storeWindowDimensions()
@subscribeToCommand $(window), 'window:toggle-full-screen', => atom.toggleFullScreen()
@subscribeToCommand $(window), 'window:toggle-full-screen', -> atom.toggleFullScreen()
@subscribeToCommand $(window), 'window:close', => atom.close()
@subscribeToCommand $(window), 'window:close', -> atom.close()
@subscribeToCommand $(window), 'window:reload', =>
@reloadRequested = true
atom.reload()
@subscribeToCommand $(window), 'window:toggle-dev-tools', => atom.toggleDevTools()
@subscribeToCommand $(window), 'window:toggle-dev-tools', -> atom.toggleDevTools()
@subscribeToCommand $(document), 'core:focus-next', @focusNext
@@ -92,7 +95,7 @@ class WindowEventHandler
bindCommandToAction('core:redo', 'redo:')
bindCommandToAction('core:select-all', 'selectAll:')
openLink: (event) =>
openLink: (event) ->
location = $(event.target).attr('href')
if location and location[0] isnt '#' and /^https?:\/\//.test(location)
shell.openExternal(location)
+2
Ver Arquivo
@@ -116,6 +116,8 @@ class WorkspaceView extends View
@command 'application:new-window', -> ipc.sendChannel('command', 'application:new-window')
@command 'application:new-file', -> ipc.sendChannel('command', 'application:new-file')
@command 'application:open', -> ipc.sendChannel('command', 'application:open')
@command 'application:open-file', -> ipc.sendChannel('command', 'application:open-file')
@command 'application:open-folder', -> ipc.sendChannel('command', 'application:open-folder')
@command 'application:open-dev', -> ipc.sendChannel('command', 'application:open-dev')
@command 'application:minimize', -> ipc.sendChannel('command', 'application:minimize')
@command 'application:zoom', -> ipc.sendChannel('command', 'application:zoom')