Comparar commits

...

1108 Commits

Autor SHA1 Mensagem Data
Kevin Sawicki 2efbe9ce4e Run partial-clean during deploy task 2013-07-08 11:29:46 -07:00
Kevin Sawicki 3366c4d6a5 Remove node_modules before bootstrapping 2013-07-08 11:29:28 -07:00
Kevin Sawicki acb69a4221 Format stack traces in console reporter
This generates valid CoffeeScript line/column numbers and
also removes noisy lines from jasmine.js and from the grunt
stack portion for the initial test process spawn.
2013-07-06 15:39:32 -07:00
Kevin Sawicki b3b501ef07 Set stack trace overflow to auto
This keeps the stack trace text inside the spec box when the window
in narrower than the stack trace lines.
2013-07-06 14:27:23 -07:00
Kevin Sawicki e34d8e4c42 Display CoffeeScript line numbers in stack traces
Use coffeestack to convert stack traces to have CoffeeScript
line and column numbers in the output instead of JavaScript line
and column numbers.
2013-07-06 14:27:16 -07:00
Kevin Sawicki adebae6c47 Remove jasmine.js lines from displayed stack trace
This removes the noise from the setup and compare lines that occur in
jasmine.js and only displays the lines that are generated from within
the failing spec.
2013-07-06 14:03:13 -07:00
Kevin Sawicki 4ae0d8af9f Use tantamount for _.isEqual() implementation
This code was needed in telepath so it was pulled out as a
standalone module with the exact same behavior as was previously
in Atom.
2013-07-06 13:54:46 -07:00
Kevin Sawicki 651bbaa3ce Create an empty ~/.atom/config.cson when missing
Closes #614
2013-07-05 09:17:44 -07:00
Kevin Sawicki & Nathan Sobo 0448ba5ceb Remove atom-shell during partial-clean task instead of clean task 2013-07-03 17:53:43 -07:00
Kevin Sawicki & Nathan Sobo 6d70bf9106 Remove node_modules during script/cibuild so they recompile during bootstrap 2013-07-03 17:53:43 -07:00
Cheng Zhao 857629e07e Revert "Revert "Upgrade apm: update node to v0.10.12.""
This reverts commit 18c5c788d7.
2013-07-04 08:52:13 +08:00
Cheng Zhao 18c5c788d7 Revert "Upgrade apm: update node to v0.10.12."
This reverts commit 433beac9aa.
2013-07-04 08:37:59 +08:00
Cheng Zhao a8e7a9a091 Should also clean atom-shell. 2013-07-04 07:22:15 +08:00
Kevin Sawicki 59097ddf96 Remove ~/.atom/.node-gyp during clean 2013-07-03 09:26:04 -07:00
Cheng Zhao 433beac9aa Upgrade apm: update node to v0.10.12. 2013-07-03 18:23:41 +08:00
Kevin Sawicki c7f6e87132 Only use event.which when key identifier is non-ASCII
Previously event.which was used when it was less than the key identifier
which broke fn-delete since that generates a valid key identifier but a
lower event.which value that does not translate to 'delete' using the char
code converter.

Close #611
2013-07-02 13:13:45 -07:00
Garen Torikian 64e2fee975 Merge pull request #610 from github/add-nooutput-to-biscotto
Bump the biscotto version
2013-07-02 11:13:20 -07:00
Garen Torikian df35cb0756 Bump the biscotto version
This prevents doc builds from occuring when you're only interested in stats/missing
2013-07-02 11:07:58 -07:00
Kevin Sawicki & Nathan Sobo 0e6a3c52ad Add comments to view cache ivars 2013-07-02 10:13:59 -07:00
Kevin Sawicki b786bcc774 Store views that don't implement setModel() by their item
Previously viewForItem() would create a new view each time it was called
with an item whose view did not implement setModel() even if a view for that
item already existed in the pane.

Now a WeakMap is used to map items to their view so they can be reused
and cleaned up even when the view does not implement setModel().
2013-07-02 09:41:46 -07:00
Kevin Sawicki 6cb13e843c Mention more fixed and added items 2013-07-02 09:08:57 -07:00
Kevin Sawicki 7e76721712 Don't call realpathSync for non-existent directory 2013-07-01 13:23:47 -07:00
Nathan Sobo 23df564189 Release any leftover buffers in Project.destroy 2013-07-01 14:21:42 -06:00
Nathan Sobo 0c17ed9c33 Return a clone of @buffers from Project.getBuffers
Previously, we traversed the EditSessions. Not necessary.
2013-07-01 14:21:42 -06:00
Kevin Sawicki cde9ae02fe Prevent clash between path require and variable name 2013-07-01 13:07:35 -07:00
Kevin Sawicki 77017c2cd3 Compare against realpath of HOME 2013-07-01 12:59:31 -07:00
Kevin Sawicki 7615d54337 Support calling fsUtils.absolute() with a '~' path 2013-07-01 12:46:50 -07:00
Kevin Sawicki 6b591b121d Interpolate pathToCreate instead of path
This regressed as part of the migration to using helpers from
path instead of fs-utils.

Close #608
2013-07-01 12:10:52 -07:00
Kevin Sawicki & Nathan Sobo 268edf16d8 Make setModel optional in pane item view classes 2013-07-01 10:53:34 -07:00
Kevin Sawicki 01f220fb1b Support non-English keyboard languages
Use event.which if it is lower than the parsed key identifier.
This is the case when a non-English keyboard language is selected and
a physical English keyboard is being used.

This allows keybindings to still work even when the physical key pressed
is different than the key it maps to for the currently selected language.

Closes #585
2013-06-28 16:36:55 -07:00
Kevin Sawicki 53a92751e6 Add missing @ before call to confirmSync 2013-06-28 10:06:41 -07:00
Nathan Sobo b66431e3a6 Delete atom.windowState in global afterEach
It seems like the windowState was getting saved to disk, causing weird
window state to be loaded on the next test run and a spec to fail.
2013-06-28 04:39:31 -06:00
Nathan Sobo 5a9e45f9d8 Upgrade telepath 2013-06-28 04:39:31 -06:00
Kevin Sawicki 8561bb34a8 Save and restore spec window dimensions
Closes #597
2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo d55c09c9d3 Nuke documentation threshold specs
We're going to make it a lint task that's run via grunt.
2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo f4300b8cab Fix specs due to scrollTop/Left becoming methods on EditSession 2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo f3f9c2c921 Show active item from Pane constructor if state has activeItemUri 2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo 33dca9315c Add PaneContainer.getState 2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo c596514d11 Accept documents in EditSession and replicate scroll position 2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo 390b03647e Don't clear #jasmine-content when window.debugContent is true 2013-06-28 04:39:30 -06:00
Kevin Sawicki & Nathan Sobo 5b00cf1701 Rename Buffer -> TextBuffer to match file and deserializer name 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo 95e69ad858 Use .getState() instead of .serialize() in replication specs 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo ef0363e8ff Use jasmine-focused npm instead of spec/jasmine-focused.coffee 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo a62cd0f16a Replicate active pane item 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo f340828506 Use .getState() instead of .serialize() when mutating panes 2013-06-28 04:39:29 -06:00
Kevin Sawicki & Nathan Sobo 8b0a68dd4a Return this from $.fn.attachToDom spec helper 2013-06-28 04:39:29 -06:00
Kevin Sawicki 1049a677bf Set dimension of spec window 2013-06-28 04:39:29 -06:00
Kevin Sawicki d2bc415042 Remove telepath from package.json 2013-06-28 04:39:28 -06:00
Kevin Sawicki b439e6239d Add telepath as submodule 2013-06-28 04:39:28 -06:00
Kevin Sawicki b999c71ad6 Auto-insert clipboard when it is a GUID 2013-06-28 04:39:28 -06:00
Kevin Sawicki 9f31f9a76b Add loading view when joining session 2013-06-28 04:39:28 -06:00
Kevin Sawicki & Nathan Sobo 7fe356b649 Ensure events are delivered in order 2013-06-28 04:39:28 -06:00
Kevin Sawicki & Nathan Sobo b5aa0b900c Remove output listener when connection is closed 2013-06-28 04:39:28 -06:00
Kevin Sawicki & Nathan Sobo cd4622fbeb Serialize project in window state 2013-06-28 04:39:27 -06:00
Kevin Sawicki & Nathan Sobo 89192c2ee2 Extract helpers to session-utils 2013-06-28 04:39:27 -06:00
Kevin Sawicki & Nathan Sobo b5b408d134 Open new window when joining collaboration session 2013-06-28 04:39:27 -06:00
Kevin Sawicki b08f320ed5 Remove mini class to give id enough room 2013-06-28 04:39:27 -06:00
Kevin Sawicki 4c7025ae81 Add message to join prompt 2013-06-28 04:39:27 -06:00
Kevin Sawicki 554af1becb Add initial collaboration keymap 2013-06-28 04:39:27 -06:00
Kevin Sawicki 6d49e0fd57 Pass through all window settings as load settings 2013-06-28 04:39:26 -06:00
Kevin Sawicki 31d872fbfe Add atom.openWindow() 2013-06-28 04:39:26 -06:00
Kevin Sawicki b842a727ee Support sending in windowState to AtomWindow ctor 2013-06-28 04:39:26 -06:00
Kevin Sawicki & Nathan Sobo 0851b4d011 Replicate pane splitting and removal
We're using Peer.js to stream changes to shared telepath documents
between participants.

We're replacing the rootView of joiners in a somewhat hacky way,
but replication of pane splits and items is fully tested.
2013-06-28 04:39:26 -06:00
Kevin Sawicki & Nathan Sobo 8a7c57994d Remove parens from require 2013-06-28 04:39:26 -06:00
Kevin Sawicki & Nathan Sobo 6480e956af Keep resident window state object 2013-06-28 04:39:26 -06:00
Kevin Sawicki & Nathan Sobo 9c95a4751b Return telepath documents from getWindowState() 2013-06-28 04:39:25 -06:00
Kevin Sawicki & Nathan Sobo d283834978 Add initial document sharing over peerJS connection 2013-06-28 04:38:22 -06:00
Kevin Sawicki 66b490b5da Add initial collaboration package 2013-06-28 04:38:22 -06:00
Kevin Sawicki 0d252ab9fd Use parent directory as resource path 2013-06-27 09:19:37 -07:00
Kevin Sawicki 3e8de2d22d Use config to retrieve contents directory 2013-06-27 09:18:22 -07:00
Kevin Sawicki 52aee1d050 💄 2013-06-27 09:11:15 -07:00
Kevin Sawicki ff9dc2c5af Look under atom instead of globals for buildDir 2013-06-27 09:10:18 -07:00
Kevin Sawicki 3b8cdb58e2 Rename docs to docs-task 2013-06-27 09:08:16 -07:00
Kevin Sawicki bd14aeee17 Move Grunt tasks to tasks directory 2013-06-27 09:07:33 -07:00
Cheng Zhao e434f7c0a9 💄 2013-06-27 22:39:41 +08:00
Cheng Zhao 837e3000d3 Merge pull request #605 from github/beforeunload
Use beforeunload handler to control whether window should close
2013-06-27 07:33:35 -07:00
Cheng Zhao e1c2aa0da1 Fix specs regarding beforeunload event. 2013-06-27 21:31:07 +08:00
Cheng Zhao e7aac2ef6e Show confirm close dialog as sheet. 2013-06-27 21:30:47 +08:00
Cheng Zhao f9545acde6 Show window before opening devtools.
It may happen that an exception is thrown before window is shown.
2013-06-27 19:29:35 +08:00
Cheng Zhao 45ce8e1d63 Ask for close confirmation in beforeunload handler. 2013-06-27 18:39:29 +08:00
Cheng Zhao bdbec54f24 Make PaneContainer.confirmClose() synchronous. 2013-06-27 16:21:14 +08:00
Cheng Zhao 1df48d1725 Fix spec of confirmSync in 'window:close'. 2013-06-27 15:07:38 +08:00
Cheng Zhao 6c0f4c09d9 Make Pane.promptToSaveItem synchronous. 2013-06-27 12:40:36 +08:00
Cheng Zhao f45ce3a7ee Upgrade apm: update to node v0.10.12. 2013-06-27 10:59:09 +08:00
Kevin Sawicki dc6e624eda Add grunt tasks to generate and lint docs
Closes #604
2013-06-26 19:25:50 -07:00
Kevin Sawicki e67676b01c Use deleteSelectedText() instead of delete()
Selection.delete() adds to the selection if it is empty which
we don't want to do when replacing selected text.

Closes #603
2013-06-26 19:03:45 -07:00
Kevin Sawicki f37ae7e4e7 Upgrade dev dependencies 2013-06-26 08:57:52 -07:00
Kevin Sawicki f913f6a8d5 Upgrade dependencies 2013-06-26 08:56:04 -07:00
Kevin Sawicki 20991381bd Remove unneeded stdout/stderr output forwarding 2013-06-25 17:47:21 -07:00
Kevin Sawicki 6930fe0eff Mention keymap fixes 2013-06-25 13:47:39 -07:00
Kevin Sawicki f3b50eed3b Migrate close bindings from editor namespace to pane
These were left over from the pane migration still under
the editor namespace and were previously not accessible via
a keybinding.
2013-06-25 13:15:39 -07:00
probablycorey a4217909c0 Don't check for updates in background if version is a sha
If the version is a 7 char sha, then we assume it is a local build.
2013-06-25 09:54:03 -07:00
Kevin Sawicki 5b7c4686f9 Add nof task 2013-06-24 20:55:55 -07:00
Kevin Sawicki 86c8343107 Score grammar matches using longest fileType match
Previously the score for two grammars matching on path
was equal and so the first one would be selected.

Now the longer match will have a higher score and will be selected
over other grammars with shorter fileType match lengths.

Closes #602
2013-06-24 18:23:54 -07:00
Kevin Sawicki 6b6ce03c72 Use hasParent() instead of isOnDom() 2013-06-24 18:03:35 -07:00
Kevin Sawicki a7ee5985db Separate variable from requires 2013-06-24 16:56:52 -07:00
Kevin Sawicki be354f78a6 Focus root view if previously focused element is no longer attached
This can be the case when a select list is triggered while a different
select list is already open and so the second list to open has no
element to restore focus to when it closes.
2013-06-24 16:46:36 -07:00
Kevin Sawicki ab75f6f635 Don't detach on focusout when detaching 2013-06-24 16:45:26 -07:00
Kevin Sawicki d6513e9aa9 Use BufferedProcess for apm commands
This ensures the path to node is always available in the environment.
2013-06-24 16:44:40 -07:00
Kevin Sawicki afac77ddfd Don't copy bootstrap docs to build folder 2013-06-24 16:17:07 -07:00
Kevin Sawicki fcd0b6839b Don't copy vendor/apm to build folder
This is already copied as node_modules/atom-package-manager
2013-06-24 16:13:56 -07:00
Kevin Sawicki 32c2548442 Allow spaces before fenced code block language 2013-06-24 15:13:51 -07:00
Kevin Sawicki 1cf02c22a7 Support colorizing fenced python blocks 2013-06-24 15:08:19 -07:00
Kevin Sawicki 34e5594a2d Nest all rules under a root .is-blurred class 2013-06-24 15:01:05 -07:00
Kevin Sawicki 46eac52dbf Upgrade apm 2013-06-24 14:57:32 -07:00
Kevin Sawicki 915a737797 Don't copy git-utils/oniguruma deps/ during build
These contain source files used to build the native modules
and are not needed in the binary distribution.
2013-06-24 14:56:02 -07:00
Kevin Sawicki d227d8794d Upgrade apm 2013-06-24 14:24:29 -07:00
Kevin Sawicki ad888b3250 Use walkdir for recursively copying
grunt.file.recurse only calls back for file paths so directory
symlinks are being copied instead of linked causing duplicate
files in the final build folder.
2013-06-24 14:11:18 -07:00
Kevin Sawicki 5350a67990 Correct typo in package.json key 2013-06-24 12:13:48 -07:00
Kevin Sawicki c02be2330c Only read package.json once 2013-06-24 12:05:14 -07:00
Kevin Sawicki cf936a8a02 Upgrade apm 2013-06-24 11:45:53 -07:00
Kevin Sawicki 0b07d276b9 Don't copy dev dependencies during build task
Closes #601
2013-06-24 11:14:46 -07:00
Kevin Sawicki 6879f0d0ac Update initialPath on project path changes
atom.setPathToOpen() is now longer available and instead
the load settings should be updated.
2013-06-24 10:41:44 -07:00
Kevin Sawicki d31d18360b Store untitled window state under load settings
This keeps untitled windows from contaminating each other by
storing to the same state path on disk but still stores state
across reloads of the windows.

Closes #599
2013-06-24 10:37:53 -07:00
Kevin Sawicki aeee3c9ade Remove unused methods 2013-06-24 08:53:15 -07:00
Kevin Sawicki dae28d2222 Add light syntax colors for embedded strings
Closes #598
2013-06-24 08:33:18 -07:00
Kevin Sawicki f81f95e830 💄 2013-06-24 08:32:33 -07:00
Kevin Sawicki 41611f826a Add back lint as part of CI 2013-06-21 19:59:37 -07:00
Kevin Sawicki 4eac57c31c Capture test standard out and error and log it 2013-06-21 13:35:19 -07:00
probablycorey 2a7f03761d Update documentation 2013-06-21 09:46:25 -07:00
probablycorey 264f7e1a74 Add script/test 2013-06-21 09:46:25 -07:00
probablycorey 94227889f1 script/build calls script/bootstrap 2013-06-21 09:46:25 -07:00
Kevin Sawicki 34114a9620 Add jasmine-focused as dev dependency
This has the nof command to un-focus all specs
2013-06-21 09:36:27 -07:00
Kevin Sawicki b562b3cf72 Remove script/copy-info-plist
Perform the copy in Gruntfile.coffee instead of a script
2013-06-21 09:30:53 -07:00
Kevin Sawicki 3938d143a1 Drop unneeded './' from script commands 2013-06-20 22:02:53 -07:00
Kevin Sawicki 95418566ef Correct typo in Requirements 2013-06-20 22:02:28 -07:00
Kevin Sawicki 622b877663 Remove extra newline 2013-06-20 21:59:23 -07:00
Kevin Sawicki 503ff13eb3 Sort keys in fence extension hash 2013-06-20 21:59:21 -07:00
Kevin Sawicki 2792f0d835 Map XML fence to grammar 2013-06-20 21:59:12 -07:00
probablycorey 82cb2aa124 Remove unused scripts 2013-06-20 17:15:53 -07:00
probablycorey ba08123abc Update installation instructions 2013-06-20 17:15:53 -07:00
probablycorey 93d6a80bc6 Add script/build task 2013-06-20 17:15:53 -07:00
probablycorey fd78c2a709 Don't clean node_modules when building 2013-06-20 17:15:53 -07:00
Kevin Sawicki & Nathan Sobo fb7080c39a Remove unused require 2013-06-20 17:15:53 -07:00
probablycorey cc591e18b0 Remove colored output from cibuilds 2013-06-20 17:15:53 -07:00
probablycorey 7e6979236e 🐛 2013-06-20 17:15:53 -07:00
probablycorey e72c48607b Fix doc specs 2013-06-20 17:15:52 -07:00
probablycorey 3e91334c82 Bundle themes are no longer copied 2013-06-20 17:15:52 -07:00
probablycorey 593e8c0e14 Don't bootstrap from gruntfile 2013-06-20 17:15:52 -07:00
probablycorey f8bc5ce648 cibuild runs ./script/bootstrap 2013-06-20 17:15:52 -07:00
probablycorey 29f10e71ce Mentioned grunt change 2013-06-20 17:15:52 -07:00
probablycorey 84340782ff Update readme 2013-06-20 17:15:52 -07:00
probablycorey 674946d180 Update rakefile 2013-06-20 17:15:52 -07:00
probablycorey abf4a6501a Use grunt to run ci tests 2013-06-20 17:15:52 -07:00
probablycorey ee0d073cd2 Update default grunt task 2013-06-20 17:15:52 -07:00
probablycorey 2d583d6ea0 Use local spawn method to output all errors 2013-06-20 17:15:52 -07:00
probablycorey e46af10631 Remove unused files from gitignore 2013-06-20 17:15:52 -07:00
probablycorey 0328c77be1 Don't copy themes to .atom dir 2013-06-20 17:15:51 -07:00
probablycorey 5c2aaf9849 Create deploy task 2013-06-20 17:15:51 -07:00
Kevin Sawicki & Nathan Sobo eab21e19f6 💄 2013-06-20 16:13:42 -07:00
Kevin Sawicki & Nathan Sobo 266548d75c Implement dev window opening with meta-O 2013-06-20 16:12:11 -07:00
probablycorey 4731c1f3f0 Hack to always update from the speakeasy master release
Related to https://github.com/atom/atom-shell/issues/33
2013-06-20 12:15:35 -07:00
probablycorey d6cd51399d Fix build script 2013-06-20 12:15:35 -07:00
probablycorey 7eff25e180 Install atom when default grunt task is run 2013-06-20 12:15:35 -07:00
probablycorey ab53e2ffda Rename create-atom script to constructicon/build 2013-06-20 12:15:35 -07:00
probablycorey e23357cf13 Default to version 0 2013-06-20 12:15:35 -07:00
probablycorey d5808e1164 Let constructicon set the SUFeedURL 2013-06-20 12:15:35 -07:00
probablycorey f47fa21fe9 Don't create version file in app bundle 2013-06-20 12:15:34 -07:00
probablycorey 478c617e60 Don't use polite curl in update-atom-shell 2013-06-20 12:15:34 -07:00
probablycorey 4449758135 Don't set version when building on constructicon 2013-06-20 12:15:34 -07:00
probablycorey 7163d8dc71 Make atom work with constructicon 2013-06-20 12:15:34 -07:00
probablycorey 128f7b851a Better constructicon output 2013-06-20 12:15:34 -07:00
probablycorey 90bc5f58f7 Bootstrap atom before constructicon build 2013-06-20 12:15:34 -07:00
probablycorey c89328fa14 Set permissions for prebuild script 2013-06-20 12:15:34 -07:00
probablycorey af655b3674 Make atom work with constructicon 2013-06-20 12:15:34 -07:00
probablycorey 5875c814df Don't assume we can remove the BUILD_DIR 2013-06-20 12:15:34 -07:00
probablycorey fcaa952973 Simplify gyp
Gyp is only used for construction now.
2013-06-20 12:15:34 -07:00
probablycorey 65c02328b3 Remove polite curl 2013-06-20 12:15:34 -07:00
probablycorey d629468cd1 Send error to async callback 2013-06-20 12:15:34 -07:00
probablycorey 0cdb477b3f Only copy the app file 2013-06-20 12:15:34 -07:00
probablycorey ed4f4a699b Remove typo that causes everything to fail 2013-06-20 12:15:34 -07:00
probablycorey fc7b8b4bf1 Replace local exec function calls with grunt.util.spawn 2013-06-20 12:15:33 -07:00
probablycorey 22b7ae2136 Move plist code into update-info-plist 2013-06-20 12:15:33 -07:00
probablycorey 032d865c92 Move plist code into update-info-plist 2013-06-20 12:15:33 -07:00
probablycorey c48c716eb0 Move utility functions to bottom of file 2013-06-20 12:15:33 -07:00
probablycorey e98219d2c5 Allow gruntfile to set build-dir from the command line 2013-06-20 12:15:33 -07:00
probablycorey 519e090a7a Rename app-Info.plist to atom-Info.plist 2013-06-20 12:15:33 -07:00
probablycorey 4e0f37281b Add codesign grunt task 2013-06-20 12:15:33 -07:00
probablycorey e6750de14d Remove lint from default task
It is causing an error.
2013-06-20 12:15:33 -07:00
probablycorey 5380a342d5 Rename postbuild to update-version 2013-06-20 12:15:33 -07:00
Nathan Sobo 44e73200ff Default editor.normalizeIndentOnPaste to true 2013-06-19 13:01:23 -06:00
Nathan Sobo 48b4c62696 Add editor.normalizeIndentOnPaste to the config panel 2013-06-19 13:01:01 -06:00
Corey Johnson & Nathan Sobo b9accadb70 When normalizing indent, ignore leading spaces of first line
Fixes #594
2013-06-19 12:21:05 -06:00
Kevin Sawicki e358c67da5 Listen for correct path loader progress event 2013-06-19 10:17:23 -07:00
Kevin Sawicki 1764677b7d Unsubscribe markers when destroying display buffer
Previously the display buffer markers would still fire events
even after a display buffer was destroyed since they were not
being unsubscribed from their underlying buffer marker which
could still fire events in the case of an editor split on the
same buffer.

Closes #593
2013-06-19 09:56:55 -07:00
probablycorey 264ddbe183 Use app.getVersion instead of the version file 2013-06-19 09:43:34 -07:00
probablycorey d8ba422178 Replace global.homeDir with app.getHomeDir() 2013-06-19 09:33:34 -07:00
Cheng Zhao 95f43917a4 Use @resourcePath when resource path of specs doesn't exist.
People may put atom under places other than ~/github/atom and wants to
run specs.
2013-06-19 14:01:24 +08:00
Cheng Zhao e0f806f0fb Use app.getHomeDir() API to get home dir. 2013-06-19 13:57:31 +08:00
Kevin Sawicki & Nathan Sobo 01a7b5fbc6 Throw exception when referencing a non-existent screen line 2013-06-18 14:34:23 -06:00
Kevin Sawicki c86b8198d9 Use built-in underscore from grunt.util 2013-06-18 10:21:15 -07:00
Kevin Sawicki 3771bda471 Separate resources and mac segments before joining 2013-06-18 10:09:16 -07:00
Kevin Sawicki 1178d844d0 Look before and after empty lines for max indent level
Previously the indentation guide level for empty lines was
derived by only looking after the empty line which caused gaps
in certain cases.

Now the indentation for an empty line is the higher value of the
previous non-empty line indentation and the following non-empty
line indentation.

Closes #588
2013-06-18 09:56:31 -07:00
Kevin Sawicki aa9577db67 Upgrade to lesslint 0.7 2013-06-17 20:02:35 -07:00
Kevin Sawicki 7af474cbc6 Disable outline-none rule 2013-06-17 19:58:21 -07:00
Kevin Sawicki 7f6de430c0 Remove unneeded units 2013-06-17 19:57:38 -07:00
Kevin Sawicki bc2d0ff0cc Only check ending rules when stack size increases
Previously on zero length matches the last two rules were compared
and if they had the same scope name then the last rule was popped
and the remaining line was tokenized using the current scope stack
to prevent infinite parsing loops.

This caused nested method calls in Java to not tokenize correctly
since method rules were sequential in the stack but did not constitute
an infinite loop of zero matches since the stack was currently decreasing.

Now the last two rules are only compared when the stack size is increasing
to prevent this false positive.

Closes #587
2013-06-17 13:08:10 -07:00
Kevin Sawicki 645aa65e9b Remove view when package is deactivated 2013-06-17 12:11:26 -07:00
Kevin Sawicki 2ae494999c Terminate in beforeRemove() instead of afterRemove() 2013-06-17 12:11:26 -07:00
Kevin Sawicki 2826d50cbb Remove logging of pid 2013-06-17 12:11:26 -07:00
Corey Johnson & Kevin Sawicki 8c4bddac9f Add spec for Task.once() 2013-06-17 12:11:26 -07:00
Corey Johnson & Kevin Sawicki 2a7d35cc39 Remove spec that was renamed to task-spec.coffee 2013-06-17 12:11:26 -07:00
Corey Johnson & Kevin Sawicki 8389698958 Drop suffix from handler path 2013-06-17 12:11:26 -07:00
Kevin Sawicki 289b270c85 Use Task.once for repository status handler 2013-06-17 12:11:26 -07:00
Corey Johnson & Kevin Sawicki 8661290c6a Rename LoadPathsTask to PathLoader 2013-06-17 12:11:26 -07:00
Corey Johnson & Kevin Sawicki 84a8f11fc9 Make fuzzy finder work with new Task system 2013-06-17 12:11:25 -07:00
Kevin Sawicki ad1b530d32 💄 2013-06-17 12:11:25 -07:00
Kevin Sawicki 65e322824b Remove task-shell 2013-06-17 12:11:25 -07:00
Kevin Sawicki 3f5bee7e4c Move task-bootstrap to src/ 2013-06-17 12:11:25 -07:00
Kevin Sawicki bff57e53f0 Throw error when starting terminated process 2013-06-17 12:11:25 -07:00
Kevin Sawicki 8280b3a3ff Update repository status to use new task style 2013-06-17 12:11:25 -07:00
Kevin Sawicki 7dd52995d0 Update tag reader view to use new task style 2013-06-17 12:11:25 -07:00
Kevin Sawicki e8bf433c68 Remove unused class 2013-06-17 12:11:25 -07:00
Kevin Sawicki 12b5c43d85 Remove unused task 2013-06-17 12:11:25 -07:00
Kevin Sawicki b42cc6f683 Update spell check view to use new task 2013-06-17 12:11:25 -07:00
Kevin Sawicki a1d6ae010e 💄 2013-06-17 12:11:25 -07:00
Kevin Sawicki cd1c88a1b5 Correct typo in git docs 2013-06-16 22:08:18 -07:00
Kevin Sawicki 5d245f403f Upgrade to grunt-cson 0.3 2013-06-16 21:37:48 -07:00
Kevin Sawicki 91f18df917 Use grunt-cson for compilation 2013-06-15 22:10:06 -07:00
Kevin Sawicki f3b3c291b9 Un-f wrap guide spec 2013-06-15 21:25:46 -07:00
Kevin Sawicki 6bcd6240ce Only override resource path if running specs from menu
Previously if the specs were being run via the --test command line
flag then the resource path specified would be overridden and
~/github/atom would be used instead which was causing CI to fail
since it specified a custom resource path at a different location.
2013-06-15 20:07:16 -07:00
Kevin Sawicki 5df5a679ac Un-f fuzzy finder spec 2013-06-14 11:48:02 -07:00
Kevin Sawicki 6dc2db25da Add Zoom to Window menu 2013-06-14 11:47:12 -07:00
Kevin Sawicki 7d33e1302a Doc what unicode characters render to 2013-06-14 11:47:12 -07:00
Corey Johnson & Kevin Sawicki 2edb5b5496 Setup node path in Atom Window.
This lets windows run code from different resource paths.
2013-06-14 10:01:23 -07:00
probablycorey 3ba7d68d4a Add global.homeDir
Ick, this should be handled by an npm or hopefully a patch to Node.
2013-06-14 09:56:01 -07:00
probablycorey da58bd5609 Always use ~/github/atom as the resource path when running specs 2013-06-14 09:27:54 -07:00
Kevin Sawicki e8c0f46afb Relativize exact path matches to the empty string 2013-06-14 09:20:28 -07:00
Kevin Sawicki 772a99012d Focus window when atom.focus() is called
Previously listeners bound to $(window).focus() would not get
events when Atom initially started or on reloads.
2013-06-14 08:39:32 -07:00
Kevin Sawicki f408406ef0 Support symlinks in .relativize() and .contains() 2013-06-14 08:29:21 -07:00
Kevin Sawicki 1fa319a8f3 Hide status and branch info for non-project files 2013-06-13 23:11:07 -07:00
Kevin Sawicki a0aefe21c8 Bind mousewheel event to list instead of parent 2013-06-13 22:11:46 -07:00
Kevin Sawicki d6be29dbdc Prevent propagation of mousewheel events from list
Without this, the autocomplete list is not scrollable using
the mouse wheel since it is consumed by the parent editor.
2013-06-13 18:50:36 -07:00
Kevin Sawicki 52ffa2d8c0 Use fat arrow for write callback 2013-06-13 18:38:23 -07:00
Kevin Sawicki 5ca4e8006e Format command and run count integers 2013-06-13 18:09:37 -07:00
Kevin Sawicki 75cfddebcd Implement getEmptyMessage() in CorrectionsView 2013-06-13 11:47:00 -07:00
Kevin Sawicki 1bc4b4ef32 Use mini-icon helper for loading-message 2013-06-13 11:40:32 -07:00
Kevin Sawicki ff7c639b64 Don't use error class in select list
Use a subtler error message that displays in the same place as the
loading message but does not change the entire background of the
view.

Also, extending classes can now customize the message displayed
when there are no items and also no filtered items to allow for
different messages for these two cases.
2013-06-13 11:31:09 -07:00
Kevin Sawicki 77172800a8 Remove link to deleted method 2013-06-13 10:10:59 -07:00
Kevin Sawicki 6615e0f2db Use triple # internal comment 2013-06-13 10:03:54 -07:00
Kevin Sawicki 0f562330cf Remove unused functions and specs 2013-06-13 10:02:13 -07:00
Kevin Sawicki 42a8a1ff61 Use skinny arrow for onPath callback 2013-06-13 08:51:13 -07:00
Kevin Sawicki 29c0f0c115 Clean up function comments 2013-06-13 08:49:48 -07:00
Kevin Sawicki dc33168ecc 💄 2013-06-13 08:44:12 -07:00
Kevin Sawicki 1e26bb533a Remove unneeded relativePath parameter 2013-06-13 08:41:04 -07:00
Kevin Sawicki 021fbc533f Specify utf8 encoding to fs.readFileSync() 2013-06-13 08:34:26 -07:00
Kevin Sawicki bc6daaeac2 Make function comment accurate 2013-06-13 08:32:58 -07:00
Kevin Sawicki d60c255703 Rename nodePath to path 2013-06-13 08:31:04 -07:00
Kevin Sawicki 2d9ba937fb Only ignore tags file at root
This allows the tags file inside spec/fixtures to be modified.
2013-06-12 20:57:38 -07:00
Kevin Sawicki 9cdc6122b3 Add mdown to readme extensions array 2013-06-12 20:56:52 -07:00
Kevin Sawicki 3374074940 Use path instead of Path 2013-06-12 20:55:27 -07:00
Kevin Sawicki 4f65cb099a Remove unused fsUtils.split() 2013-06-12 20:44:15 -07:00
Kevin Sawicki 0e52a3bcee Remove fsUtils.makeDirectory()
fsUtils.makeTree() was sufficient for all current uses.
2013-06-12 20:39:40 -07:00
Kevin Sawicki ed3a4a33e2 Rename .write() to writeSync() 2013-06-12 20:38:26 -07:00
Kevin Sawicki 3e0658fe30 Use mkdirp from fsUtils.makeTree() 2013-06-12 20:31:38 -07:00
Kevin Sawicki f35724daa9 Revert incorrect rename to isDirectorySync() 2013-06-12 20:29:14 -07:00
Kevin Sawicki 58fd786fda Rename readPlist() to readPlistSync() 2013-06-12 18:32:36 -07:00
Kevin Sawicki bf41c77d80 Use fsUtils.readObject to load snippets file 2013-06-12 18:30:43 -07:00
Kevin Sawicki d8de321074 Rename readObject() to readObjectSync() 2013-06-12 18:28:25 -07:00
Kevin Sawicki d77705a039 Rename listTree() to listTreeSync() 2013-06-12 18:26:44 -07:00
Kevin Sawicki 27d9da15dc Rename list() to listSync() 2013-06-12 18:25:42 -07:00
Kevin Sawicki a192842dc0 Rename isExecutable() to isExecutableSync() 2013-06-12 18:22:43 -07:00
Kevin Sawicki 400aa93bf3 Rename isFile() to isFileSync() 2013-06-12 18:21:57 -07:00
Kevin Sawicki 86952ff85e Rename isDirectory() to isDirectorySync() 2013-06-12 18:16:31 -07:00
Kevin Sawicki bab9bd7550 Rename path variables to prevent collisions 2013-06-12 17:59:37 -07:00
Kevin Sawicki 87e60bd0eb Update element path key to filePath instead of path 2013-06-12 17:51:07 -07:00
Kevin Sawicki 711d20ea14 Rename path variables to prevent collisions 2013-06-12 17:35:12 -07:00
Kevin Sawicki a0a0036727 Add missing path require 2013-06-12 17:35:03 -07:00
Kevin Sawicki 15f6a33c4b Rename path variables to prevent collisions 2013-06-12 17:27:23 -07:00
Kevin Sawicki 10f92836e6 Rename path variables to prevent collisions 2013-06-12 17:19:16 -07:00
Kevin Sawicki 54558c863d Remove unused path 2013-06-12 17:10:19 -07:00
Kevin Sawicki e25aece700 Use filePath instead of path as variable name 2013-06-12 17:04:37 -07:00
Kevin Sawicki bfdad19911 Use repoPath as parameter name to loadStatuses() 2013-06-12 17:02:02 -07:00
Kevin Sawicki d112089152 Use filePath variable instead of path 2013-06-12 16:57:47 -07:00
Kevin Sawicki 6c91d8bea6 Add missing require for path 2013-06-12 16:51:53 -07:00
Kevin Sawicki 7edebc6dd2 Don't clobber path module by using path as a variable name 2013-06-12 16:50:15 -07:00
Kevin Sawicki 76649ba268 Add missing require for path 2013-06-12 16:50:00 -07:00
Kevin Sawicki 2ae95bdf2b Use scopedPropertiesPath instead of propertiesPath 2013-06-12 16:44:08 -07:00
Kevin Sawicki 1548ef10b0 Don't clobber module by reassigning to path 2013-06-12 16:41:23 -07:00
Kevin Sawicki 835cd70ded Use Path.dirname() internally 2013-06-12 16:33:36 -07:00
Kevin Sawicki 5a8444579c Use more description variable names instead of path 2013-06-12 16:32:12 -07:00
Kevin Sawicki dc4012ea7c Add missing path require 2013-06-12 16:25:41 -07:00
Kevin Sawicki 17007e6154 Add missing path prefix to method invocation 2013-06-12 16:23:48 -07:00
Kevin Sawicki 82013b1970 Use path.join() instead of fsUtils.join() 2013-06-12 16:20:40 -07:00
Kevin Sawicki 7cf4063d9e Use path.dirname() instead of fsUtils.directory() 2013-06-12 15:54:34 -07:00
Kevin Sawicki d1cf839e53 Use correct less stylesheet path variable name 2013-06-12 15:53:47 -07:00
Kevin Sawicki f47164a2e6 Use more descriptive variable name instead of path 2013-06-12 15:46:15 -07:00
Kevin Sawicki bdb641ec94 Use path.extname() instead of fsUtils.extension() 2013-06-12 15:43:58 -07:00
Kevin Sawicki 341a327ea0 Rename path variable to entryPath 2013-06-12 15:36:18 -07:00
Kevin Sawicki 3d53a6ecf8 Remove internal references to .base() 2013-06-12 15:32:25 -07:00
Kevin Sawicki eede4a386f Use path.basename() instead of fsUtils.base() 2013-06-12 15:26:09 -07:00
Kevin Sawicki 437137783c Use rimraf for removing files/folders 2013-06-12 15:09:54 -07:00
Kevin Sawicki b96597b089 💄 2013-06-12 14:44:06 -07:00
Kevin Sawicki eeb2782700 Use lookbehind for whitespace before bold/italic text 2013-06-12 14:43:14 -07:00
Kevin Sawicki 0f4ad0bbf5 Guard against a null initial path
This will be the case when the .atom fold is opened from the config window.

path.join() cannot be called with null values.
2013-06-12 14:31:49 -07:00
Kevin Sawicki 750e4a1cca Rename linux.css to linux.less 2013-06-12 13:28:39 -07:00
Kevin Sawicki e5b8aa57d7 Guard against null rootView
This will be the case for the config window.
2013-06-12 13:13:24 -07:00
Kevin Sawicki 0723514fea Combine colors into single rule 2013-06-12 13:10:23 -07:00
Kevin Sawicki c298e1b3ee Remove background-color on .text .source
This was causing a different background in script tags
in HTML that looked strange.
2013-06-12 13:07:32 -07:00
Kevin Sawicki 91e5d171b7 Lint dot-atom coffee files 2013-06-12 13:04:10 -07:00
Kevin Sawicki 28f47e8248 hideGitIgnoredFiles is under core key, not editor 2013-06-12 12:48:25 -07:00
Kevin Sawicki f870dc7b72 Allow autocomplete package to be deactivated 2013-06-12 11:41:41 -07:00
Kevin Sawicki 04c5e9fa42 Return subscription from RootView.eachEditor() 2013-06-12 11:38:05 -07:00
Kevin Sawicki 65b08e2914 Upgrade to lesslint 0.4 2013-06-12 11:02:34 -07:00
Kevin Sawicki ed19b9e032 Upgrade to lesslint 0.3 2013-06-12 10:27:40 -07:00
Kevin Sawicki e72b5a55a0 Remove invalid float on inline-block element 2013-06-12 10:18:23 -07:00
Kevin Sawicki 5281507483 Remove invalid include rule 2013-06-12 10:18:23 -07:00
Kevin Sawicki abf7303d6e Disable font-sizes rule 2013-06-12 10:18:23 -07:00
Kevin Sawicki 775f29564a Use LESS style comments 2013-06-12 10:18:23 -07:00
Kevin Sawicki 7e33a3e12f Remove duplicate properties 2013-06-12 10:18:23 -07:00
Kevin Sawicki 5538b2910d 💄 2013-06-12 10:18:23 -07:00
Kevin Sawicki c7c7988ae6 Drop units when using zero 2013-06-12 10:18:23 -07:00
Kevin Sawicki 454106a22b Disable several CSS Lint rules 2013-06-12 10:18:22 -07:00
Kevin Sawicki 43c1d7f8aa Add less lint task 2013-06-12 10:18:22 -07:00
probablycorey 1156018c0d Make gutter line number's position relative
This makes it easier to decorate line numbers.
2013-06-12 09:55:31 -07:00
Kevin Sawicki e00e87a845 Lint css files in static/ 2013-06-11 16:34:48 -07:00
Kevin Sawicki 2b29212d0f Sort flags alphabetically 2013-06-11 16:30:46 -07:00
Kevin Sawicki 7390d908bd Add -v flag to print the version 2013-06-11 16:23:47 -07:00
Kevin Sawicki a98308a7a4 Add -n option to always open a new window 2013-06-11 16:15:04 -07:00
Kevin Sawicki 3b263eb961 Tweak crashed dialog messaging 2013-06-11 16:07:57 -07:00
Kevin Sawicki c6d5c143cf Mention LESS/CSS indent fix 2013-06-11 15:54:56 -07:00
Kevin Sawicki 6d0f303cd5 Set initialPath on load settings 2013-06-11 15:48:22 -07:00
Kevin Sawicki 327f16fa03 Add semicolon 2013-06-11 15:44:25 -07:00
Corey Johnson & Kevin Sawicki a4ee1eb785 Rename pathToOpen load setting to initialPath
Use the initialPath as the window state serialization key.

Also use the parent directory as the intitial path when the
path to open is a file.
2013-06-11 15:38:31 -07:00
Corey Johnson & Kevin Sawicki fc52ee518e Wait for window:loaded before emitting window:open-path 2013-06-11 14:48:51 -07:00
Corey Johnson & Kevin Sawicki b3e0ea6d33 Add AtomWindow.openPath() 2013-06-11 14:39:52 -07:00
Corey Johnson & Kevin Sawicki dc53f387a6 Remove project serialization 2013-06-11 14:39:32 -07:00
Corey Johnson & Kevin Sawicki 11dfe7b649 Tweak unresponsive dialog text 2013-06-11 14:28:27 -07:00
Corey Johnson & Kevin Sawicki 1ce861c000 Don't save pathToOpen to window state 2013-06-11 14:17:20 -07:00
Corey Johnson & Kevin Sawicki 0c8f200d45 Always load bundle preferences
Previously the scoped properties would not load if there weren't
any grammars in the bundle or if listing the grammars directory
failed.

Closes #570
2013-06-11 13:52:40 -07:00
Kevin Sawicki c63536c682 Include source TextMate bundle 2013-06-11 13:02:00 -07:00
Corey Johnson & Kevin Sawicki 7516cebb40 Comment .less code correctly 2013-06-11 12:25:57 -07:00
Corey Johnson & Kevin Sawicki e82a7f57fe Move already opened path logic to Atom Window 2013-06-11 11:28:53 -07:00
Corey Johnson & Kevin Sawicki bcc16fbefe Remove hash params from url
Load settings are now stored on the browser window.
2013-06-11 11:17:16 -07:00
Cheng Zhao a57c5c7c93 Show prompt to close or reload window when renderer is crashed. 2013-06-11 14:49:04 +08:00
Cheng Zhao f7db59ea7c Close window immediately if renderer is crashed. Fixed #580. 2013-06-11 14:49:04 +08:00
Kevin Sawicki 4f348dcd19 Watch archive file and react to events
The view now refreshes on 'contents-changed' events and
closes on 'removed' events
2013-06-10 18:32:11 -07:00
Kevin Sawicki a3d896f456 Mention archive viewer 2013-06-10 14:22:30 -07:00
Kevin Sawicki 9ad65e6e46 Add top padding to directories 2013-06-10 14:11:19 -07:00
Kevin Sawicki 790c9714c7 Forward focus to selected file on focus events 2013-06-10 14:11:19 -07:00
Kevin Sawicki 68074be9d6 Add initial archive viewer spec 2013-06-10 14:11:19 -07:00
Kevin Sawicki 4c2a40808b 💄 2013-06-10 14:11:19 -07:00
Kevin Sawicki 8dbac6a34f Add light theme support for archive viewer 2013-06-10 14:11:18 -07:00
Kevin Sawicki 6bd8213093 Remove duplicate property 2013-06-10 14:11:18 -07:00
Kevin Sawicki 0b0af2296f Add summary header with size and file/folder counts 2013-06-10 14:11:18 -07:00
Kevin Sawicki 2c7d49f7a8 Ignore callbacks if path has changed 2013-06-10 14:11:18 -07:00
Kevin Sawicki dc89b0569a Add margin to loading message 2013-06-10 14:11:18 -07:00
Kevin Sawicki ff5ea00b00 Use toggle class for removing selected class 2013-06-10 14:11:18 -07:00
Kevin Sawicki 1894901930 Add up/down/confirm event handling 2013-06-10 14:11:18 -07:00
Kevin Sawicki 135a285596 Remove unused require 2013-06-10 14:11:18 -07:00
Kevin Sawicki 32e229b162 Log error stack 2013-06-10 14:11:18 -07:00
Kevin Sawicki 3102ac403b Tweak file and folder styles 2013-06-10 14:11:18 -07:00
Kevin Sawicki 0f16b54d8e Only update view when path changes 2013-06-10 14:11:18 -07:00
Kevin Sawicki 8fc1e34a74 Remove debug logging 2013-06-10 14:11:18 -07:00
Kevin Sawicki af2b775a4a Upgrade to ls-archive 0.9 2013-06-10 14:11:18 -07:00
Kevin Sawicki e9bf2fe161 Add initial archive viewer 2013-06-10 14:11:17 -07:00
Kevin Sawicki 3709a0b7e1 Release instead of build 2013-06-10 09:01:00 -07:00
Kevin Sawicki c651cdc356 Update image to match current icon 2013-06-10 09:00:26 -07:00
Kevin Sawicki db9d92041f Add speakeasy link 2013-06-10 09:00:08 -07:00
Kevin Sawicki b474a818aa Always return false from link click callback 2013-06-10 08:56:19 -07:00
Kevin Sawicki cea521a737 Save window parameters on reload 2013-06-08 17:22:21 -07:00
Kevin Sawicki b89eb07c6e URI encode parameter values
Previously the path to open would not open properly if it contained
a '&' character since the character was not encoded and would cause
the parameter parsing to stop at the first '&'.
2013-06-07 11:11:31 -07:00
Kevin Sawicki 7f6e5e2e52 Un-f image view spec 2013-06-07 11:02:41 -07:00
Kevin Sawicki 4fdaf6dead Always open untitled editor when no path to open
Refs #577
2013-06-07 10:54:51 -07:00
Kevin Sawicki dea0e08d93 Use hash instead of query string for parameters
This allows the pathToOpen to be changed when the project
path changes.

Previously if the untitled window file was saved, the project
path would be forever associated with the undefined window.

Now when the project path changes, the pathToOpen changes so
that the state is persisted to the project area and the untitled
window never has a project.
2013-06-07 10:50:06 -07:00
Kevin Sawicki fca1c13d03 Move image-view to a package
This removes the ugliness of having project.coffee require
image-edit-session at the end since the image-edit-session can
now register itself in an @activate callback and as a deferred
deserializer in the package.cson file.
2013-06-07 10:15:32 -07:00
Kevin Sawicki 3029137cb8 Correct typo in return comment 2013-06-07 09:31:04 -07:00
Kevin Sawicki c7c9a2496a Sort autocomplete words case insensitively 2013-06-07 09:18:16 -07:00
Kevin Sawicki f40a7105bc Call .openPath() when 'new-window' is triggered
Closes #577
2013-06-07 08:51:10 -07:00
Kevin Sawicki 00313c747a Mention TODO 2013-06-07 08:29:05 -07:00
Kevin Sawicki 2ffd187094 Mention full screen persistence 2013-06-07 08:27:53 -07:00
Cheng Zhao 6f519b0456 Show unresponsive message dialog as sheet. 2013-06-07 16:26:58 +08:00
Cheng Zhao cb2bf796fa Show prompt to force closing window when window is frozen.
Fixed atom/atom-shell#17.
2013-06-07 16:26:18 +08:00
Cheng Zhao bbde993e81 Fullscreen => FullScreen. 2013-06-07 14:33:55 +08:00
Kevin Sawicki 9088ecca16 Default first argument to empty hash 2013-06-06 17:31:54 -07:00
Kevin Sawicki 9a99af2281 Store/restore full screen state on root view
Closes #245
2013-06-06 17:21:33 -07:00
Kevin Sawicki 70bb40ce2f Show all words when prefix and suffix are empty
This seems more applicable than just showing the "No matches found"
error when the current position has neither a prefix or a suffix.
2013-06-06 16:42:37 -07:00
Kevin Sawicki 9fea9ea756 Catch and log errors thrown by process.kill()
These can occur if killing the process fails because it no longer exists.
2013-06-06 16:23:53 -07:00
Kevin Sawicki dc46960e6c Update scroll position after layer dimensions
Calling updateLayerDimensions() may change the scroll position
so restore the edit session's stored scroll positions after
updateLayerDimensions() is called but store the scroll left and
scroll top positions beforehand.
2013-06-06 16:15:51 -07:00
Kevin Sawicki 7a04b22375 💄 2013-06-06 16:00:44 -07:00
Kevin Sawicki d5526515f1 Only save scroll position when attached 2013-06-06 15:58:44 -07:00
Kevin Sawicki 8aeedb8971 Upgrade apm 2013-06-06 13:23:19 -07:00
Kevin Sawicki 9fe7bfb898 Remove unneeded activatePackage calls
These are already done in the root beforeEach
2013-06-06 12:45:41 -07:00
Kevin Sawicki 7313407d04 Resolve ${group:/command} style pattern names
These are used by the todo package to include the lower cased
version of the matched capture index in the pattern scope name.
2013-06-06 12:39:51 -07:00
Kevin Sawicki 42d70f888e Bundle todo package 2013-06-06 12:37:39 -07:00
Kevin Sawicki 881efc8e8f Add mdown for GFM fileTypes 2013-06-06 12:12:26 -07:00
Kevin Sawicki 71c86381df Support includes inside of injection grammars 2013-06-06 11:30:01 -07:00
Kevin Sawicki efdb750334 Mention make package 2013-06-06 11:02:57 -07:00
Kevin Sawicki 5afd8d8bd3 Bundle make package 2013-06-06 10:40:45 -07:00
Kevin Sawicki 6f21ea930a Menion opening fuzzy finder to specific line 2013-06-06 10:23:58 -07:00
Kevin Sawicki af14f57962 Support opening fuzzy finder to a specific line
Adding a line number after a colon such as ':8' to the end of the fuzzy
filter input field will navigate to line 8 of the opened editor.
2013-06-06 10:17:15 -07:00
Kevin Sawicki e9b8f71997 Mark indentation issues as errors
All existing issues have been resolved.
2013-06-06 08:33:25 -07:00
Kevin Sawicki 2f8c45aec4 Break out wrap test to own function 2013-06-06 08:32:47 -07:00
Kevin Sawicki eaf5b8bc8e Remove duplicate getLastScreenRow() method 2013-06-06 08:21:00 -07:00
Kevin Sawicki efb2cfab9f Remove duplicate getBufferRowCount() method 2013-06-06 08:19:21 -07:00
Kevin Sawicki 320328777e Remove duplicate keys in classes 2013-06-06 08:18:08 -07:00
Kevin Sawicki 21f965f284 Mark empty param lists as errors 2013-06-06 08:16:23 -07:00
Kevin Sawicki 5c36064afc Remove empty param lists 2013-06-06 08:16:11 -07:00
Cheng Zhao 01b583957e Add back edit menu.
On OS X, applications rely on the menu to trigger native events for
various commands. Editor view doesn't need it before it listens to the
keyboard shortcuts itself. Since spec window and devtools view don't
listen to keyboard shortcuts, we should rely on the menu to make edit
commands work.

Fixed atom/atom-shell#18.
2013-06-06 10:24:30 +08:00
Kevin Sawicki 7ccf2390a7 Constantly sync scroll left/top value from editor to edit session
Previously these values were only saved on the edit session when
is became inactive causing the scroll position to not always
persist between refreshes.

Closes #474
2013-06-05 19:14:30 -07:00
Cheng Zhao feab9862ac Update apm for node v0.10.9. 2013-06-06 09:57:03 +08:00
Kevin Sawicki f85f95e792 Move universal comment toggle specs to edit-session-spec 2013-06-05 17:58:39 -07:00
Kevin Sawicki d658e7c490 Only uncomment when all lines start with a comment
Previously only the first row was checked for a comment. Now all
rows are checked and the rows are only uncommented when they all
start with a comment.

This only impacts languages that do not specify a command end pattern.

Closes #554
2013-06-05 17:38:50 -07:00
Kevin Sawicki 520e510aab Update expection extension to .less 2013-06-05 17:02:44 -07:00
Kevin Sawicki 769834e1a6 Add more common binary exetnsions 2013-06-05 17:00:30 -07:00
Kevin Sawicki 42d06d6281 Update path text when active item title changes
Closes #573
2013-06-05 16:53:52 -07:00
Kevin Sawicki 0d6028976b Convert light and dark syntaxes to less
Closes #533
2013-06-05 16:25:12 -07:00
Kevin Sawicki 69f7af7c63 Ignore errors unlinking non-existent path 2013-06-05 11:54:27 -07:00
Kevin Sawicki abbada47da Put node directory in PATH when spawning
This ensures the node used by the spawned process is the one bundled
with Atom.

This should prevent any "env: node: No such file or directory"
errors when spawning a node bin script such as nak.

Refs #514
2013-06-05 10:58:52 -07:00
Kevin Sawicki e7679d8320 Remove submoduling 3rd-party packages 2013-06-05 10:51:55 -07:00
Kevin Sawicki d3807fd908 Remove deleted folder 2013-06-05 10:51:11 -07:00
Kevin Sawicki 5adf74794b Log errors from nak to console 2013-06-04 18:47:05 -07:00
Kevin Sawicki 73c2e94a32 Pad image from container 2013-06-04 18:43:44 -07:00
Kevin Sawicki 66000a6769 Upgrade to oniguruma 0.16
This release returns objects for capture indices instead of
the index, start, and end in sequence in a single array.
2013-06-04 17:41:02 -07:00
Kevin Sawicki 09b15bab9b Mention tree view and utf8 fixes 2013-06-04 13:55:07 -07:00
Kevin Sawicki 0ed88c474a 💄 2013-06-04 13:43:19 -07:00
Kevin Sawicki c40a312e73 Add spec with surrogate pair token with trailing text 2013-06-04 13:43:19 -07:00
Kevin Sawicki 3d1ca5abb1 Add specs for partial surrogate pairs 2013-06-04 13:43:19 -07:00
Kevin Sawicki f63866b2a2 Rename hasSurrogatePairs() to hasSurrogatePair() 2013-06-04 13:43:19 -07:00
Kevin Sawicki 7dec3866cf Update spec description to be accurate 2013-06-04 13:43:19 -07:00
Kevin Sawicki 06a5234d10 Doc text-utils.coffee 2013-06-04 13:43:19 -07:00
Kevin Sawicki a109a3317e Add support for surrogate pairs
Surrogate pairs, meaning characters outside the Basic
Multilingual Plane, are now broken out as atomic tokens.

Closes #567
2013-06-04 13:43:19 -07:00
Kevin Sawicki 9f4fc49790 💄 2013-06-04 13:38:14 -07:00
Kevin Sawicki 6c8063b26a Use active pane item for path
Previously the active view was used to obtain the path.

The ImageView does not provide a path and was causing an
exception to be thrown when getPath was called on it
unguarded.

Closes #568
2013-06-04 13:36:45 -07:00
Kevin Sawicki 36ddbe99a1 Have inner image-container consume entire area 2013-06-04 13:23:26 -07:00
Cheng Zhao 47e5c0df16 Merge branch 'master' into atom-shell
Conflicts:
	.nakignore
2013-06-04 09:52:18 +08:00
Kevin Sawicki 86635c4543 Ignore docs/api when searching 2013-06-03 17:40:45 -07:00
Kevin Sawicki 855549d677 Remove unused method 2013-06-03 13:39:50 -07:00
Kevin Sawicki d58ec4d3f6 Show window from bootstrap script 2013-06-03 13:23:16 -07:00
Kevin Sawicki 879cc31261 Replace DevTools with Developer Tools in menu text 2013-06-03 13:19:05 -07:00
Kevin Sawicki 56fea45505 Replace Atom Shell with Atom in menu text 2013-06-03 13:17:40 -07:00
Kevin Sawicki 5e7656489d Add toggle full screen to View menu 2013-06-03 13:16:51 -07:00
Kevin Sawicki a816423037 Remove non-functional menus
These can be re-added as they are wired to triggering
commands into Atom.
2013-06-03 13:10:40 -07:00
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 7f0947ef9b Don't cancel on delay when no tags exist
Instead just show the error until explicitly cancelled so the behavior
when no tags is the same as the behavior when no tags match the
current filter.
2013-06-03 11:46:30 -07:00
Kevin Sawicki f90530f593 💄 2013-06-03 10:50:13 -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
Kevin Sawicki 98310e8d7a 💄 2013-06-03 10:32:35 -07:00
Kevin Sawicki 8c9aad9e34 Merge branch 'master' into atom-shell 2013-06-03 09:38:47 -07:00
Kevin Sawicki 2b6a4365ac Upgrade apm 2013-06-03 09:34:53 -07:00
Kevin Sawicki 94c1ed4c28 Add node_modules dir to config.bundledPackageDirPaths array 2013-06-03 09:32:20 -07:00
Kevin Sawicki c1a1633593 Break on first path match 2013-06-03 09:30:33 -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 d224f3c5bd Don't check for updates if it's a custom build.
Currently we check whether the version has the '.', the custom builds
would have commit hash as version, which doesn't contain '.'.
2013-06-03 22:33:04 +08:00
Cheng Zhao be309aba69 Setup crash reporter on 'will-finish-launching' event. 2013-06-03 22:26:47 +08:00
Cheng Zhao 2b3d3d9cf5 Make auto updater work. 2013-06-03 22:21:45 +08:00
Cheng Zhao 681969439d Merge branch 'master' into atom-shell 2013-06-03 19:53:10 +08:00
Cheng Zhao f9be1f3493 Convert Info.plist to XML format. 2013-06-03 18:42:23 +08:00
Cheng Zhao a2efd40798 URL => Url. 2013-06-02 15:16:21 +08:00
Cheng Zhao 94e7011413 Update node version to v0.10.9.
Should make this default settings after atom-shell branch is merged.
2013-06-02 10:25:35 +08:00
Cheng Zhao 1aca554ae3 Make atom.crashMainProcess and atom.crashRenderProcess work. 2013-06-02 00:34:12 +08:00
Cheng Zhao eefc18202f Make crash reporter work. 2013-06-01 20:15:19 +08:00
Cheng Zhao 70e414b279 Check the existence of socketPath.
See the comments for the reason.
2013-06-01 14:09:53 +08:00
Cheng Zhao e629088ec3 Make sure Atom terminates after message is sent. 2013-06-01 13:11:07 +08:00
Kevin Sawicki 9431a8c3ac Check that scope name is present before comparing
Previously if the last 2 rules in the stack had no scope
name and the position wasn't advancing then the last rule
would be popped.

This caused Java single line comments to not parse properly
since the push rules for comment blocks have no scope name.
2013-05-31 09:28:41 -07:00
Kevin Sawicki 9e7a9e6210 Remove incorrect @
anchorPosition is a parameter
2013-05-31 09:25:54 -07:00
Cheng Zhao c36fc467e6 Since files passed in command line won't trigger 'open-file' any more, there is no need to clean duplicate paths.
It also seems that there is a typo...
2013-05-31 10:30:37 +08:00
Kevin Sawicki 0c7701dc57 Copy files consistently with perms 2013-05-30 18:00:14 -07:00
Kevin Sawicki 2dbbce31d6 Set resource path as single argument 2013-05-30 16:45:40 -07:00
Kevin Sawicki d18ccc168f Guard against null options 2013-05-30 16:45:40 -07:00
Kevin Sawicki cc5ae002a2 Ignore pkill failures 2013-05-30 16:45:40 -07:00
Kevin Sawicki 06886f98d4 Log failure code 2013-05-30 16:45:40 -07:00
Kevin Sawicki 5e072e94e8 Add ci task 2013-05-30 16:45:39 -07:00
Kevin Sawicki 9e4ef708e4 Add test task 2013-05-30 16:45:15 -07:00
Kevin Sawicki da0af11bbb Only delete file if it exists 2013-05-30 16:45:15 -07:00
Kevin Sawicki 04b8ab1b87 Add bootstrap task 2013-05-30 16:45:15 -07:00
Kevin Sawicki 7988e3ead9 Run postbuild scripts after compile 2013-05-30 16:45:15 -07:00
Kevin Sawicki b51aea98b4 Copy symlinks properly 2013-05-30 16:45:15 -07:00
Kevin Sawicki 91cb03a43c Filter paths while recursing 2013-05-30 16:45:14 -07:00
Kevin Sawicki 9977f4efab Use grunt API for is directory 2013-05-30 16:45:14 -07:00
Kevin Sawicki 7928f075b5 Use grunt API for mkdir and rm 2013-05-30 16:45:14 -07:00
Kevin Sawicki 79bc23f83a Copy source mode to destination 2013-05-30 16:45:14 -07:00
Kevin Sawicki b201dbb698 Use grunt API for copying folders 2013-05-30 16:45:14 -07:00
Kevin Sawicki 11004c20e6 Use grunt API for copying files 2013-05-30 16:45:14 -07:00
Kevin Sawicki 3a54d0b8a9 💄 2013-05-30 16:45:14 -07:00
Kevin Sawicki 24d5fdd6eb Create path to install directory 2013-05-30 16:45:14 -07:00
Kevin Sawicki 75eb321272 Support copying files and folder from cp function 2013-05-30 16:45:14 -07:00
Kevin Sawicki ef8f630ad5 Copy non-compiled files to build directory 2013-05-30 16:45:14 -07:00
Kevin Sawicki 5c51060dca Add atom-shell segment to BUILD_DIR 2013-05-30 16:45:14 -07:00
Kevin Sawicki ec13dea5e6 Add missing atom-shell segment to APP_DIR 2013-05-30 16:45:14 -07:00
Kevin Sawicki affd4a481f Add install task 2013-05-30 16:45:13 -07:00
Kevin Sawicki eafad9a5c4 Show skull menu when in dev mode 2013-05-30 16:31:54 -07:00
Corey Johnson & Kevin Sawicki 454656a91c Use open-file event for paths to open 2013-05-30 15:15:08 -07:00
Corey Johnson & Kevin Sawicki a5c3ca9e8e Add open menu under File 2013-05-30 14:04:15 -07:00
Corey Johnson & Kevin Sawicki 4db152b2d7 Killing comment that made kevin angry 2013-05-30 12:07:48 -07:00
Corey Johnson & Kevin Sawicki 43a2096852 Don't reuse windows when --wait flag is set 2013-05-30 12:02:56 -07:00
Corey Johnson & Kevin Sawicki f76ab1ebe6 Add open class method to AtomApplication 2013-05-30 11:57:49 -07:00
Corey Johnson & Kevin Sawicki 04392c562e Create AtomApplication after app is finished launching 2013-05-30 11:38:08 -07:00
Corey Johnson & Kevin Sawicki a4470f9b6d Ignore windows without paths 2013-05-30 11:05:16 -07:00
Cheng Zhao db85792c59 Center the window by default, instead of position of (0, 0). 2013-05-30 22:16:15 +08:00
Cheng Zhao 92f071de93 Add script to clean up "open with" menu.
By compiling and running Atom again and again, the "open with" menu
would be polluted with various Atoms... This script cleans them.
2013-05-30 22:11:24 +08:00
Cheng Zhao ee046f1c25 Check whether the socket file exists before connecting.
By removing the socket file when the browser process of Atom quits and
checking it's existence before trying to connect it, we can greatly
reduce the startup time of the first instance of Atom.
2013-05-30 22:02:35 +08:00
Cheng Zhao 2135de059f Also listen to 'open-file' event in constructor.
The 'open-file' may happen before application is launched.
2013-05-30 21:37:14 +08:00
Cheng Zhao 3cad4ae118 Adopt to filename changes of atom-shell. 2013-05-30 21:36:49 +08:00
Cheng Zhao 69b8b7989a Listen to 'finish-launching' event in constructor.
Otherwise @handleEvents would never be called...
2013-05-30 21:30:46 +08:00
Cheng Zhao 3c02b28c11 Don't open any file until the application has finished launching.
When user double clicks a file in Finder, the Atom would start with no
pathToOpen, and then the 'open-file' event would be emitted for the
opened file. After 'open-file' event has been emitted for all files, the
'finish-launching' event would be finally emitted.

If no file has been opened and current process is the first instance of
Atom, Atom would open the empty editor.
2013-05-30 19:55:10 +08:00
Cheng Zhao 9e7510deea atomWindow.pathToOpen could be null. 2013-05-30 18:21:58 +08:00
Cheng Zhao e259df1d0a Add various file types in Info.plist. 2013-05-30 17:04:32 +08:00
Cheng Zhao 941a3d8bf8 Open file when received 'open-file' event.
This event is emitted when the OS X opens files with Atom.
2013-05-30 16:13:25 +08:00
Kevin Sawicki 970227e082 Add initial build task 2013-05-29 17:35:00 -07:00
Kevin Sawicki c42b018915 Simplify lint task 2013-05-29 16:45:12 -07:00
Kevin Sawicki c7553e032e Correct indentation 2013-05-29 16:45:00 -07:00
Kevin Sawicki 3e10fac5d0 Add clean task 2013-05-29 16:39:37 -07:00
Corey Johnson & Kevin Sawicki b15f0b0805 Guard against null pathsToOpen 2013-05-29 15:49:50 -07:00
Corey Johnson & Kevin Sawicki fa3c636494 Doc test flag 2013-05-29 14:57:33 -07:00
Corey Johnson & Kevin Sawicki b91487c60f Pass pid to kill to AtomApplication ctor 2013-05-29 14:52:45 -07:00
Corey Johnson & Kevin Sawicki 8ad695e89f Make atomApplication a global 2013-05-29 14:49:43 -07:00
Corey Johnson & Kevin Sawicki 0f5c68971c 💄 2013-05-29 14:43:57 -07:00
Corey Johnson & Kevin Sawicki 3373549e56 Resolve paths to open in main.coffee 2013-05-29 14:39:20 -07:00
Corey Johnson & Kevin Sawicki 608fcbd0a1 Use relative requires 2013-05-29 14:38:48 -07:00
Corey Johnson & Kevin Sawicki 1470ae73e7 Make --wait flag work again 2013-05-29 14:09:44 -07:00
Corey Johnson & Kevin Sawicki b0f51eaca6 Stringify Browser logging 2013-05-29 14:05:58 -07:00
Corey Johnson & Kevin Sawicki 715210944e Forward console.log to NSLog in browser process 2013-05-29 14:05:58 -07:00
Kevin Sawicki a4f35a8452 Remove OnigRegExp spec now included in package 2013-05-29 13:46:00 -07:00
Kevin Sawicki 5a691a1b1e Merge branch 'master' into atom-shell 2013-05-29 13:23:23 -07:00
Kevin Sawicki 73a755f29b Move grunt packages to dev dependencies 2013-05-29 13:16:52 -07:00
Kevin Sawicki fe7f36ad7f Add initial csslint task 2013-05-29 12:13:47 -07:00
Kevin Sawicki 36e41ecae6 Remove invalid class name 2013-05-29 12:10:56 -07:00
Kevin Sawicki 367e532578 Remove empty rule 2013-05-29 12:04:16 -07:00
Kevin Sawicki ce71cf7703 Use correct indentation 2013-05-29 11:55:06 -07:00
Kevin Sawicki e19c0e4f87 Remove semicolons 2013-05-29 11:52:14 -07:00
Kevin Sawicki 60881e2ecd Don't lint fixtures 2013-05-29 11:50:53 -07:00
Kevin Sawicki f8fb803e52 Update snippet for newly upgraded javascript bundle 2013-05-29 11:46:05 -07:00
Kevin Sawicki 19411d3d3d Update package id for fixture with broken snippets 2013-05-29 11:45:35 -07:00
Corey Johnson & Kevin Sawicki c1ebf8ae1a Allow Syntaxes and Preferences directories to be lowercase 2013-05-29 11:02:57 -07:00
Corey Johnson & Kevin Sawicki f8f059d3fe Use correct textmate package names 2013-05-29 11:01:59 -07:00
Corey Johnson & Kevin Sawicki 17a83933d4 Use two -f flags to clean all git dirs 2013-05-29 10:01:33 -07:00
Cheng Zhao 326c1332bf shell.moveToTrash => shell.moveItemToTrash 2013-05-29 20:04:00 +08:00
Cheng Zhao c6d4942295 Generate Info.plist for App and Helper. 2013-05-29 19:33:48 +08:00
Cheng Zhao 9a08ea10cc Copy icon files and speakeasy.pem to bundle. 2013-05-29 18:57:02 +08:00
Cheng Zhao aace41032e Rake clean should also clean unused files of master branch.
So when people switch from master branch to atom-shell, they wouldn't
have to clean those files themselves.
2013-05-29 12:21:26 +08:00
Cheng Zhao b1e8a45fbe Remove some dead code. 2013-05-29 12:20:56 +08:00
Cheng Zhao 0cc86b024d Unspy atom.setWindowState after each spec.
Spec window needs to call it to save window dimenses.
2013-05-29 12:20:55 +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 30b67af51a doc dev flag 2013-05-28 18:15:25 -07:00
Kevin Sawicki be595a62b7 Add version to usage message 2013-05-28 17:56:07 -07:00
Kevin Sawicki f64724eda0 doc wait flag 2013-05-28 17:54:54 -07:00
Kevin Sawicki fe532b9dd5 Add initial help message 2013-05-28 17:52:19 -07:00
Kevin Sawicki 40dd8275d2 Add initial Gruntfile 2013-05-28 17:30:09 -07:00
Corey Johnson & Kevin Sawicki 40b654048b Recompile atom-application and atom-window 2013-05-28 17:29:00 -07:00
Corey Johnson & Kevin Sawicki 53f98951ea Parse out wait and pid arguments 2013-05-28 16:31:23 -07:00
Corey Johnson & Kevin Sawicki 88a3a82a21 Resolve paths to open in constructor 2013-05-28 15:10:26 -07:00
Corey Johnson & Kevin Sawicki bb5e18d981 Exit with 0 when process exists 2013-05-28 14:53:17 -07:00
Corey Johnson & Kevin Sawicki 7bc905d352 Reuse existing windows when opening paths from command line 2013-05-28 14:45:54 -07:00
Kevin Sawicki ba60324426 Correct indentation 2013-05-28 13:29:45 -07:00
Kevin Sawicki a731e4a9b5 Remove semicolons 2013-05-28 13:26:34 -07:00
Kevin Sawicki ed4d12bfcb Remove non-existent directory 2013-05-28 13:07:29 -07:00
Kevin Sawicki 0c44769740 Use relative main path 2013-05-28 13:05:15 -07:00
Kevin Sawicki 8c774a204d Remove submodules task
This is handled in script/bootstrap
2013-05-28 12:57:46 -07:00
Kevin Sawicki 9919387904 Use shorter symlink paths 2013-05-28 12:54:08 -07:00
Kevin Sawicki 13d57f56f6 Focus existing window for path 2013-05-28 12:26:54 -07:00
Kevin Sawicki 56731927ee 💄 2013-05-28 12:03:47 -07:00
Kevin Sawicki b21db90456 💄 2013-05-28 12:02:11 -07:00
Kevin Sawicki 55e0f91bcc Resolve paths before writing to socket 2013-05-28 11:59:26 -07:00
probablycorey 0eaec66ba6 Remove all native code 2013-05-28 11:46:19 -07:00
Kevin Sawicki 7c4f373d2a Add back coffee-script require but don't assign it 2013-05-28 11:28:03 -07:00
Kevin Sawicki 60e08de077 Remove unused require 2013-05-28 11:17:25 -07:00
Kevin Sawicki a081c47efa Join github and atom dirs 2013-05-28 11:05:46 -07:00
Kevin Sawicki b015b8bd2b 💄 2013-05-28 11:00:13 -07: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
Kevin Sawicki 617af68aeb Upgrade apm 2013-05-28 09:25:28 -07:00
Kevin Sawicki 6690598024 Use TextMate packages instead of vendoring bundles 2013-05-28 09:25:22 -07:00
Cheng Zhao 54de539b8b 'pathsToOpen' passed in 'open' message is an array. 2013-05-27 21:38:46 +08:00
Cheng Zhao 684778b666 Map 'meta-r' to 'window:reload' in renderer. 2013-05-25 15:37:22 +08:00
Cheng Zhao e89ee8ff3c 💄 2013-05-25 15:36:47 +08:00
Cheng Zhao 50ba01e22d If no 'executed-from' and 'pathsToOpen' is provided, open empty editor. 2013-05-25 14:56:17 +08:00
Cheng Zhao 462bd77ad5 Make atom.open work with parameters. 2013-05-25 14:38:04 +08:00
Cheng Zhao 0cdbfed7ab Push new window to atomApplication.windows in AtomWindow. 2013-05-25 12:04:53 +08:00
Cheng Zhao ddfae74ba4 Only allow one config window. 2013-05-25 11:58:18 +08:00
Cheng Zhao 45f96ab67f Fix atom.getVersion. 2013-05-25 11:50:23 +08:00
probablycorey 5170478f19 Rely on the atom cli created inside Atom 2013-05-24 14:54:32 -07:00
probablycorey 6b08d18f4b Move AtomWindow to it's own file 2013-05-24 14:46:25 -07:00
probablycorey 7aa6c1c08e Change how pathsToOpen gets passed around 2013-05-24 14:45:48 -07:00
probablycorey 623a58fb47 Use the local pathsToOpen 2013-05-24 14:43:58 -07:00
probablycorey b6c543734a Moved AtomApplication out of main.coffee 2013-05-24 11:53:49 -07:00
probablycorey 6ae858d35c 🙈 2013-05-24 11:53:49 -07:00
Cheng Zhao 47410c54e5 Remove 'modal dialogs' spec.
The main purpose of this spec is to test whether the simulation of modal
dialogs works, since the dialogs of atom-shell are real blocking modal
dialogs, there is no need to check whether the dialogs are presented as
modal dialogs correctly any more.
2013-05-25 00:20:54 +08:00
Cheng Zhao e430002951 atom.getVersion returns plain string, not string object. 2013-05-25 00:19:50 +08:00
Cheng Zhao 0fa5ca3782 Generate version after all files are copied.
And also note that <(PRODUCT_DIR) cannot work in postbuilds.
2013-05-24 23:58:01 +08:00
Cheng Zhao 6bbea1bbf2 Clean atom-shell caches in 'rake clean'. 2013-05-24 23:35:31 +08:00
Cheng Zhao a00fe91fca Show Atom's version. 2013-05-24 23:24:46 +08:00
Cheng Zhao 22d77af409 Also restore dimensions for spec window. 2013-05-24 22:09:44 +08:00
Cheng Zhao e2a18e3487 Hide window when window is going to close, not when unloading.
Otherwise reloading window would also hide and then show window, which
makes things weird.
2013-05-24 21:58:14 +08:00
Cheng Zhao 7bb6a7c1e8 Restore window dimensions after atom.windowMode is set.
It's required to set atom.windowMode before getting window state.
2013-05-24 21:52:03 +08:00
Cheng Zhao 2937404227 Make cibuild work. 2013-05-24 21:29:35 +08:00
Cheng Zhao a3b7df7b25 Fix window spec.
The windowStatePath now requires atom.windowMode, without setting it the
deserializeEditorWindow would create the wrong window.project.
2013-05-24 21:10:40 +08:00
Cheng Zhao 6edcb553e8 If no pathsToOpen is specified and executedFrom is provided, then open executedFrom.
This is the expected behavior of 'atom' cli command.
2013-05-24 20:41:52 +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 d1917fb986 Calling AtomApplication.open() without parameters should work. 2013-05-24 18:40:33 +08:00
Cheng Zhao e1442efef3 Make sure web view in spec window never loses focus. 2013-05-24 18:21:48 +08:00
Cheng Zhao 20b53313af dimensions could be undefined. 2013-05-24 16:34:26 +08:00
probablycorey 15baa08ca2 Only allow one atom process to run at a time
If another atom process is opened, it will send its pathsToOpen to the
existing atom process via a socket
2013-05-23 16:34:49 -07:00
Kevin Sawicki 7daeb6c633 Allow json grammars in TextMate bundles 2013-05-23 12:11:17 -07:00
Kevin Sawicki a267b67337 Remove unused require 2013-05-23 11:58:34 -07:00
probablycorey 70ac47b8a8 🙈 2013-05-23 11:18:31 -07:00
probablycorey 61d9f957ea Change indexOf string matching calls to use regex 2013-05-23 10:31:07 -07:00
probablycorey c0149100bb 💄 2013-05-23 10:26:31 -07:00
Cheng Zhao 1b896d8b30 Fix link package spec. 2013-05-23 15:04:47 +08:00
Cheng Zhao 20c0b76329 Add prefix for loading packages in spec/fixtures. 2013-05-23 14:50:56 +08:00
Cheng Zhao f715a6fca2 Fix opening links in external browsers. 2013-05-23 14:50:21 +08:00
Cheng Zhao 8849eb1186 Remove a few abandonded atom.* functions relying on sendMessageToBrowserProcess. 2013-05-23 14:13:39 +08:00
Cheng Zhao 95d5bff6ba Make atom work when there is no enough command line parameters. 2013-05-23 10:53:35 +08:00
Cheng Zhao 1d9449838f Make detect order of resourcePath more robust.
1. Use the resource-path of process.argv if specified;
2. Otherwise if --dev is specified then use ~/github/atom;
3. If no valid resourcePath is provide use the ones in bundle.
2013-05-23 10:36:27 +08:00
probablycorey b5bd7160d2 Update window spec 2013-05-22 16:44:09 -07:00
probablycorey ce4cb0db80 Test window.closeWithoutConfirm instead of window.close 2013-05-22 16:28:13 -07:00
Kevin Sawicki 603868a8c9 Mention installing packages 2013-05-22 16:02:48 -07:00
probablycorey 7716441bbd Update clipboard calls in edit session spec 2013-05-22 16:01:57 -07:00
Kevin Sawicki b5c805f0e9 Listen for package events and update view on state changes 2013-05-22 15:44:44 -07:00
Kevin Sawicki 6f54250ee5 Include error in trigger arguments 2013-05-22 15:41:03 -07:00
probablycorey 2746d72731 Ignoring 'modal native dialogs' spec
/cc @zcbenz since we don't use sendMessageToBrowserProcess anymore
these specs aren't mocked correctly. Is there a method that we can
mock when calling remote objects?
2013-05-22 15:34:48 -07:00
probablycorey 7f083acdc4 Update atom specs 2013-05-22 15:31:59 -07:00
Kevin Sawicki 681bc18248 Add spec for installing a package 2013-05-22 15:29:38 -07:00
Kevin Sawicki 23ce97a358 Add spec for uninstalling a package 2013-05-22 15:29:38 -07:00
Kevin Sawicki 26bfd95289 Expect relative main path 2013-05-22 15:29:38 -07:00
Kevin Sawicki 51cd8cc977 Add string case to unsubscribeFromActivationEvents() 2013-05-22 15:29:38 -07:00
Kevin Sawicki 571c953e51 Mark emitter class as internal 2013-05-22 15:29:38 -07:00
Kevin Sawicki d65b3608ba Add keybinding to description 2013-05-22 15:29:38 -07:00
Kevin Sawicki 14db63df3c Support single string activationEvents 2013-05-22 15:29:38 -07:00
Kevin Sawicki ed95c0d555 Add a description for each package 2013-05-22 15:29:38 -07:00
Kevin Sawicki 8deaeed6b7 Use a relative require path 2013-05-22 15:29:38 -07:00
Kevin Sawicki 05df25b8f4 Update spec for new DOM layout 2013-05-22 15:29:38 -07:00
Kevin Sawicki 9a5fc6ebe8 Add retry button for when fetching fails 2013-05-22 15:29:38 -07:00
Kevin Sawicki d671345ab3 Update views when packages are installed/uninstalled 2013-05-22 15:29:37 -07:00
Kevin Sawicki 9ecfe91729 💄 2013-05-22 15:29:37 -07:00
Kevin Sawicki fa571717d4 Only unload package if it is loaded 2013-05-22 15:29:37 -07:00
Kevin Sawicki 262a7d549e Add asserts for version text 2013-05-22 15:29:37 -07:00
Kevin Sawicki 860dd76d0d Wait for packages loaded event before starting specs 2013-05-22 15:29:37 -07:00
Kevin Sawicki 484c16da42 Always trigger loaded event 2013-05-22 15:29:37 -07:00
Kevin Sawicki 9552ebf4c2 Add warning label instead of warning panel when disabled 2013-05-22 15:29:37 -07:00
Kevin Sawicki 732c846cfc Show label when update is available 2013-05-22 15:29:37 -07:00
Kevin Sawicki a518af71ea Unload package before upgrade 2013-05-22 15:29:37 -07:00
Kevin Sawicki ca8a99bcfb Support a string repository field 2013-05-22 15:29:37 -07:00
Kevin Sawicki d1a5add3ea Remove unused requires 2013-05-22 15:29:37 -07:00
Kevin Sawicki 055e4d96e8 Render markdown in installed package views 2013-05-22 15:29:37 -07:00
Kevin Sawicki ce20bba792 Show loading message in available tab 2013-05-22 15:29:37 -07:00
Kevin Sawicki 80a55bb69a Use correct path variable name 2013-05-22 15:29:37 -07:00
Kevin Sawicki 32bdffa7eb Add description 2013-05-22 15:29:36 -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 25b8da0a76 Don't show uninstall action for bundled packages 2013-05-22 15:29:36 -07:00
Kevin Sawicki 63bfca3d09 Allow metadata to be loaded independently 2013-05-22 15:29:36 -07:00
Kevin Sawicki 37b1d4e77d Force metadata name to be package name 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 0cd27eac50 Use CSON.resolve() to find metadata path 2013-05-22 15:29:36 -07:00
Kevin Sawicki 7fa67d4a21 Sort installed packages by name 2013-05-22 15:29:36 -07:00
Kevin Sawicki 493f02951f Always include a name value in the metadata 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 76384747a1 Add isActive() helper to Package 2013-05-22 15:29:36 -07:00
Kevin Sawicki e85e30c1f7 Simplify version label 2013-05-22 15:29:36 -07:00
Kevin Sawicki 25eb893837 💄 2013-05-22 15:29:36 -07:00
Kevin Sawicki b6b48513de Remove logging of selector length 2013-05-22 15:29:36 -07:00
Kevin Sawicki e9a22192f7 Only show installed version when different 2013-05-22 15:29:35 -07:00
Kevin Sawicki 1fe576752b Unload package when uninstalled 2013-05-22 15:29:35 -07:00
Kevin Sawicki 4277271992 Don't hide dropdown when clicked 2013-05-22 15:29:35 -07:00
Kevin Sawicki 6622e7369d Decrease coverage to 75% 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 ff1f9b98d2 Use path.basename() instead of fsUtils.base() 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 b4104c0136 Use third package view instead of first 2013-05-22 15:29:35 -07:00
Kevin Sawicki fb712cf9c1 Add asserts for homepage and issue links 2013-05-22 15:29:35 -07:00
Kevin Sawicki 061b285aeb Use simpler internal tag 2013-05-22 15:29:35 -07:00
Kevin Sawicki 9841df732f Remove unused method 2013-05-22 15:29:35 -07:00
Kevin Sawicki 9f94d1b6b4 Add initial spec for available packages 2013-05-22 15:29:35 -07:00
Kevin Sawicki 5b2b699618 💄 2013-05-22 15:29:35 -07:00
Kevin Sawicki 7c04662d7d Remove logging statement 2013-05-22 15:29:34 -07:00
Kevin Sawicki 4746ac82c3 Show counts in nav area badge 2013-05-22 15:29:34 -07:00
Kevin Sawicki a223439eb8 Combine package configs into single panel 2013-05-22 15:29:34 -07:00
Kevin Sawicki 6e50b5c005 Mark class as internal 2013-05-22 15:29:34 -07:00
Kevin Sawicki 213524e893 Show upgrade as default action when newer version exists 2013-05-22 15:29:34 -07:00
Kevin Sawicki be020fad39 💄 2013-05-22 15:29:34 -07:00
Kevin Sawicki 2308533235 Add issue link to dropdown 2013-05-22 15:29:34 -07:00
Kevin Sawicki 009b50557c Add homepage link to dropdown 2013-05-22 15:29:34 -07:00
Kevin Sawicki 8668dd67ac Add README to package section 2013-05-22 15:29:34 -07:00
Kevin Sawicki e7df1f1f3d Use a dropdown button for package actions 2013-05-22 15:29:34 -07:00
Kevin Sawicki 6b81eebb02 Add initial available packages view 2013-05-22 15:29:34 -07:00
Kevin Sawicki c4cfc0cff6 Move btn override to command panel stylesheet 2013-05-22 15:29:34 -07:00
Kevin Sawicki d3cbd937fb Clip buffer position in screenPositionForBufferPosition()
Closes #562
2013-05-22 15:25:27 -07:00
probablycorey 102068f9e5 Remove calls to $native
And now some specs pass!
2013-05-22 11:57:31 -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
probablycorey 6abe6e7539 💄 2013-05-22 11:39:16 -07:00
probablycorey f6cb33b2ea Replace resource-path flag with dev flag (assume atom is located at
~/github/atom)
2013-05-22 11:06:50 -07:00
Garen Torikian 1dc49cfc70 Merge pull request #561 from github/update-nak
Bump nak, for better gitignoring
2013-05-22 10:11:22 -07:00
Garen Torikian f49ec5fac8 Explicitly require nak's bin executable 2013-05-22 10:05:50 -07:00
Garen Torikian ab466b60c8 command in project.scan needs to resolve to the bin, not the lib file
This is because nak was changed to also be run as a regular Node script, not just an executable
2013-05-22 09:29:37 -07:00
Garen Torikian d2e5c55bbf Bump nak, for better gitignoring 2013-05-22 09:29:34 -07:00
Cheng Zhao 127e38a0b5 Don't send commands to renderer for reload and toggleDevTools menu item.
The specs window doesn't respond to window commands, so it would make
the menu items do not work.
2013-05-22 22:35:19 +08:00
Cheng Zhao b68978ecb3 💄 2013-05-22 22:30:04 +08:00
Cheng Zhao a381e36779 The resourcePath should also be added to 'NODE_PATH'.
The core specs rely on this to find and run specs.
2013-05-22 22:27:18 +08:00
Cheng Zhao a5a6af7ef6 Don't prevent close for specs window. 2013-05-22 21:39:31 +08:00
Cheng Zhao 31ffe5e060 💄 2013-05-22 20:57:23 +08: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
Cheng Zhao 9b44b15f3b Use Command+Ctrl+Alt+S for running specs. 2013-05-22 20:01:25 +08:00
Kevin Sawicki 530965ac7e Mention .git in search results 2013-05-21 21:20:39 -07:00
Kevin Sawicki 42e1595bd7 💄 2013-05-21 18:49:27 -07:00
Kevin Sawicki e7c08d1202 Exclude core.ignoredNames when scanning project 2013-05-21 18:46:03 -07:00
Kevin Sawicki 61b5160d81 Move apm to github org. 2013-05-21 18:24:55 -07:00
probablycorey b58fcc5395 Specs run (but fail hardcore) 2013-05-21 17:04:00 -07:00
probablycorey d4b146d080 Serialize window dimensions 2013-05-21 14:33:45 -07:00
probablycorey f65fbdf7ae Don't show window until it is finished loading 2013-05-21 14:32:12 -07:00
probablycorey 8008985120 🙊 2013-05-21 14:27:58 -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
Garen Torikian 0caf6b5a2e Merge pull request #559 from github/remove-blank-options
Remove blank options in renderMarkdown
2013-05-21 11:36:19 -07:00
Garen Torikian d401f7cd19 Bump roaster 2013-05-21 11:30:24 -07:00
Garen Torikian 21bf03320e Remove blank options argument from renderMarkdown 2013-05-21 10:52:50 -07:00
Garen Torikian ecc65ff233 Bump roaster 2013-05-21 10:52:36 -07:00
probablycorey 26094a5405 Use executedFrom command line option to resolve paths 2013-05-20 16:02:06 -07:00
probablycorey 40d49373d3 Rename createAtomWindow to open 2013-05-20 14:47:36 -07:00
probablycorey 501acbc9c8 Files and folders can be opened from the command line 2013-05-20 14:46:57 -07:00
probablycorey cf6b2f8efd Slice application name off the argument list 2013-05-20 14:46:57 -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 1254561724 There is no need to call node-gyp externally any more.
From npm v1.2.19, the npm_config_disturl is supported to set dist-url
for node-gyp, so we don't need to interactive with node-gyp ourselves
any more.
2013-05-20 15:27:12 +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 5459f1e9db Store AtomWindow instead of BrowserWindow in atomApplication.windows. 2013-05-20 12:07:04 +08:00
Cheng Zhao 0ad96ca7da Make a few window related atom.* functions work. 2013-05-20 11:55:27 +08:00
Cheng Zhao 8be54136ed Use "shell.openExternal(url)" to open links in external browsers. 2013-05-20 10:12:40 +08:00
Cheng Zhao 7cb6801ce8 Use atom-shell's "shell.moveToTrash()" to replace "$native.moveToTrash()" 2013-05-20 09:57:29 +08:00
Cheng Zhao 177ac5687f Use atom-shell's "shell.beep()" to replace "$native.beep()" 2013-05-20 09:49:34 +08:00
Cheng Zhao 1301eb0fa4 Use atom-shell's API for pasteboard operations. 2013-05-20 09:43:19 +08:00
Cheng Zhao 62caaf01d7 💄 2013-05-18 15:06:35 +08:00
Cheng Zhao 160c9b9d8e Add Edit menu. 2013-05-18 12:28:17 +08:00
Cheng Zhao c8891c1008 Adopt to API change of dialog.showMessageBox. 2013-05-18 12:21:25 +08:00
probablycorey 153668db56 Opening a folder works! 2013-05-17 15:51:11 -07:00
Kevin Sawicki 276c6c1725 Add --silent flag to apm/npm commands 2013-05-17 15:37:26 -07:00
Kevin Sawicki 5859ae6ba7 Upgrade apm 2013-05-17 15:37:21 -07:00
probablycorey 1594231b4f Refactor AtomWindow code 2013-05-17 14:21:43 -07:00
probablycorey f9acde8c55 AtomApplication takes resourcePath as a parameter 2013-05-17 14:14:27 -07:00
probablycorey 6bdfe65bf2 💄 2013-05-17 14:10:03 -07:00
probablycorey 5fd6c1c5ab Move windows var to AtomApplication 2013-05-17 14:09:54 -07:00
probablycorey bab80e0089 AtomApplication creates the initial AtomWindow 2013-05-17 13:59:03 -07:00
probablycorey be2cfb3252 Rename BrowserMain to AtomApplication 2013-05-17 13:54:08 -07:00
probablycorey 49bc53c6d2 Moving bootstrap methods out of BrowserWindow
The file is going pretty hairy, so I'm going to split the classes
into new files
2013-05-17 11:47:58 -07:00
probablycorey 067bbb966d 💄
This is a totally subjective style change. I just prefer keeping code
that is rarely changed tight and dense. Another option would be to 
move the menu templates into a separate file.
2013-05-17 10:51:12 -07:00
Kevin Sawicki 75508fe9e8 Allow more than 3 back ticks for fenced code blocks 2013-05-17 10:00:14 -07:00
Kevin Sawicki 49afce5f68 Register javascript fence names 2013-05-17 08:51:25 -07:00
Cheng Zhao 6260d350ac Should always show devtools instead of toggling when getting error. 2013-05-17 23:07:34 +08:00
Cheng Zhao 26c89f71b2 Use BrowserWindow's 'close' event instead of 'beforeunload' to control closing.
Ideally both window closing and reloading should use 'beforeunload' to
control whether the unloading should continue, however since the save as
dialog is asynchronous, we have to prevent unloading first and then
continue after user's confirmation. And since we can not distinguish
whether the window is reloading or closing in the 'beforeunload'
handler, we do not know what to continue after user's confirmation. So I
have to rely on BrowserWindow's 'close' event to let user decide whether
window should be closed.
2013-05-17 22:30:14 +08:00
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 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
probablycorey 94a8c44d39 Remove AtomWindow params that are not in use yet
I pulled these out to keep the code simpler until we something running
2013-05-15 15:18:43 -07:00
probablycorey 16f8402d36 The resource path can be set with a command arg 2013-05-15 15:03:59 -07:00
Garen Torikian 04d4085759 Update manifest to include new "Your First Package!" information 2013-05-15 14:41:13 -06:00
Garen Torikian a75896c85b Merge pull request #544 from github/api/extension-docs
Level up the "creating packages" documentation
2013-05-15 13:37:36 -07:00
probablycorey d397bd5c4f Add optimist npm (an option parser) 2013-05-15 11:22:40 -07:00
Kevin Sawicki 61675c2e77 Install apm command when Atom starts
This changes the command installation to use symlinks instead
of copying over the contents of the file.
2013-05-15 10:29:27 -07:00
Kevin Sawicki 718175eb34 Make atom.sh executable 2013-05-15 10:29:27 -07:00
Cheng Zhao 8a3ee0515c 'window' module is renamed to 'browser_window'. 2013-05-15 22:27:28 +08:00
Nathan Sobo aefb84cdeb Don't modify uri's with a scheme prefix in Project.resolve 2013-05-14 20:55:14 -06:00
Nathan Sobo 5aac826ec1 Register a custom opener for ImageEditSessions on the Project class 2013-05-14 20:32:16 -06:00
Nathan Sobo aa86362a0a Add Project@registerOpener(fn) to register custom openers on project
Now packages can register custom handlers for different kinds of file
paths. If the function you register returns a resource for the given
path, it will be returned from Project.open instead of an EditSession.
2013-05-14 20:23:25 -06:00
Nathan Sobo 6104927cb6 Rename Project.buildEditSession -> Project.open 2013-05-14 20:03:53 -06:00
Kevin Sawicki 74c889062b Upgrade apm 2013-05-14 13:14:55 -07:00
Kevin Sawicki 7b2539c4f4 Correct typo in console warning message 2013-05-14 12:30:48 -07:00
Kevin Sawicki 851febd495 Use apm to install modules 2013-05-14 12:30:35 -07:00
Kevin Sawicki a12abd7377 💄 2013-05-14 12:01:21 -07:00
Kevin Sawicki 2f54cb4c22 Use season module internally 2013-05-14 11:58:34 -07:00
Kevin Sawicki 81f7354fb5 Use season for compiling cson to json 2013-05-14 11:08:32 -07:00
Kevin Sawicki f8c20e1659 Use correct dev mode check when opening config window
Closes #545
2013-05-14 10:12:25 -07:00
Kevin Sawicki 56394f6d8d Don't wrap the path text in the status bar
Also set a min width so the branch icon doesn't overlap
the path text when the window isn't wide enough to display
both.
2013-05-14 09:59:16 -07:00
Nathan Sobo e0e6d96c84 Fix #550. Use min-width: 0 after flexbox orientation switch.
By default, flexbox items have a min size of -webkit-min-content in the
the flex axis. I previously switched the pane item-views to flex
horizontally for performance reasons (preventing over-aggressive
repaints), but forgot to change min-height to min-width.
2013-05-14 10:10:25 -06:00
Kevin Sawicki f41b558fe5 Exclude symlinked folders from fuzzy finder
This can put the fuzzy finder in an infinite loop if a cycle
occurs.
2013-05-13 17:35:51 -07:00
Kevin Sawicki 5507febe09 Upgrade to git-utils 0.17
This release handles relativizing paths to a symlinked repository.

Close #549
2013-05-13 17:35:51 -07:00
Kevin Sawicki b8ee3187ec doc: task instead of web worker 2013-05-13 17:35:51 -07:00
probablycorey f74842cd4c Use new ruby scopes in TextMateGrammar spec 2013-05-13 16:51:30 -07:00
probablycorey 2e61201f86 Update ruby TextMate bundle
Closes #541
2013-05-13 16:51:30 -07:00
Kevin Sawicki 4108d572b8 Use real path to determine if repository root 2013-05-13 15:52:49 -07:00
probablycorey 423b133e75 Comments can't increase the indent level of the next line 2013-05-13 14:28:16 -07:00
probablycorey eb25d2e6a8 TokenizedBuffer.tokenForPosition(position) now works correctly
It was previously returning the wrong token at token boundaries.
2013-05-13 14:28:16 -07:00
probablycorey eae06b62bc Spec 💄 2013-05-13 14:28:16 -07:00
probablycorey 49aeef99b6 Add config option editor.normalizeIndentOnPaste 2013-05-13 14:28:16 -07:00
probablycorey 8e37d2ada6 Turn auto-indent on for all 'newline' specs 2013-05-13 14:28:16 -07:00
probablycorey 7513fe9c69 Set editor.autoIndent to true in specs 2013-05-13 14:28:16 -07:00
probablycorey 34d3091fc9 Remove console.log 2013-05-13 14:28:16 -07:00
probablycorey 992f520698 Normalize pasted text when there is an indent basis 2013-05-13 14:28:16 -07:00
probablycorey b23e1d3d52 In specs, use local copyText function to put text on the pasteboard 2013-05-13 14:28:16 -07:00
probablycorey dd53539799 Moving auto-indent specs to appropriate places 2013-05-13 14:28:15 -07:00
probablycorey 93b1ce53c0 Rename autoDecreaseIndentForRow to autoDecreaseIndentForBufferRow 2013-05-13 14:28:15 -07:00
probablycorey e70d6d1f8f Remove unused method autoIncreaseIndentForBufferRow 2013-05-13 14:28:15 -07:00
probablycorey c34db290e4 Only indent the line following a '\n' not the line preceding it 2013-05-13 14:28:15 -07:00
probablycorey 9d2b7875b9 💄 2013-05-13 14:28:15 -07:00
probablycorey 1f025817f1 Rename autoIndentNewlines to autoIndentNewline 2013-05-13 14:28:15 -07:00
probablycorey 38d4e3a097 Move all auto-indent specs to the auto-indent describe block 2013-05-13 14:28:15 -07:00
probablycorey c03d44da00 Add autoIndentNewline and autoDecreaseIndent options to insertText
insertText now takes these options:
* autoIndent will auto indent all inserted text based
* autoIndentNewline will indent a line when a '\n' is inserted
* autoDecreaseIndent will decrease the indent if the line matches a 
decreaseIndent pattern (such as a `}` in javavascript)
2013-05-13 14:28:15 -07:00
probablycorey 537c507efe Use suggested indent when auto indenting a buffer row 2013-05-13 14:28:15 -07:00
probablycorey 0fbd08f1ab Allow suggested indent level to be less than the current indent level 2013-05-13 14:28:15 -07:00
probablycorey 0f469a3269 Add Range.getRows 2013-05-13 14:28:15 -07:00
probablycorey 9713bc8c02 💄 2013-05-13 14:28:15 -07:00
probablycorey 7f0b2c54f3 editor.autoIndentOnPaste will auto indent every pasted line
I've removed normalizeLines and its tests. They will be added back in
a later commit.
2013-05-13 14:28:14 -07:00
probablycorey e9fd61a1ea Remove unused indent methods from Selection 2013-05-13 14:28:14 -07:00
probablycorey 33c95d1a58 Rename insideExistingLine to isCursorInsideExistingLine 2013-05-13 14:28:14 -07:00
probablycorey c5aa670569 Document methods as internal 2013-05-13 14:28:14 -07:00
probablycorey 533b11f991 💄 2013-05-13 14:28:14 -07:00
Kevin Sawicki ebb68c3386 Mention new icon 2013-05-13 09:33:17 -07:00
Cheng Zhao e9a4d9cafe 💄 2013-05-13 20:08:43 +08:00
Cheng Zhao bb114932ea Correctly set NODE_PATH before opening window. 2013-05-13 19:57:07 +08:00
Cheng Zhao 3b87c5d84b Set bootstrapScript and resourcePath params in URL. 2013-05-13 18:32:15 +08:00
Cheng Zhao 30b635527c Show the static/index.html on startup. 2013-05-13 16:47:16 +08:00
Cheng Zhao 77963aaf88 Keep symbol links when copying atom-shell bundle. 2013-05-13 16:46:48 +08:00
Cheng Zhao 02d5ca78d5 Clean unused native build scripts. 2013-05-13 15:16:42 +08:00
Cheng Zhao e99fe93029 Don't build native code and use atom-shell's binary instead. 2013-05-13 13:49:31 +08:00
Cheng Zhao 548021dd40 Download atom-shell and remove cefode. 2013-05-12 19:51:31 +08:00
Cheng Zhao 0f528c4811 Remove prebuilt-cef submodule. 2013-05-12 19:18:06 +08:00
Nathan Sobo c876876d5e Upgrade the icon 2013-05-11 10:35:45 -06:00
Nathan Sobo 7dde2fec55 Fix wrap guide spec again. Previously it only passed w/ a wide window. 2013-05-11 09:08:10 -06:00
Nathan Sobo 49cf92c2a2 Fix perf regression: Don't update line numbers for single line changes 2013-05-10 19:39:33 -06:00
Nathan Sobo 60319c30ac Fix wrap guide specs after panes css change 2013-05-10 18:30:01 -06:00
Nathan Sobo 191e8ab240 Fix perf regression caused by flex-flow: column on pane item views
For some reason, having flex-flow column on the pane item views
container was forcing the entire view to be repainted on cursor
movement and line edits. Allowing the container to flow row-wise and
setting the min-height to 0 instead of min-content-height achieves
the same layout effect without the huge repaint cost. Flexbox is a
fragile bitch.
2013-05-10 18:19:41 -06:00
Nathan Sobo b4dec8ccbb In Editor.updateRenderedLines, cap renderFrom to the last screen row
If we remove a large number of screen lines when we are scrolled down,
the current @firstRenderedScreenRow may end up being larger than the
number of screen rows we now have. Setting renderFrom to the
@firstRenderedScreenRow in this case was causing the renderFrom to be
larger than the renderTo, which was causing problems downstream with
the new mapping code.
2013-05-10 13:20:43 -06:00
Nathan Sobo 7d28edc116 Rename ScreenLine -> TokenizedLine
Now that ScreenLines don't contain the bufferRows property, which was
essential to the functioning of the LineMap, they're just containers
for tokens. Since they're stored in the TokenizedBuffer in a form that
doesn't necessarily match what ends up on screen, it makes more sense
to call them tokenized lines. A tokenized line is a screen line if it's
in the `.screenLines` array of the DisplayBuffer, but "screenness" is
not an inherent property, so it shouldn't be in the name of the class.
2013-05-10 13:20:43 -06:00
Nathan Sobo 4d314f99ac Eliminate ScreenLine.bufferRows property
Previously, we used bufferRows to determine how many buffer rows were
spanned by the screen line in the event it was folded. Now that we have
RowMap, screen lines don't need to serve this purpose. We still need
to know if a screen line is wrapped, which we solve via setting the
lineEnd property to null for a soft-wrapped screen line.
2013-05-10 13:20:43 -06:00
Nathan Sobo 1d146640e5 Break some methods out of DisplayBuffer.updateScreenLines 2013-05-10 13:20:43 -06:00
Nathan Sobo b4c95d4fc9 Merge adjacent isomorphic regions after adding new regions 2013-05-10 13:20:42 -06:00
Nathan Sobo d9c258f27e Handle new regions overlapping screen wise but not buffer wise 2013-05-10 13:20:42 -06:00
Nathan Sobo 4a56cc3693 Kick docs threshold down again because I removed public methods 2013-05-10 13:20:42 -06:00
Nathan Sobo 8b149ff827 Delete LineMap 2013-05-10 13:20:42 -06:00
Nathan Sobo f3145e671a Declare screenLines ivar in DisplayBuffer 2013-05-10 13:20:42 -06:00
Nathan Sobo d3cb001d65 Use RowMap instead of LineMap in DisplayBuffer 2013-05-10 13:20:42 -06:00
Nathan Sobo 16da9b0506 Document RowMap 2013-05-10 13:20:42 -06:00
Nathan Sobo d7914d2c54 Ensure row map applies negative deltas only after the given start row 2013-05-10 13:20:42 -06:00
Nathan Sobo 9849c62d80 Properly handle regions that straddle existing regions
When we're creating folds that contain other folds, we'll need the
region based on the new fold's row mapping to overwrite the regions
from the old folds. This commit ensures that the new region cleanly
slots in, replacing any regions it completely contains and splitting
regions that it only partially overlaps.
2013-05-10 13:20:42 -06:00
Nathan Sobo 3c630fb7f4 Rename mapping -> region within RowMap 2013-05-10 13:20:42 -06:00
Nathan Sobo 55f0b6a1f8 Replace existing regions when inserting a mapping that surrounds them 2013-05-10 13:20:42 -06:00
Nathan Sobo 1b21fdda3b Don't throw errors when applying screen deltas after the last mapping 2013-05-10 13:20:41 -06:00
Nathan Sobo c17d6ba487 Adjust multiple mappings if needed when applying screen deltas
If there are multiple mappings following the start row of the delta
that span fewer screen rows than the delta, we collapse mappings to 0
screen rows until we have removed the number of rows specified by the
delta.

Expanding positive deltas expands the first mapping following the
start row as it did previously.
2013-05-10 13:20:41 -06:00
Nathan Sobo c6ff7e8934 Inserting a mapping within an existing mapping preserves its shape
Inserting a mapping should never change the position of any existing
mappings on screen or in the buffer. It's simply a statement about a
range of rows in the buffer mapping to a range of existing rows on
screen, but shouldn't add or remove any rows. Adding and removing rows
on screen or in the buffer is the job of the applyBufferDelta and
applyScreenDelta methods.
2013-05-10 13:20:41 -06:00
Nathan Sobo 1895e8143d Allow the screen row count of N-screen:1-buffer mappings to be updated 2013-05-10 13:20:41 -06:00
Nathan Sobo 5c74a02688 Add row map specs for mappings of N screen rows to 1 buffer row 2013-05-10 13:20:41 -06:00
Nathan Sobo 2f900e11ed Add RowMap.bufferRowRangeForScreenRow 2013-05-10 13:20:41 -06:00
Nathan Sobo 1123ca4bc1 Helpful comments 2013-05-10 13:20:41 -06:00
Nathan Sobo 4973c2afc6 Don't return a mapping from traverseToBufferRow if we fall off the end 2013-05-10 13:20:41 -06:00
Nathan Sobo 502e3ceb3b Factor mapping traversal its own traverseToBufferRow method 2013-05-10 13:20:41 -06:00
Nathan Sobo 32b40fe1ad Eliminate dummy implementation of bufferRowRangeForScreenRow 2013-05-10 13:20:41 -06:00
Nathan Sobo 9a12b170f6 Allow insertion of multiple buffer row range mappings 2013-05-10 13:20:41 -06:00
Nathan Sobo 9f4b594bd0 Start on RowMap 2013-05-10 13:20:41 -06:00
Kevin Sawicki ea7a8c9670 Render markdown when buffer is reloaded
This will keep the preview in sync with the editor.
2013-05-10 12:16:45 -07:00
Kevin Sawicki 113dac6e2b Add more entries to fence name hash 2013-05-10 12:13:37 -07:00
Kevin Sawicki 642427d015 Remove unneeded guards
Syntax will always return a grammar and tokenizing
with the null grammar is acceptable.
2013-05-10 12:12:25 -07:00
Kevin Sawicki 26dad65c8d Only set code color outside of editor-colors parent 2013-05-10 12:12:03 -07:00
Kevin Sawicki 827bab90bf Add tokenizeLines to null grammar 2013-05-10 12:09:58 -07:00
Kevin Sawicki 1a90f1c017 Include source.shell inside of sh/bash code blocks 2013-05-10 11:50:21 -07:00
Kevin Sawicki 8172618bec Remove unused libgit2 script 2013-05-10 11:19:40 -07:00
Garen Torikian & Nathan Sobo e12d779f00 Add listing of package.json keys 2013-05-08 15:07:55 -07:00
Garen Torikian & Nathan Sobo 1300955c13 Explicitly mention node.js core modules 2013-05-08 15:07:38 -07:00
Garen Torikian & Nathan Sobo 7714c35829 Finish package sample 2013-05-08 15:07:25 -07:00
Kevin Sawicki 3de070708f Mention class layout 2013-05-08 11:30:34 -07:00
Kevin Sawicki 7aba7b0854 Use consistent rm flag order 2013-05-08 11:17:55 -07:00
Kevin Sawicki f16c7247a9 Clean cefode cache during prebuild 2013-05-08 11:17:30 -07:00
Kevin Sawicki ef2ece3600 Treat .tgz extension as compressed 2013-05-08 10:27:26 -07:00
Kevin Sawicki 962b559638 Mention fuzy finder fix 2013-05-08 10:25:54 -07:00
Garen Torikian & Nathan Sobo 9ab4707d43 More words on creating a pane 2013-05-07 12:53:09 -07:00
Kevin Sawicki c3759feaa0 Show number of paths loaded after indexing message 2013-05-07 08:56:06 -07:00
Kevin Sawicki 96418f3640 Respect core.excludeVcsIgnoredPaths in fuzzy finder 2013-05-06 18:06:10 -07:00
Kevin Sawicki a96c354f4f Fork with harmony collections enabled 2013-05-06 18:04:01 -07:00
Kevin Sawicki 81462d9050 Hide/show entire loading area instead of only message 2013-05-06 16:53:34 -07:00
Kevin Sawicki 919bdca8f4 Style select list loading area similar to command panel 2013-05-06 16:34:39 -07:00
Kevin Sawicki 130e5cd3ec Use task handler to load fuzzy finder paths
This use completely async calls from a process task and
also respects the repository-defined ignore rules.

Closes #509 and #514
2013-05-06 16:34:39 -07:00
Kevin Sawicki 42301210c4 Log uncaught exceptions to parent process 2013-05-06 16:34:39 -07:00
probablycorey 43a3c93d9b Substitution commands can replace text with empty string
Closes #488
2013-05-06 12:11:48 -07:00
Kevin Sawicki cc98b88e28 Expect Error instead of JSON string in markdown preview view 2013-05-06 09:42:45 -07:00
Kevin Sawicki 212a192abf 💄 2013-05-06 09:38:10 -07:00
Kevin Sawicki ebc75b1ba8 Use site color for code elements 2013-05-06 08:34:05 -07:00
Kevin Sawicki 7be6421989 Remove incorrect error message
The markdown API is no longer used.
2013-05-06 08:26:02 -07:00
Nathan Sobo b4206d3202 Merge branch 'master' into know-when-to-foldem
Conflicts:
	src/app/edit-session.coffee
2013-05-06 08:35:13 -06:00
Nathan Sobo e8e0d5dd02 Fix regression: folds can be destroyed by clicking them 2013-05-06 08:27:43 -06:00
Garen Torikian be229d374e Finish the working with styles section 2013-05-04 11:49:22 -07:00
Garen Torikian 14b28a8a89 Update package creation docs 2013-05-04 11:49:22 -07:00
Garen Torikian c71bccd72c Add new Included Libs doc 2013-05-04 11:49:22 -07:00
Garen Torikian cee9605fc5 Updates to first package information 2013-05-04 11:49:22 -07:00
Garen Torikian 7b5b942c47 Start the Creating a Package doc 2013-05-04 11:49:22 -07:00
Garen Torikian d5e0af2646 Move themes file 2013-05-04 11:49:22 -07:00
Garen Torikian a12e1d8b0e Update note on activationEvents 2013-05-04 11:49:22 -07:00
Garen Torikian d9d9b6800b Finish authoring packages section 2013-05-04 11:49:21 -07:00
Garen Torikian 8d7fd982e1 Start leveling up extension docs 2013-05-04 11:49:21 -07:00
Nathan Sobo 3e937e9811 Merge remote-tracking branch 'origin/master' into know-when-to-foldem
Conflicts:
	src/app/buffer-marker.coffee
	src/app/cursor.coffee
	src/app/display-buffer-marker.coffee
	src/app/display-buffer.coffee
	src/app/edit-session.coffee
	src/app/fold.coffee
	src/app/line-map.coffee
	src/app/range.coffee
	src/app/selection.coffee
	src/app/text-buffer.coffee
2013-05-03 18:29:52 -06:00
Garen Torikian 4b993b99cd Merge pull request #507 from github/markdown-and-out
Swap out Markdown render logic with module
2013-05-03 16:59:00 -07:00
Garen Torikian & Nathan Sobo 839f0b642c Merge Kevin's fix for empty line invisibles with the reshuffling of buildLineHtml methods to be on the class level 2013-05-03 16:57:42 -07:00
Garen Torikian & Nathan Sobo f4d7586034 Refactor syntax highlighting of Markdown pre blocks
Extract out editor-colors class to apply background and default text color
Remove pre background coloring from Markdown preview stylesheet
2013-05-03 16:57:42 -07:00
Garen Torikian & Nathan Sobo ab23f624af Add pairs file for gjt 2013-05-03 16:57:42 -07:00
Garen Torikian 86484e7426 💄 for renamed method call 2013-05-03 16:57:42 -07:00
Garen Torikian 734b6778b1 Add more langauges to mapping 2013-05-03 16:57:42 -07:00
Garen Torikian 252682dd99 Syntax highlight based entirely on editor colors 2013-05-03 16:57:42 -07:00
Garen Torikian 95e14486af Fix specs for testing highlighted lines 2013-05-03 16:57:42 -07:00
Garen Torikian cf239ccac0 Implement highlighting of Markdown pre blocks 2013-05-03 16:57:41 -07:00
Garen Torikian dd041945d2 Transform specs to something useful 2013-05-03 16:57:41 -07:00
Garen Torikian 1cc4c52c7a Style emoji 2013-05-03 16:57:41 -07:00
Nathan Sobo a2c894bcc9 Fix some docs issues 2013-05-03 17:35:01 -06:00
Nathan Sobo ebfd8ca4c3 Give docs errors a better failure message 2013-05-03 17:34:48 -06:00
Corey Johnson & Nathan Sobo da938d8212 Fix edit session specs concerning delete/backspace + folds 2013-05-03 17:24:08 -06:00
Corey Johnson & Nathan Sobo 855f955dec Make BufferMarker return copies of its points so they can't be mutated 2013-05-03 17:23:24 -06:00
Corey Johnson & Nathan Sobo 1b8a8cf939 Make UndoManager.clear not cancel the transaction
If an exception is thrown while running an operation, we clear the
undo manager and re-throw it. But if we were in a transaction, we will
commit it in a `finally` block. If the transaction is set to null,
committing the transaction will then throw an exception which hides
the original exception… we don't want that. Now clear just empties the
current transaction out.
2013-05-03 17:21:50 -06:00
Nathan Sobo 9147e86d96 Delete unused param 2013-05-03 17:19:11 -06:00
Garen Torikian 6c748c2f87 Fix tests 2013-05-02 18:33:28 -07:00
Garen Torikian 4b6e0916c9 Swap out Markdown render logic 2013-05-02 18:33:20 -07:00
Kevin Sawicki fa5861a626 Include $self inside heading rule
This allows emoji, links, etc. to be parsed
and highlighted in headings
2013-05-02 16:21:22 -07:00
Kevin Sawicki f556890873 Mention icon 2013-05-02 14:21:22 -07:00
Kevin Sawicki 55f185f980 Tweak select list colors 2013-05-02 14:08:51 -07:00
Garen Torikian d4474e1d4d Merge pull request #512 from github/change-status-block-tag
Change status block tag
2013-05-02 13:50:06 -07:00
Kevin Sawicki b64f6c5c27 Upgrade icon to orange cube circles 2013-05-02 13:46:42 -07:00
probablycorey 616bb487f4 Correct config.observe documentation 2013-05-02 13:24:08 -07:00
probablycorey 9f4fb29b58 💄 2013-05-02 13:22:08 -07:00
Garen Torikian 1262d3fce9 💄 2013-05-02 12:22:37 -07:00
probablycorey f4f74e1171 💄 2013-05-02 12:05:56 -07:00
probablycorey f0c8c044c9 No longer need extra event handler
Since config doesn't store default values anymore, this line isn't
needed.
2013-05-02 12:05:56 -07:00
probablycorey c13b291c64 Update config panel spec 2013-05-02 12:05:56 -07:00
probablycorey 70191ea368 Don't store config values that equal their default config value
If 'foo' has not been set and has a default value of 1, 
config.set('foo', 1) will not store the 1.

If 'foo' has been set to X and has a default value of 1, 
config.set('foo', 1) will remove 'foo' from config
2013-05-02 12:05:56 -07:00
probablycorey d294bf4d05 💄
Keep the bind commands close together
2013-05-02 12:05:56 -07:00
Kevin Sawicki 10ca03f238 Don't show indent guide in truly trailing whitespace
Lines that are all whitespace are considered trailing
whitespace and should display the indent guide.

But lines with leading and trailing whitespace should never
have the indent guide rendered in the trailing area.
2013-05-02 11:44:49 -07:00
probablycorey 67f96e0fdd Remove shift from all non-alphanumeric key bindings
There is no guarantee that the shift values for
non-alphanumeric keys will be the same across keyboards.
2013-05-02 10:29:10 -07:00
Cameron McEfee 879ce3b30d ctrl-| to ctrl-shift-| 2013-05-02 10:01:32 -07:00
probablycorey 3de96f1e7a Only cancel termination if there are AtomWindowControllers open.
Sometimes an application has other windows open, like the open
panel. Even when these are closed they seem to live on in the
application's window array. We now ignore those windows when trying
to terminate the app.

Closes #534
2013-05-02 09:38:51 -07:00
Kevin Sawicki ee621bcace Bind link click handler in window.handleEvents() 2013-05-01 22:18:39 -07:00
Kevin Sawicki c2118a8cb9 Remove unneeded trailing if 2013-05-01 21:55:37 -07:00
Kevin Sawicki 21f1579f73 Return early when href is a hash 2013-05-01 21:48:43 -07:00
Kevin Sawicki 4dce9d659f Open http/https links in an external browser
Listen for all links being clicked and open any http/https
hrefs by spawning a call to the 'open' command.

Closes #531
2013-05-01 21:36:36 -07:00
Kevin Sawicki ca4cfe358f Mention update and indent guide fixes 2013-05-01 21:26:15 -07:00
Kevin Sawicki 7c8c4bd233 Remove unused requires 2013-05-01 20:57:16 -07:00
Kevin Sawicki 35cf96e15f Render empty line invisibles at correct position
End of line invisibles are not rendered at the correct
position for empty lines instead of always after the
last indent guide span.

Closes #456
2013-05-01 20:54:09 -07:00
Corey Johnson & Nathan Sobo 7a9d408425 Add rootView to tab spec 2013-05-01 17:41:25 -07:00
Nathan Sobo 69300e0766 Make Buffer.transact restore marker ranges on undo/redo of transaction
We no longer need to restore selection ranges before and after
transactions now because selections are based on markers so they go
along for the ride for free. This allows us to delegate directly to
Buffer.transact from EditSession.
2013-05-01 18:38:40 -06:00
Corey Johnson & Nathan Sobo 559f76e887 Dragging a tab from one pane to another clears all placement markers
Closes #528
2013-05-01 17:36:54 -07:00
Kevin Sawicki 6eb88278ae Only return false if focused
Previously the editor would not gain focus if the underlayer was clicked.
2013-05-01 17:27:33 -07:00
Garen Torikian 662ddf9fd6 Update documentation to push threshold back past 80% 2013-05-01 17:21:05 -07:00
Kevin Sawicki 698f670350 Remove mini class from grammar selector
Grammars were wrapping when miniaturized even though
there was plenty of room.
2013-05-01 17:13:46 -07:00
Kevin Sawicki aebaf688a9 Add secondar-line class to light theme 2013-05-01 17:13:17 -07:00
Kevin Sawicki 7e15a343f3 Add primary/secondary line classes to select list
This will be a style that can be used by extending
classes to provide two lines that don't wrap with
color and padding.

This is initially used by symbols view and fuzzy finder.
2013-05-01 17:09:37 -07:00
Garen Torikian f47eea1e6c 💄 2013-05-01 17:03:12 -07:00
Garen Torikian 5a944514f3 Rewrite all hash key options 2013-05-01 17:01:55 -07:00
Garen Torikian fb955667f5 Resolve references to Internal 2013-05-01 17:01:55 -07:00
Garen Torikian 31aaa23b20 Update tokenizedbuffers 2013-05-01 17:01:55 -07:00
Garen Torikian 4d239b46e2 Update textmatescopeselector 2013-05-01 17:01:55 -07:00
Garen Torikian 856b07197a Update textbuffer 2013-05-01 17:01:55 -07:00
Garen Torikian d07751605a Update textbuffer 2013-05-01 17:01:55 -07:00
Garen Torikian ddb09e98e8 Update selection 2013-05-01 17:01:55 -07:00
Garen Torikian 75b40f603a Update screen-line 2013-05-01 17:01:55 -07:00
Garen Torikian 5c21d71461 Update root-view 2013-05-01 17:01:54 -07:00
Garen Torikian 6c5f310cba Update range 2013-05-01 17:01:54 -07:00
Garen Torikian 909a951ff0 Update project 2013-05-01 17:01:54 -07:00
Garen Torikian 51a07bdb31 Update point 2013-05-01 17:01:54 -07:00
Garen Torikian 3dcdf0863e Update line-map 2013-05-01 17:01:54 -07:00
Garen Torikian 46b5731ac4 Update line-map 2013-05-01 17:01:54 -07:00
Garen Torikian 9be438d2f7 Update language-mode 2013-05-01 17:01:54 -07:00
Garen Torikian bb8f4fb092 Update image-view 2013-05-01 17:01:54 -07:00
Garen Torikian 7b65a68450 Update image-edit-session 2013-05-01 17:01:54 -07:00
Garen Torikian 7e6eecc6cf Update gutter 2013-05-01 17:01:54 -07:00
Garen Torikian 9d709ea152 Update git 2013-05-01 17:01:54 -07:00
Garen Torikian eadb3cf98c Update fold 2013-05-01 17:01:54 -07:00
Garen Torikian 09e9c2f224 Update file 2013-05-01 17:01:53 -07:00
Garen Torikian dbae05605b Update eventemitter 2013-05-01 17:01:53 -07:00
Garen Torikian 3c5b721177 Update Editor 2013-05-01 17:01:53 -07:00
Garen Torikian b0e4ce7bb8 Update EditSession 2013-05-01 17:01:53 -07:00
Garen Torikian 2bf7adef5c A slight modification to EditSession 2013-05-01 17:01:53 -07:00
Garen Torikian 34fb03fbd3 Update DisplayBuffer 2013-05-01 17:01:53 -07:00
Garen Torikian a8a28fea18 Update DisplayBufferMarker 2013-05-01 17:01:53 -07:00
Garen Torikian 16cef29925 Update directory 2013-05-01 17:01:53 -07:00
Garen Torikian 26564ee020 Update cursor 2013-05-01 17:01:53 -07:00
Garen Torikian 66a80ade30 Update config 2013-05-01 17:01:53 -07:00
Garen Torikian 685ec5d8d7 Update buffer-marker docs 2013-05-01 16:58:43 -07:00
Garen Torikian 52139dc24e Bump biscotto 2013-05-01 16:58:43 -07:00
Garen Torikian 2357f46761 Fix block comments in src 2013-05-01 16:58:43 -07:00
Garen Torikian 64fea21a38 Bump biscotto 2013-05-01 16:58:05 -07:00
Kevin Sawicki 71e73750e2 Kill negative top margin on path 2013-05-01 16:52:13 -07:00
Kevin Sawicki 37b298fcba Lessify the base fuzzy finder stylehsheet 2013-05-01 16:51:39 -07:00
Kevin Sawicki 01ad97e7b0 Show ellipsis for long paths in fuzzy finder
Previously the directory was shown after the file name
and it would wrap if too long causing inconsistent row
heights.

Now the full path is shown below the name in a smaller font
and both the path and file are set to overflow with an ellipsis.
2013-05-01 16:46:22 -07:00
Nathan Sobo 988f4da6e1 Always restore marker ranges on undo/redo, even for valid markers 2013-05-01 17:32:39 -06:00
Nathan Sobo f48ee846e9 💄 2013-05-01 17:23:21 -06:00
Nathan Sobo a9c599abeb Isolate folds on a per-display-buffer basis
Creating a fold in one pane now has no effect on an edit session
for the same buffer in another pane. Before they were polluting each
other by sharing the same fold markers.
2013-05-01 16:24:32 -06:00
Nathan Sobo c717d23901 🔫 dead code 2013-05-01 16:15:28 -06:00
Nathan Sobo 6153375c76 Base folds on buffer markers, since they don't rely on screen coords
When creating a display buffer for buffers that already have fold
markers, which we'll eventually do on refresh, basing folds on
full-blown display buffer markers is a problem because we end up
creating display buffer markers during construction of the line map.
When we create a display buffer marker it memoizes its screen positions,
but since the line map isn't built yet we have nothing to translate
against. Basically, since the line map depends on folds, folds can't
depend on the line map. Luckily, they don't need to. Buffer markers
work just fine.
2013-05-01 16:14:25 -06:00
probablycorey 850ecb23df Atom will auto-update on close if a newer version is on Speakeasy
The first call to terminate is canceled so that every window can be 
closed. On AtomCefClient the OnBeforeClose method is called when a
browser is finished closing. Once all windows have finished closing, AtomCefClient calls terminate again, which will terminate the 
application.

Closes #527
2013-05-01 13:54:38 -07:00
probablycorey 8f03ff2952 💄 2013-05-01 13:54:38 -07:00
probablycorey 0be166bb59 Remove the bottomPaddingInLines from editor 2013-05-01 13:54:37 -07:00
probablycorey cb2d24baca Listen for clicks outside of the render lines on the underlayer 2013-05-01 13:54:37 -07:00
probablycorey 7609b08e86 💄 2013-05-01 13:54:37 -07:00
Kevin Sawicki aeffa0e150 Remove duplicate property 2013-05-01 13:10:14 -07:00
Kevin Sawicki 932d552ae7 Only show scrolls when needed in tree view 2013-05-01 08:22:03 -07:00
Kevin Sawicki 78d8485243 Allow config window to be closed with meta-W
window.confirmClose() should close the window immediately when
there is no rootView which is the case in the config window.
2013-05-01 08:02:17 -07:00
Kevin Sawicki c3232a463c Use ems instead of pixels for config editor widths
This allows the editor to be big enough to still show
multiple characters in large font sizes.
2013-05-01 07:58:12 -07:00
Kevin Sawicki 536beb0d40 Support setting number fields to 0
Previously entering 0 would end up as '0' in the config
value instead of as a numeric value.
2013-04-30 23:10:22 -07:00
Kevin Sawicki 1afe4f0cd9 Mention missing wrap guide fix 2013-04-30 23:02:48 -07:00
Kevin Sawicki 334c4095bb Write empty object values on same line as keys 2013-04-30 22:43:51 -07:00
Kevin Sawicki 986e5f9c7a Default to 80 when editor.preferredLineLength <= 0
Previously any non-null value would be used as the target
column in the wrap guide and autoflow packages when really
80 should have been used if the value was non-postive.

Now config.getPositiveInt() is called with a default value
of 80 if the current value isn't already positive.
2013-04-30 22:37:02 -07:00
Kevin Sawicki 6077cf2389 Mention save error with markdow preview 2013-04-30 22:06:05 -07:00
Kevin Sawicki f417e898f6 Only call save on active item when it exists
Closes #529
2013-04-30 22:02:46 -07:00
Kevin Sawicki 047d9525e7 Ignore first modified event in config editor
This event comes from initially setting the text for the current
config value on the editor and was causing the config to be
immediately saved multiple times when opened.
2013-04-30 21:55:43 -07:00
Kevin Sawicki ca7da8a0da Don't set un-parseable numbers to 0 in the config
Previously if an integer or float field was empty it would
default to zero instead of undefined which made it inconsistent
with string value fields.

Now the config value is only set as a Number when it can be
parsed as one.
2013-04-30 21:36:27 -07:00
Nathan Sobo 49b17023a5 Fix method missing exception in LineMap.logLines 2013-04-30 18:40:14 -06:00
Nathan Sobo 693c4f8270 Preserve folds when restoring selections on undo/redo 2013-04-30 18:39:54 -06:00
Nathan Sobo df08c14aef Restore markers before triggering buffer events
This allows folds to be restored on undo/redo
2013-04-30 18:21:37 -06:00
Nathan Sobo af903f6690 Don't trigger marker-added/removed events anymore
I missed this previously
2013-04-30 18:20:15 -06:00
Nathan Sobo cef25898bb Properly unsubscribe DisplayBuffer from Buffer on destruction 2013-04-30 18:14:53 -06:00
Nathan Sobo 0dea901368 Use instance method 2013-04-30 18:14:31 -06:00
Nathan Sobo 9086171f45 💄 2013-04-30 18:14:13 -06:00
Nathan Sobo 9aec992693 Hold marker [in]validation events until after buffer change events
For a while, the goal has been to prevent marker update events from
firing until after the buffer change event. But at the same time, we
want all the markers to be updated when the buffer change fires. This
commit irons out some issues for markers that are invalidated or
revalidated by the change, making their behavior consistent with the
rest of marker updates.
2013-04-30 17:37:28 -06:00
Kevin Sawicki a788006d7c Default editor.preferredLineLength config to 80 2013-04-30 15:03:46 -07:00
Nathan Sobo 40512a4823 Don't update the DisplayBuffer when a fold's marker changes
Because we don't currently allow for direct manipulation of fold
marker ranges, if a fold's marker changes it will be because of a
buffer change. This buffer change will bubble to the display buffer
anyway, where the screen line update will account for the change to
the fold's marker range.
2013-04-30 15:07:37 -06:00
Nathan Sobo 2e77f0ed7d Eliminate special behavior for changes straddling start / end of folds
Previously, we were attempting to preserve the fold and adjust in an
intuitive way in the face of changes that straddled the beginning or
the end of the fold. That added complexity… we would have to add a new
marker invalidation strategy to support it and I'm not convinced it's
actually a big deal to destroy folds in the face of straddling changes.
So that's what we do now.
2013-04-30 14:28:42 -06:00
probablycorey af5392b8ac Add extra padding to the bottom of an editor's vertical scrollbar
This gives us some space when we scroll to the bottom of a file.
Similar to how MacVim works when using the mouse.

Closes #464
2013-04-30 11:52:28 -07:00
probablycorey 471ac4976f Test correct editor in font size spec 2013-04-30 11:52:28 -07:00
probablycorey 16c892caa6 Update click and drag spec
Stop relying on setInterval to trigger the scroll events in the spec. Instead simulate the mouse moving at the top of the screen. I found 
testing the setInterval approach required so much mocking that it 
wasn't worth it.
2013-04-30 11:52:28 -07:00
Corey Johnson 35b0e06260 💄 2013-04-30 11:52:28 -07:00
Corey Johnson bbb7dfdd07 Only the underlayer needs height: 100% 2013-04-30 11:52:28 -07:00
Nathan Sobo 56a9316a28 Fix docs references 2013-04-30 11:37:31 -06:00
Nathan Sobo 7d676f51bd Document TextBuffer.getMarker[s] 2013-04-30 05:12:43 -06:00
Nathan Sobo 7ca8e31087 Document Fold methods 2013-04-30 05:12:13 -06:00
Nathan Sobo 029d8b58db Remove outdated method 2013-04-30 04:58:02 -06:00
Nathan Sobo 160a336b48 Fix command interpreter spec 2013-04-30 04:57:08 -06:00
Nathan Sobo 1ecd195e6e 💄 2013-04-30 04:53:26 -06:00
Nathan Sobo 9f8a07fc27 Fix some edit session specs. The remaining failures are less trivial. 2013-04-30 04:43:28 -06:00
Nathan Sobo 1f3e3c698f Add DisplayBuffer.foldsStartingAtBufferRow 2013-04-30 04:37:11 -06:00
Nathan Sobo 1f9e33d995 WIP: Base folds on markers.
Still a couple of specs failing on this for changes that straddle the
start / end of a fold. We need a new marker invalidation strategy for
these cases.
2013-04-30 04:30:08 -06:00
Nathan Sobo 32178541fe Emit 'destroyed' events from display buffer markers 2013-04-29 21:01:48 -06:00
Nathan Sobo 51e915c423 Replace marker 'observe' methods w/ ordinary 'changed' event 2013-04-29 21:01:48 -06:00
Nathan Sobo 4ca00f7347 Simplify marker events
Instead of marker-added and marker-removed events which are emitted
when markers are created/invalidated/revalidated/destroyed, we now
just have marker-created events that are triggered *only* when markers
are created for the first time. The marker itself emits a 'destroyed'
event when it is destroyed. The marker already notifies observers when
its validation status changes, so that's covered.
2013-04-29 21:01:48 -06:00
Nathan Sobo b2d34d93ab Emit 'marker-added/removed' events on DisplayBuffer 2013-04-29 21:01:48 -06:00
Nathan Sobo 78bb074c0d Add DisplayBufferMarker.inspect 2013-04-29 21:01:48 -06:00
Nathan Sobo 3a39c92ae4 Emit 'marker-added/removed' events when buffer marker validity changes 2013-04-29 21:01:48 -06:00
Nathan Sobo 883127f0d6 Emit 'marker-added/removed' when buffer markers are created/destroyed 2013-04-29 21:01:48 -06:00
Nathan Sobo 3b52cd018b Reduce documentation threshold
I deleted a bunch of documented methods. I haven't added any new
undocumented methods, but now there are fewer overall documented
methods, which is breaking the docs threshold spec. I don't think it
makes sense to start documenting non-related methods in this branch
right now.
2013-04-29 21:01:48 -06:00
Nathan Sobo 6f34d0b346 Document new methods 2013-04-29 21:01:48 -06:00
Nathan Sobo b35bd36ec7 Get spell check specs passing with new marker api 2013-04-29 21:01:48 -06:00
Nathan Sobo 8c037bf425 Destroy markers properly in command panel operations 2013-04-29 21:01:48 -06:00
Nathan Sobo ae5e07ddd6 Make bracket matcher work with new marker API 2013-04-29 21:01:48 -06:00
Nathan Sobo b16529bf9f Use new marker API to get marker ranges in command panel operations 2013-04-29 21:01:47 -06:00
Nathan Sobo db0676cc51 Use new API to destroy markers in snippets package 2013-04-29 21:01:47 -06:00
Nathan Sobo 2d1cb8b519 Fix selection spec to to check marker destruction properly 2013-04-29 21:01:47 -06:00
Nathan Sobo 3a11c56438 Add .isDestroyed method to markers 2013-04-29 21:01:47 -06:00
Nathan Sobo caf34d6a3a EditSession.selectMarker checks if the marker is valid
Also, it returns the selected range if it's valid, and otherwise
returns a falsy value. This has more utility than just true/false.
2013-04-29 21:01:47 -06:00
Nathan Sobo a028dff6e9 Add DisplayBufferMarker.isValid 2013-04-29 21:01:47 -06:00
Nathan Sobo 0563ee4a97 Make DisplayBuffer.findMarkers return DisplayBufferMarkers 2013-04-29 21:01:47 -06:00
Nathan Sobo d466abdc64 Fix DisplayBuffer spec 2013-04-29 21:01:47 -06:00
Nathan Sobo f4be899ae9 Switch EditSession over to object-oriented markers API 2013-04-29 21:01:47 -06:00
Nathan Sobo 5403bc647a Convert display buffer markers to object-oriented API 2013-04-29 21:01:47 -06:00
Nathan Sobo 482eb6c0de Give TextBuffer an object-oriented marker interface
The previous API revolved around methods on TextBuffer for querying
and manipulating markers based on their id. Now marker creation
methods return marker objects. These are still retrievable by id so
they can be dealt with across serialization boundaries in the future,
but you deal with them directly as objects.
2013-04-29 21:01:47 -06:00
Nathan Sobo e02e4cd975 Add DisplayBuffer.findMarker[s] 2013-04-29 21:01:47 -06:00
Nathan Sobo ac90b13032 Add missing Buffer.findMarker implementation 2013-04-29 21:01:46 -06:00
Nathan Sobo 64aaf670ed Add startRow and endRow special attributes to TextBuffer.findMarker[s] 2013-04-29 21:01:46 -06:00
Nathan Sobo 4a764c2d9d 💄 2013-04-29 21:01:46 -06:00
Nathan Sobo 0f0480b79f Add Buffer.findMarker[s], which returns marker[s] matching attributes 2013-04-29 21:01:46 -06:00
Nathan Sobo df6feab346 Add Range.compare 2013-04-29 21:01:46 -06:00
Nathan Sobo aef34c11b7 Use new DisplayBuffer.updateScreenLines method for .destroyFold 2013-04-29 21:01:46 -06:00
Nathan Sobo 0292ba959f Use the same code path for fold creation and tokenized buffer changes 2013-04-29 21:01:46 -06:00
Kevin Sawicki 58275a2f0a Use ems instead of pixels for loading octicon size 2013-04-29 18:23:10 -07:00
Kevin Sawicki f0d3a06655 Mention dev mode fixes 2013-04-29 18:02:40 -07:00
Kevin Sawicki 0ce67b307c Remove unneeded resource path assignment
There is a fall back case after this that sets the resource
path to the bundle path if not already set.
2013-04-29 17:58:41 -07:00
Kevin Sawicki 598cdea22a Don't crash when running dev with no resource path
Previously if the --dev flag was used and no resource was
specified or found in ~/github/atom then the app would
crash trying to add a null resource path to the node paths
list.

Now the bundle resource path is the fallback whenever the
dev resource path cannot be found or does not exist.
2013-04-29 17:54:31 -07:00
Kevin Sawicki 32d23d6303 Allow Atom to be run in stable mode
Previously isDevMode was returning true when it was called
before the resource path was initially set forcing Atom to
always run in dev mode.

Now we just use the new isDevFlagSpecified() method to check
where the bundle resource path should be used.
2013-04-29 17:51:13 -07:00
Kevin Sawicki 3279a575f6 Reuse search when re-toggling find in project
Previously the prior find in file search was thrown
away when toggling find-in-project subsequent times.

Now the previous search text is retained and selected when toggled.
2013-04-29 15:25:07 -07:00
Kevin Sawicki 16ffbd1920 Reuse search when re-toggling find in file
Previously the prior find in file search was thrown
away when toggling find-in-file subsequent times.

Now the previous search text is retained and selected when toggled.
2013-04-29 15:24:44 -07:00
Corey Johnson 9180060920 Revert "Listen for mouse events on scrollView instead of renderedLines"
You can't listen on scroll view because that makes
it impossible to scroll using the scrollbar

Opens #464

This reverts commit fdae5fd89c.
2013-04-29 15:07:38 -07:00
Corey Johnson fdae5fd89c Listen for mouse events on scrollView instead of renderedLines
It was not possible to click on the lower part of the last line
when the editor was scrollable and listening for mousedown events on renderedLines.

Closes #464
2013-04-29 14:59:23 -07:00
Corey Johnson 8e218de3e7 💄 2013-04-29 14:59:23 -07:00
Kevin Sawicki a6c89b75fc Retain command panel text between toggles
Previously the mini editor was cleared on toggle but now
the existing text retained and selected when toggled.
2013-04-29 14:48:06 -07:00
Kevin Sawicki 15cf475d04 Use loading octicon in command panel
This removes the SVG spinner which had been incorrectly
rendering since the bootstrap upgrade due to box sizing
issues.
2013-04-29 14:13:21 -07:00
591 arquivos alterados com 14552 adições e 15007 exclusões
+2 -7
Ver Arquivo
@@ -3,13 +3,8 @@
.project
.svn
.nvm-version
atom.xcodeproj
build
.xcodebuild-info
node_modules
npm-debug.log
tags
/cef/
/sources.gypi
/node/
/tags
/atom-shell/
docs/api
+6 -87
Ver Arquivo
@@ -1,90 +1,9 @@
[submodule "vendor/packages/text.tmbundle"]
path = vendor/packages/text.tmbundle
url = https://github.com/textmate/text.tmbundle.git
[submodule "vendor/packages/css.tmbundle"]
path = vendor/packages/css.tmbundle
url = https://github.com/textmate/css.tmbundle.git
[submodule "vendor/packages/html.tmbundle"]
path = vendor/packages/html.tmbundle
url = https://github.com/textmate/html.tmbundle.git
[submodule "vendor/packages/javascript.tmbundle"]
path = vendor/packages/javascript.tmbundle
url = https://github.com/textmate/javascript.tmbundle.git
[submodule "vendor/packages/ruby-on-rails-tmbundle"]
path = vendor/packages/ruby-on-rails-tmbundle
url = https://github.com/drnic/ruby-on-rails-tmbundle.git
[submodule "vendor/packages/ruby.tmbundle"]
path = vendor/packages/ruby.tmbundle
url = https://github.com/textmate/ruby.tmbundle.git
[submodule "vendor/packages/coffee-script-tmbundle"]
path = vendor/packages/coffee-script-tmbundle
url = https://github.com/kevinsawicki/coffee-script-tmbundle.git
[submodule "vendor/packages/puppet-textmate.tmbundle"]
path = vendor/packages/puppet-textmate.tmbundle
url = https://github.com/cburyta/puppet-textmate.tmbundle.git
[submodule "vendor/packages/c.tmbundle"]
path = vendor/packages/c.tmbundle
url = https://github.com/textmate/c.tmbundle.git
[submodule "vendor/packages/objective-c.tmbundle"]
path = vendor/packages/objective-c.tmbundle
url = https://github.com/textmate/objective-c.tmbundle.git
[submodule "vendor/packages/git.tmbundle"]
path = vendor/packages/git.tmbundle
url = https://github.com/kevinsawicki/git.tmbundle.git
[submodule "vendor/packages/json.tmbundle"]
path = vendor/packages/json.tmbundle
url = https://github.com/textmate/json.tmbundle.git
[submodule "vendor/packages/shellscript.tmbundle"]
path = vendor/packages/shellscript.tmbundle
url = https://github.com/textmate/shellscript.tmbundle
[submodule "vendor/packages/xml.tmbundle"]
path = vendor/packages/xml.tmbundle
url = https://github.com/textmate/xml.tmbundle.git
[submodule "vendor/packages/property-list.tmbundle"]
path = vendor/packages/property-list.tmbundle
url = https://github.com/textmate/property-list.tmbundle.git
[submodule "vendor/packages/python.tmbundle"]
path = vendor/packages/python.tmbundle
url = https://github.com/textmate/python.tmbundle
[submodule "vendor/packages/clojure.tmbundle"]
path = vendor/packages/clojure.tmbundle
url = https://github.com/mmcgrana/textmate-clojure
[submodule "prebuilt-cef"]
path = prebuilt-cef
url = https://github.com/github/prebuilt-cef
[submodule "vendor/packages/yaml.tmbundle"]
path = vendor/packages/yaml.tmbundle
url = https://github.com/textmate/yaml.tmbundle.git
[submodule "vendor/packages/java.tmbundle"]
path = vendor/packages/java.tmbundle
url = https://github.com/textmate/java.tmbundle.git
[submodule "vendor/packages/php.tmbundle"]
path = vendor/packages/php.tmbundle
url = https://github.com/textmate/php.tmbundle.git
[submodule "vendor/packages/perl.tmbundle"]
path = vendor/packages/perl.tmbundle
url = https://github.com/textmate/perl.tmbundle.git
[submodule "vendor/packages/sass.tmbundle"]
path = vendor/packages/sass.tmbundle
url = https://github.com/alexsancho/SASS.tmbundle.git
[submodule "vendor/packages/less.tmbundle"]
path = vendor/packages/less.tmbundle
url = https://github.com/mathewbyrne/less.tmbundle.git
[submodule "vendor/packages/mustache.tmbundle"]
path = vendor/packages/mustache.tmbundle
url = https://github.com/kevinsawicki/Mustache.tmbundle.git
[submodule "vendor/packages/go.tmbundle"]
path = vendor/packages/go.tmbundle
url = https://github.com/rsms/Go.tmbundle
[submodule "vendor/bootstrap"]
path = vendor/bootstrap
url = https://github.com/twitter/bootstrap
[submodule "vendor/packages/pegjs.tmbundle"]
path = vendor/packages/pegjs.tmbundle
url = https://github.com/alexstrat/PEGjs.tmbundle
[submodule "vendor/packages/sql.tmbundle"]
path = vendor/packages/sql.tmbundle
url = https://github.com/textmate/sql.tmbundle
[submodule "vendor/packages/hyperlink-helper.tmbundle"]
path = vendor/packages/hyperlink-helper.tmbundle
url = https://github.com/textmate/hyperlink-helper.tmbundle
[submodule "vendor/apm"]
path = vendor/apm
url = https://github.com/github/apm.git
[submodule "vendor/telepath"]
path = vendor/telepath
url = https://github.com/github/telepath.git
+1 -1
Ver Arquivo
@@ -1,4 +1,4 @@
tags
node_modules
vendor/packages
docs/api
.git
+1 -1
Ver Arquivo
@@ -6,7 +6,7 @@ pairs:
jc: Jerry Cheung; jerry
bl: Brian Lopez; brian
jp: Justin Palmer; justin
gt: Garen Torikian; garen
email:
domain: github.com
#global: true
+34
Ver Arquivo
@@ -1,3 +1,37 @@
* Fixed: Atom can now be launched when ~/.atom/config.cson doesn't exist
* Added: Initial collaboration sessions
* Fixed: Empty lines being deleted via uppercase/downcase command
* Fixed: Keybindings not working when using non-English keyboard language
* Fixed: cmd-shift-p and cmd-alt-w not doing anything when pressed
* Improved: Use grunt (instead of rake) for build system
* Fixed: Java files not syntax highlighting correctly.
* Fixed: LESS/CSS now indents properly after hitting enter.
* Added: Support for browsing .tar.gz and .zip files in the editor
* Added: TODO/FIXME/CHANGED are now highlighted in comments.
* Fixed: Full screen state of windows is now persisted across restarts.
* Added: Makefile syntax highlighting now included.
* Added: Open fuzzy finder to specific line using colon suffix (i.e ':25')
* Fixed: Issues deleting and moving over certain UTF-8 characters
* Fixed: Tree view not properly highlighting or revealing for open images.
* Added: Packages can now be installed from the configuration UI.
* Fixed: .git folder now ignored by default when searching
* Fixed: Not being able to disable packages from configuration UI.
* Fixed: Fuzzy finder showing poor results for entered text
* Improved: App icon
* Fixed: Fuzzy finder being empty sometimes
* Improved: App icon
* Fixed: End of line invisibles rendering incorrectly with the indent guide
* Fixed: Updates not installing automatically on restart
* Fixed: Wrap guide not displaying
* Fixed: Error when saving with the markdown preview focused
* Fixed: Atom always running in dev mode
* Fixed: Crash when running in dev mode without a path to the Atom source
* Fixed: Freeze when editing a RoR class
* Added: meta-N to open a new untitled editor in the current window
+6 -1
Ver Arquivo
@@ -18,6 +18,11 @@
* Style new elements in both the light and dark default themes when
appropriate
* New packages go in `src/packages/`
* Add 3rd-party packages by submoduling in `vendor/packages/`
* Add 3rd-party packages as a `package.json` dependency
* Commit messages are in the present tense
* Files end with a newline
* Class variables and methods should be in the following order:
* Class variables (variables starting with a `@`)
* Class methods (methods starting with a `@`)
* Instance variables
* Instance methods
+117
Ver Arquivo
@@ -0,0 +1,117 @@
path = require 'path'
module.exports = (grunt) ->
appName = 'Atom.app'
buildDir = grunt.option('build-dir') ? '/tmp/atom-build'
shellAppDir = path.join(buildDir, appName)
contentsDir = path.join(shellAppDir, 'Contents')
appDir = path.join(contentsDir, 'Resources', 'app')
installDir = path.join('/Applications', appName)
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
atom: {appDir, appName, buildDir, contentsDir, installDir, shellAppDir}
coffee:
options:
sourceMap: true
glob_to_multiple:
expand: true
src: [
'src/**/*.coffee'
'static/**/*.coffee'
]
dest: appDir
ext: '.js'
less:
options:
paths: [
'static'
'vendor'
]
glob_to_multiple:
expand: true
src: [
'src/**/*.less'
'static/**/*.less'
'themes/**/*.less'
]
dest: appDir
ext: '.css'
cson:
options:
rootObject: true
glob_to_multiple:
expand: true
src: [
'src/**/*.cson'
'static/**/*.cson'
'themes/**/*.cson'
]
dest: appDir
ext: '.json'
coffeelint:
options:
no_empty_param_list:
level: 'error'
max_line_length:
level: 'ignore'
src: [
'dot-atom/**/*.coffee'
'src/**/*.coffee'
]
test: [
'spec/*.coffee'
'spec/app/**/*.coffee'
'spec/stdlib/**/*.coffee'
]
csslint:
options:
'adjoining-classes': false
'box-model': false
'box-sizing': false
'bulletproof-font-face': false
'compatible-vendor-prefixes': false
'fallback-colors': false
'font-sizes': false
'gradients': false
'ids': false
'important': false
'known-properties': false
'outline-none': false
'overqualified-elements': false
'qualified-headings': false
'unique-headings': false
'universal-selector': false
'vendor-prefix': false
src: [
'src/**/*.css',
'static/**/*.css'
'themes/**/*.css'
]
lesslint:
src: [
'src/**/*.less',
'static/**/*.less'
'themes/**/*.less'
]
grunt.loadNpmTasks('grunt-coffeelint')
grunt.loadNpmTasks('grunt-lesslint')
grunt.loadNpmTasks('grunt-cson')
grunt.loadNpmTasks('grunt-contrib-csslint')
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-contrib-less')
grunt.loadTasks('tasks')
grunt.registerTask('compile', ['coffee', 'less', 'cson'])
grunt.registerTask('lint', ['coffeelint', 'csslint', 'lesslint'])
grunt.registerTask('ci', ['lint', 'partial-clean', 'update-atom-shell', 'build', 'test'])
grunt.registerTask('deploy', ['partial-clean', 'update-atom-shell', 'build', 'codesign'])
grunt.registerTask('default', ['update-atom-shell', 'build', 'set-development-version', 'install'])
+12 -5
Ver Arquivo
@@ -1,19 +1,26 @@
# Atom — Futuristic Text Editing
![atom](https://f.cloud.github.com/assets/1300064/208230/4cefbca4-821a-11e2-8139-92c0328abf68.png)
![atom](https://s3.amazonaws.com/speakeasy/apps/icons/27/medium/7db16e44-ba57-11e2-8c6f-981faf658e00.png)
Check out our [documentation on the docs tab](https://github.com/github/atom/docs).
## Building from source
## Installing
Download the latest Atom release from [speakeasy](https://speakeasy.githubapp.com/apps/27).
It will automatically update when a new release is available.
## Building
### Requirements
* Mountain Lion
* The Setup™ or Boxen
* Xcode (available in the App Store)
* Boxen (Obviously Atom won't release with this requirement)
### Installation
1. `gh-setup atom`
2. `cd ~/github/atom && rake install`
2. `cd ~/github/atom`
3. `script/build`
+9 -147
Ver Arquivo
@@ -1,149 +1,11 @@
ATOM_SRC_PATH = File.dirname(__FILE__)
BUILD_DIR = '/tmp/atom-build'
rule "" do |t|
puts <<-HELP
Atom now uses grunt instead of Rake.
See https://github.com/github/atom/pull/596 for more info.
desc "Build Atom via `xcodebuild`"
task :build => "create-xcode-project" do
command = "xcodebuild -target Atom SYMROOT=#{BUILD_DIR}"
output = `#{command}`
if $?.exitstatus != 0
$stderr.puts "Error #{$?.exitstatus}:\n#{output}"
exit($?.exitstatus)
end
end
desc "Create xcode project from gyp file"
task "create-xcode-project" => ["update-cef", "update-node"] do
`rm -rf atom.xcodeproj`
`script/generate-sources-gypi`
version = %{-D version="#{ENV['VERSION']}"} if ENV['VERSION']
code_sign = %{-D code_sign="#{ENV['CODE_SIGN']}"} if ENV['CODE_SIGN']
`gyp --depth=. #{code_sign} #{version} atom.gyp`
end
desc "Update CEF to the latest version specified by the prebuilt-cef submodule"
task "update-cef" => "bootstrap" do
exit 1 unless system %{script/update-cefode}
Dir.glob('cef/*.gypi').each do |filename|
`sed -i '' -e "s/'include\\//'cef\\/include\\//" -e "s/'libcef_dll\\//'cef\\/libcef_dll\\//" #{filename}`
end
end
desc "Download node binary"
task "update-node" do
`script/update-node v0.10.3`
end
desc "Download debug symbols for CEF"
task "download-cef-symbols" => "update-cef" do
sh %{script/update-cefode -s}
end
task "bootstrap" do
`script/bootstrap`
end
desc "Copies Atom.app to /Applications and creates `atom` cli app"
task :install => [:build] do
path = application_path()
exit 1 if not path
# Install Atom.app
dest_path = "/Applications/#{File.basename(path)}"
`rm -rf #{dest_path}`
`cp -a #{path} #{File.expand_path(dest_path)}`
# Install atom cli
if File.directory?("/opt/boxen")
cli_path = "/opt/boxen/bin/atom"
elsif File.directory?("/opt/github")
cli_path = "/opt/github/bin/atom"
elsif File.directory?("/usr/local")
cli_path = "/usr/local/bin/atom"
else
raise "Missing directory for `atom` binary"
end
FileUtils.cp("#{ATOM_SRC_PATH}/atom.sh", cli_path)
FileUtils.chmod(0755, cli_path)
Rake::Task["clone-default-bundles"].invoke()
puts "\033[32mAtom is installed at `#{dest_path}`. Atom cli is installed at `#{cli_path}`\033[0m"
end
task "setup-codesigning" do
ENV['CODE_SIGN'] = "Developer ID Application: GitHub"
end
desc "Clone default bundles into vendor/bundles directory"
task "clone-default-bundles" do
`git submodule --quiet sync`
`git submodule --quiet update --recursive --init`
end
desc "Clean build Atom via `xcodebuild`"
task :clean do
output = `xcodebuild clean`
`rm -rf #{application_path()}`
`rm -rf #{BUILD_DIR}`
`rm -rf /tmp/atom-coffee-cache`
`rm -rf node_modules`
`rm -rf cef`
end
desc "Run the specs"
task :test => ["update-cef", "clone-default-bundles", "build"] do
`pkill Atom`
if path = application_path()
cmd = "#{path}/Contents/MacOS/Atom --test --resource-path=#{ATOM_SRC_PATH}"
system(cmd)
exit($?.exitstatus)
else
exit(1)
end
end
desc "Run the benchmarks"
task :benchmark do
Rake::Task["run"].invoke("--benchmark")
end
task :nof do
system %{find . -name *spec.coffee | grep --invert-match --regexp "#{BUILD_DIR}\\|__package-name__" | xargs sed -E -i "" "s/f+(it|describe) +(['\\"])/\\1 \\2/g"}
end
task :tags do
system %{find src native cef vendor -not -name "*spec.coffee" -type f -print0 | xargs -0 ctags}
end
namespace :docs do
namespace :app do
desc "Builds the API docs in src/app"
task :build do
system %{./node_modules/coffee-script/bin/coffee ./node_modules/biscotto/bin/biscotto -- -o docs/api src/app/}
end
desc "Lists the stats for API doc coverage in src/app"
task :stats do
system %{./node_modules/coffee-script/bin/coffee ./node_modules/biscotto/bin/biscotto -- --statsOnly src/app/}
end
desc "Show which docs are missing"
task :missing do
system %{./node_modules/coffee-script/bin/coffee ./node_modules/biscotto/bin/biscotto -- --listMissing src/app/}
end
end
end
def application_path
applications = FileList["#{BUILD_DIR}/**/Atom.app"]
if applications.size == 0
$stderr.puts "No Atom application found in directory `#{BUILD_DIR}`"
elsif applications.size > 1
$stderr.puts "Multiple Atom applications found \n\t" + applications.join("\n\t")
else
return applications.first
end
return nil
tl;dr
-----
Run ./script/build instead of rake install.
HELP
end
Arquivo executável
+2
Ver Arquivo
@@ -0,0 +1,2 @@
coffee -c -o /Applications/Atom.app/Contents/Resources/app/src/ src/main.coffee src/atom-application.coffee src/atom-window.coffee &&
/Applications/Atom.app/Contents/MacOS/Atom --resource-path=$(pwd) --executed-from=$(pwd) $@
+3 -415
Ver Arquivo
@@ -1,426 +1,14 @@
{
'variables': {
'pkg-config': 'pkg-config',
'chromium_code': 1,
'version%': "<!(git rev-parse --short HEAD)",
'code_sign%': 0,
'use_aura%': 0,
'conditions': [
['OS=="win"', {
'os_posix': 0,
}, {
'os_posix': 1,
}],
# Set toolkit_uses_gtk for the Chromium browser on Linux.
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', {
'toolkit_uses_gtk%': 1,
}, {
'toolkit_uses_gtk%': 0,
}],
],
'fix_framework_link_command': [
'install_name_tool',
'-change',
'@executable_path/libcef.dylib',
'@rpath/Chromium Embedded Framework.framework/Libraries/libcef.dylib',
'-change',
'@loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle',
'@rpath/Sparkle.framework/Versions/A/Sparkle',
'-change',
'@executable_path/../Frameworks/Quincy.framework/Versions/A/Quincy',
'@rpath/Quincy.framework/Versions/A/Quincy',
'${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
],
},
'includes': [
'cef/cef_paths2.gypi',
'sources.gypi',
],
'target_defaults': {
'default_configuration': 'Release',
'configurations': {
'Debug': {
'defines': ['DEBUG=1'],
'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL' : '0' },
},
'Release': {
},
},
'xcode_settings': {
'VERSION': "<(version)",
'CLANG_CXX_LANGUAGE_STANDARD' : 'c++0x',
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
'COMBINE_HIDPI_IMAGES': 'YES', # Removes 'Validate Project Settings' warning
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES' # Removes 'Reference to global weak symbol vtable' warning
},
},
'targets': [
{
'target_name': 'Atom',
'type': 'executable',
'mac_bundle': 1,
'msvs_guid': 'D22C6F51-AA2D-457C-B579-6C97A96C724D',
'dependencies': [
'atom_framework',
],
'mac_framework_dirs': [ 'native/frameworks' ],
'sources': [
'native/main.cpp',
],
'mac_bundle_resources': [
'native/mac/atom.icns',
'native/mac/file.icns',
'native/mac/speakeasy.pem',
],
'xcode_settings': {
'INFOPLIST_FILE': 'native/mac/Atom-Info.plist',
'LD_RUNPATH_SEARCH_PATHS': '@executable_path/../Frameworks',
},
'conditions': [
['code_sign' , {
'xcode_settings': {'CODE_SIGN_IDENTITY': "<(code_sign)"},
}],
['OS=="win" and win_use_allocator_shim==1', {
'dependencies': [
'<(DEPTH)/base/allocator/allocator.gyp:allocator',
],
}],
['OS=="win"', {
'configurations': {
'Debug_Base': {
'msvs_settings': {
'VCLinkerTool': {
'LinkIncremental': '<(msvs_large_module_debug_link_mode)',
},
},
},
},
'msvs_settings': {
'VCLinkerTool': {
# Set /SUBSYSTEM:WINDOWS.
'SubSystem': '2',
'EntryPointSymbol' : 'wWinMainCRTStartup',
},
},
'link_settings': {
'libraries': [
'-lcomctl32.lib',
'-lshlwapi.lib',
'-lrpcrt4.lib',
],
},
'sources': [
'<@(includes_win)',
],
}],
['OS == "win" or (toolkit_uses_gtk == 1 and selinux == 0)', {
'dependencies': [
'<(DEPTH)/sandbox/sandbox.gyp:sandbox',
],
}],
['toolkit_uses_gtk == 1', {
'dependencies': [
'<(DEPTH)/build/linux/system.gyp:gtk',
],
}],
[ 'OS=="mac"', {
'product_name': 'Atom',
'dependencies': [
'AtomHelperApp',
],
'copies': [
{
'destination': '<(PRODUCT_DIR)/Atom.app/Contents/Frameworks/Chromium Embedded Framework.framework/Libraries/',
'files': [
'cef/Release/libcef.dylib',
'cef/Release/ffmpegsumo.so',
],
},
{
'destination': '<(PRODUCT_DIR)/Atom.app/Contents/Frameworks',
'files': [
'<(PRODUCT_DIR)/Atom Helper.app',
'<(PRODUCT_DIR)/Atom.framework',
'native/frameworks/Sparkle.framework',
'native/frameworks/Quincy.framework'
],
},
{
'destination': '<(PRODUCT_DIR)/Atom.app/Contents/Frameworks/Chromium Embedded Framework.framework',
'files': [
'cef/Resources',
],
},
{
# Copy node binary for worker process support.
'destination': '<(PRODUCT_DIR)/Atom.app/Contents/Resources',
'files': [
'node/node',
],
},
],
'postbuilds': [
{
'postbuild_name': 'Fix Framework Link',
'action': [
'<@(fix_framework_link_command)',
],
},
{
# This postbuid step is responsible for creating the following
# helpers:
#
# Atom Helper EH.app and Atom Helper NP.app are created
# from Atom Helper.app.
#
# The EH helper is marked for an executable heap. The NP helper
# is marked for no PIE (ASLR).
'postbuild_name': 'Make More Helpers',
'action': [
'script/make_more_helpers.sh',
'Frameworks',
'Atom',
],
},
{
'postbuild_name': 'Print env for Constructicon',
'action': [
'env',
],
},
],
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
],
},
'sources': [
'cef/include/cef_application_mac.h',
'cef/include/internal/cef_mac.h',
'cef/include/internal/cef_types_mac.h',
],
}],
[ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
'sources': [
'<@(includes_linux)',
],
'copies': [
{
'destination': '<(PRODUCT_DIR)/files',
'files': [
'<@(cefclient_bundle_resources_linux)',
],
},
],
}],
],
},
{
'target_name': 'atom_framework',
'product_name': 'Atom',
'type': 'shared_library',
'mac_bundle': 1,
'dependencies': [
'generated_sources',
'libcef_dll_wrapper',
],
'defines': [
'USING_CEF_SHARED',
],
'xcode_settings': {
'INFOPLIST_FILE': 'native/mac/framework-info.plist',
'LD_DYLIB_INSTALL_NAME': '@rpath/Atom.framework/Atom',
},
'include_dirs': [ '.', 'cef' ],
'mac_framework_dirs': [ 'native/frameworks' ],
'sources': [
'<@(includes_common)',
'<@(includes_wrapper)',
'native/atom_application.h',
'native/atom_application.mm',
'native/atom_cef_app.h',
'native/atom_cef_app.h',
'native/atom_cef_client.cpp',
'native/atom_cef_client.h',
'native/atom_cef_client_mac.mm',
'native/atom_cef_render_process_handler.h',
'native/atom_cef_render_process_handler.mm',
'native/atom_window_controller.h',
'native/atom_window_controller.mm',
'native/atom_main.h',
'native/atom_main_mac.mm',
'native/message_translation.cpp',
'native/message_translation.cpp',
'native/message_translation.h',
'native/message_translation.h',
'native/v8_extensions/atom.h',
'native/v8_extensions/atom.mm',
'native/v8_extensions/native.h',
'native/v8_extensions/native.mm',
],
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
'native/frameworks/Sparkle.framework',
'native/frameworks/Quincy.framework',
],
},
'mac_bundle_resources': [
'native/mac/English.lproj/AtomWindow.xib',
'native/mac/English.lproj/MainMenu.xib',
],
'conditions': [
['code_sign', {
'defines': [
'CODE_SIGNING_ENABLED=1',
],
}],
],
'type': 'none',
'postbuilds': [
{
'postbuild_name': 'Copy Static Files',
'action': [
'script/copy-files-to-bundle',
'<(compiled_sources_dir_xcode)',
],
},
{
'postbuild_name': 'Fix Framework Link',
'action': [
'<@(fix_framework_link_command)',
],
'postbuild_name': 'Create Atom, basically do everything',
'action': ['script/constructicon/build'],
},
],
},
{
'target_name': 'libcef_dll_wrapper',
'type': 'static_library',
'msvs_guid': 'A9D6DC71-C0DC-4549-AEA0-3B15B44E86A9',
'dependencies': [
],
'defines': [
'USING_CEF_SHARED',
],
'include_dirs': [ '.', 'cef' ],
'sources': [
'<@(includes_common)',
'<@(includes_capi)',
'<@(includes_wrapper)',
'<@(libcef_dll_wrapper_sources_common)',
],
'link_settings': {
'libraries': [
'cef/Release/libcef.dylib',
],
}
},
{
'target_name': 'generated_sources',
'type': 'none',
'sources': [
'<@(coffee_sources)',
'<@(cson_sources)',
'<@(less_sources)'
],
'rules': [
{
'rule_name': 'coffee',
'extension': 'coffee',
'inputs': [
'script/compile-coffee',
],
'outputs': [
'<(compiled_sources_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).js',
],
'action': [
'sh',
'script/compile-coffee',
'<(RULE_INPUT_PATH)',
'<(compiled_sources_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).js',
],
},
{
'rule_name': 'cson2json',
'extension': 'cson',
'inputs': [
'script/compile-cson',
],
'outputs': [
'<(compiled_sources_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).json',
],
'action': [
'sh',
'script/compile-cson',
'<(RULE_INPUT_PATH)',
'<(compiled_sources_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).json',
],
},
{
'rule_name': 'less',
'extension': 'less',
'inputs': [
'script/compile-less',
],
'outputs': [
'<(compiled_sources_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).css',
],
'action': [
'sh',
'script/compile-less',
'<(RULE_INPUT_PATH)',
'<(compiled_sources_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).css',
],
},
],
},
],
'conditions': [
['os_posix==1 and OS!="mac" and OS!="android" and gcc_version==46', {
'target_defaults': {
# Disable warnings about c++0x compatibility, as some names (such
# as nullptr) conflict with upcoming c++0x types.
'cflags_cc': ['-Wno-c++0x-compat'],
},
}],
['OS=="mac"', {
'targets': [
{
'target_name': 'AtomHelperApp',
'type': 'executable',
'variables': { 'enable_wexit_time_destructors': 1, },
'product_name': 'Atom Helper',
'mac_bundle': 1,
'dependencies': [
'atom_framework',
],
'defines': [
'USING_CEF_SHARED',
'PROCESS_HELPER_APP',
],
'mac_framework_dirs': [ 'native/frameworks' ],
'sources': [
'native/main.cpp',
],
# TODO(mark): For now, don't put any resources into this app. Its
# resources directory will be a symbolic link to the browser app's
# resources directory.
'mac_bundle_resources/': [
['exclude', '.*'],
],
'xcode_settings': {
'INFOPLIST_FILE': 'native/mac/helper-info.plist',
'LD_RUNPATH_SEARCH_PATHS': '@executable_path/../../..',
},
'postbuilds': [
{
'postbuild_name': 'Fix Framework Link',
'action': [
'<@(fix_framework_link_command)',
],
},
],
}, # target cefclient_helper_app
],
}], # OS=="mac"
],
}
Arquivo normal → Arquivo executável
Ver Arquivo
+1 -1
Ver Arquivo
@@ -56,7 +56,7 @@ window.benchmark = (args...) ->
report = "#{fullname}: #{total} / #{count} = #{avg}ms"
console.log(report)
if atom.exitWhenDone
if atom.getLoadSettings().exitWhenDone
url = "https://github.com/_stats"
data = [type: 'timing', metric: "atom.#{fullname}", ms: avg]
$.ajax url,
+1 -1
Ver Arquivo
@@ -106,7 +106,7 @@ describe "TokenizedBuffer.", ->
[languageMode, buffer] = []
beforeEach ->
editSession = benchmarkFixturesProject.buildEditSession('medium.coffee')
editSession = benchmarkFixturesProject.open('medium.coffee')
{ languageMode, buffer } = editSession
benchmark "construction", 20, ->
-133
Ver Arquivo
@@ -1,133 +0,0 @@
# Authoring Packages
A package can contain a variety of different resource types to change Atom's
behavior. The basic package layout is as follows (not every package will
have all of these directories):
```text
my-package/
lib/
config/
stylesheets/
keymaps/
snippets/
grammars/
package.json
index.coffee
```
**NOTE:** NPM behavior is partially implemented until we get a working Node.js
API built into Atom. The goal is to make Atom packages be a superset of NPM
packages
## package.json
Similar to npm packages, Atom packages can contain a `package.json` file in their
top-level directory. This file contains metadata about the package, such as the
path to its "main" module, library dependencies, and manifests specifying the
order in which its resources should be loaded.
## Source Code
If you want to extend Atom's behavior, your package should contain a single
top-level module, which you export from `index.coffee` or another file as
indicated by the `main` key in your `package.json` file. The remainder of your
code should be placed in the `lib` directory, and required from your top-level
file.
Your package's top-level module is a singleton object that manages the lifecycle
of your extensions to Atom. Even if your package creates ten different views and
appends them to different parts of the DOM, it's all managed from your top-level
object. Your package's top-level module should implement the following methods:
- `activate(rootView, state)` **Required**: This method is called when your
package is loaded. It is always passed the window's global `rootView`, and is
sometimes passed state data if the window has been reloaded and your module
implements the `serialize` method.
- `serialize()` **Optional**: This method is called when the window is shutting
down, allowing you to return JSON to represent the state of your component. When
the window is later restored, the data you returned will be passed to your
module's `activate` method so you can restore your view to where the user left
off.
- `deactivate()` **Optional**: This method is called when the window is shutting
down. If your package is watching any files or holding external resources in any
other way, release them here. If you're just subscribing to things on window
you don't need to worry because that's getting torn down anyway.
## A Simple Package Layout:
```text
my-package/
package.json # optional
index.coffee
lib/
my-package.coffee
```
`index.coffee`:
```coffeescript
module.exports = require "./lib/my-package"
```
`my-package/my-package.coffee`:
```coffeescript
module.exports =
activate: (rootView, state) -> # ...
deactivate: -> # ...
serialize: -> # ...
```
Beyond this simple contract, your package has full access to Atom's internal
API. Anything we call internally, you can call as well. Be aware that since we
are early in development, APIs are subject to change and we have not yet
established clear boundaries between what is public and what is private. Also,
Please collaborate with us if you need an API that doesn't exist. Our goal is
to build out Atom's API organically based on the needs of package authors like
you. See [Atom's built-in packages](https://github.com/github/atom/tree/master/src/packages)
for examples of Atom's API in action.
## Stylesheets
Stylesheets for your package should be placed in the `stylesheets` directory.
Any stylesheets in this directory will be loaded and attached to the DOM when
your package is activated. An optional `stylesheets` key in your `package.json`
can list the stylesheets by name in order to specify a load order; otherwise
stylesheets are loaded alphabetically.
## Keymaps
Keymaps are placed in the `keymaps` subdirectory. By default, all keymaps will be
loaded in alphabetical order unless there is a `keymaps` array in `package.json`
specifying which keymaps to load and in what order. It's a good idea to provide
default keymaps for your extension. They can be customized by users later. See
the (main keymaps documentation)[#keymaps] for more information on how keymaps
work.
## Snippets
An extension can supply snippets in a `snippets` directory as `.cson` or `.json`
files:
```coffeescript
".source.coffee .specs":
"Expect":
prefix: "ex"
body: "expect($1).to$2"
"Describe":
prefix: "de"
body: """
describe "${1:description}", ->
${2:body}
"""
```
A snippets file contains scope selectors at its top level. Each scope selector
contains a hash of snippets keyed by their name. Each snippet specifies a
`prefix` and a `body` key.
All files in the directory will be automatically loaded, unless the
`package.json` supplies a `snippets` key as a manifest. As with all scoped
items, snippets loaded later take precedence over earlier snippets when two
snippets match a scope with the same specificity.
+12 -8
Ver Arquivo
@@ -1,22 +1,26 @@
## Command Panel
A partial implementation of the [Sam command language](http://man.cat-v.org/plan_9/1/sam)
The command panel contains a partial implementation of the [Sam command language](http://man.cat-v.org/plan_9/1/sam).
In addition, packages are free to design and define any scoped command.
*Examples*
Pop open the command line by hitting .
You can get a list of commands available to Atom (including any keybindings) by hitting `meta-p`.
`,` selects entire file
## Examples
`1,4` selects lines 1-4
`,` selects the entire file
`1,4` selects lines 1-4 in the current file
`/pattern` selects the first match after the cursor/selection
`s/pattern/replacement` replace first text matching pattern in current selection
`s/pattern/replacement` replaces the first text matching pattern in current selection
`s/pattern/replacement/g` replace all text matching pattern in current selection
`s/pattern/replacement/g` replaces all text matching pattern in current selection
`,s/pattern/replacement/g` replace all text matching pattern in file
`,s/pattern/replacement/g` replaces all text matching pattern in file
`1,4s/pattern/replacement` replace all text matching pattern in lines 1-4
`1,4s/pattern/replacement` replaces all text matching pattern in lines 1-4
`x/pattern` selects all matches in the current selections
+4 -5
Ver Arquivo
@@ -1,17 +1,16 @@
## Wrap Guide
The `wrap-guide` extension places a vertical line in each editor at a certain
column to guide your formatting so lines do not exceed a certain width.
column to guide your formatting, so lines do not exceed a certain width.
By default the wrap-guide is placed at the 80th column.
By default, the wrap-guide is placed at the 80th column.
### Configuration
You can customize where the column is placed using the `wrapGuide.columns`
config option.
config option:
config.cson:
```coffee-cript
```coffeescript
"wrap-guide":
columns: [
{ pattern: "\.mm$", column: 200 },
+138
Ver Arquivo
@@ -0,0 +1,138 @@
# Configuration Settings
## Your .atom Directory
When you install Atom, an _.atom_ directory is created in your home directory.
If you press `meta-,`, that directory is opened in a new window. For the
time being, this serves as the primary interface for adjusting configuration
settings, adding and changing key bindings, tweaking styles, etc.
Atom loads configuration settings from the `config.cson` file in your _~/.atom_
directory, which contains CoffeeScript-style JSON:
```coffeescript
core:
hideGitIgnoredFiles: true
editor:
fontSize: 18
```
Configuration is broken into namespaces, which are defined by the config hash's
top-level keys. In addition to Atom's core components, each package may define
its own namespace.
## Glossary of Config Keys
- `core`
- `disablePackages`: An array of package names to disable
- `hideGitIgnoredFiles`: Whether files in the _.gitignore_ should be hidden
- `ignoredNames`: File names to ignore across all of Atom (not fully implemented)
- `themes`: An array of theme names to load, in cascading order
- `autosave`: Save a buffer when its view loses focus
- `editor`
- `autoIndent`: Enable/disable basic auto-indent (defaults to `true`)
- `autoIndentOnPaste`: Enable/disable auto-indented pasted text (defaults to `false`)
- `nonWordCharacters`: A string of non-word characters to define word boundaries
- `fontSize`: The editor font size
- `fontFamily`: The editor font family
- `invisibles`: Specify characters that Atom renders for invisibles in this hash
- `tab`: Hard tab characters
- `cr`: Carriage return (for Microsoft-style line endings)
- `eol`: `\n` characters
- `space`: Leading and trailing space characters
- `preferredLineLength`: Identifies the length of a line (defaults to `80`)
- `showInvisibles`: Whether to render placeholders for invisible characters (defaults to `false`)
- `fuzzyFinder`
- `ignoredNames`: Files to ignore *only* in the fuzzy-finder
- `whitespace`
- `ensureSingleTrailingNewline`: Whether to reduce multiple newlines to one at the end of files
- `wrapGuide`
- `columns`: Array of hashes with a `pattern` and `column` key to match the
the path of the current editor to a column position.
## Customizing Key Bindings
Atom keymaps work similarly to stylesheets. Just as stylesheets use selectors
to apply styles to elements, Atom keymaps use selectors to associate keystrokes
with events in specific contexts. Here's a small example, excerpted from Atom's
built-in keymaps:
```coffee-script
'.editor':
'enter': 'editor:newline'
".select-list .editor.mini":
'enter': 'core:confirm',
```
This keymap defines the meaning of `enter` in two different contexts. In a
normal editor, pressing `enter` emits the `editor:newline` event, which causes
the editor to insert a newline. But if the same keystroke occurs inside of a
select list's mini-editor, it instead emits the `core:confirm` event based on
the binding in the more-specific selector.
By default, any keymap files in your `~/.atom/keymaps` directory are loaded
in alphabetical order when Atom is started. They will always be loaded last,
giving you the chance to override bindings that are defined by Atom's core
keymaps or third-party packages.
## Changing The Theme
Atom comes bundled with two themes `atom-dark-*` and `atom-light-*`.
Because Atom themes are based on CSS, it's possible to have multiple themes
active at the same time. For example, you'll usually select a theme for the UI
and another theme for syntax highlighting. You can select themes by specifying
them in the `core.themes` array in your `config.cson`:
```coffee-script
core:
themes: ["atom-light-ui", "atom-light-syntax"]
# or, if the sun is going down:
# themes: ["atom-dark-ui", "atom-dark-syntax"]
```
You install new themes by placing them in the _~/.atom/themes_ directory. A
theme can be a CSS file, a directory containing multiple CSS files, or a
TextMate theme (either _.tmTheme_ or _.plist_).
## Installing Packages (Partially Implemented)
To install a package, clone it into the _~/.atom/packages_ directory. Atom will
also load grammars and snippets from TextMate bundles. If you want to disable a
package without removing it from the packages directory, insert its name into
_config.core.disabledPackages_:
```coffeescript
core:
disabledPackages: [
"fuzzy-finder",
"tree-view"
]
```
## Quick Personal Hacks
### user.coffee
When Atom finishes loading, it will evaluate _user.coffee_ in your _~/.atom_
directory, giving you a chance to run arbitrary personal CoffeeScript code to
make customizations. You have full access to Atom's API from code in this file.
Please refer to the [Atom Internals Guide](./internals/intro,md) for more information. If your
customizations become extensive, consider [creating a package](./packages/creating_packages.md).
### user.css
If you want to apply quick-and-dirty personal styling changes without creating
an entire theme that you intend to distribute, you can add styles to
_user.css_ in your _~/.atom_ directory.
For example, to change the color of the highlighted line number for the line that
contains the cursor, you could add the following style to _user.css_:
```css
.editor .line-number.cursor-line {
color: pink;
}
```
+40 -35
Ver Arquivo
@@ -1,36 +1,37 @@
# Getting Started
Welcome to Atom. This documentation is intended to offer a basic introduction
of how to get productive with this editor. Then we'll delve into more details
about configuring, theming, and extending Atom.
Welcome to Atom. This documentation provides a basic introduction to being
productive with this editor. We'll then delve into more details about configuring,
theming, and extending Atom.
## The Command Palette
If there's one key-command you learn in Atom, it should be `meta-p` (`meta` is
If there's one key-command you must remember in Atom, it should be `meta-p` (`meta` is
synonymous with the ⌘ key). You can always hit `meta-p` to bring up a list of
commands that are relevant to the currently focused UI element. If there is a
key binding for a given command, it is also displayed. This is a great way to
explore the system and get to know the key commands interactively. If you'd like
to add or change a binding for a command, refer to the [key
bindings](#customizing-key-bindings) section to learn how.
to learn about adding or changing a binding for a command, refer to the [key
bindings](#customizing-key-bindings) section.
![Command Palette](http://f.cl.ly/items/32041o3w471F3C0F0V2O/Screen%20Shot%202013-02-13%20at%207.27.41%20PM.png)
## Basic Key Bindings
Remember you can always use `meta-p` to explore available commands and their
You can always use `meta-p` to explore available commands and their
bindings, but here's a list of a few useful commands.
- `meta-o` : open file/directory
- `meta-n` : new window
- `meta-o` : open a file or directory
- `meta-n` : open new window
- `meta-r` : reload the current window
- `meta-alt-ctrl-s` : run specs
- `meta-t` : open fuzzy file finder
- `meta-alt-ctrl-s` : run test specs
- `meta-t` : open file finder to navigate files in your project
- `meta-;` : open command prompt
- `meta-f` : open command prompt with `/`
- `meta-f` : open command prompt with `/` for a local file search
- `meta-g` : repeat the last local search
- `meta-shift-f` : open command prompt with `Xx/` for a project-wide search
- `meta-\` : focus/open tree view, or close it when it is focused
- `meta-shift-\` : open tree view with the current file selected
- `meta-|` : open tree view with the current file selected
- `ctrl-w v`, `ctrl-|` : split screen vertically
- `ctrl-w s`, `ctrl--` : split screen horizontally
- `meta-l` : go to line
@@ -52,8 +53,8 @@ issue so you can keep working.
The fastest way to find a file in your project is to use the fuzzy finder. Just
hit `meta-t` and start typing the name of the file you're looking for. If you
already have the file open and want to jump to it, hit `meta-b` to bring up a
searchable list of open buffers.
already have the file open as a tab and want to jump to it, hit `meta-b` to bring
up a searchable list of open buffers.
You can also use the tree view to navigate to a file. To open or move focus to
the tree view, hit `meta-\`. You can then navigate to a file and select it with
@@ -73,28 +74,32 @@ To delete a file, select it in the tree view and hit `delete`.
#### Using the Command Line
Atom has a command line similar to editors Emacs and Vim, which is currently the
only interface for performing searches. Hitting `meta-f` will open the command
line prepopulated with the `/` command, which finds forward in the current
buffer from the location of the cursor. Pressing `meta-g` will repeat the
search. Hitting `meta-shift-f` will open the command line prepopulated with
`Xx/`, which is a composite command that performs a global search. The results
of the search will appear in the operation preview list, which you can focus
Atom has a command line similar to old-school editors such as emacs and vim. Nearly
every command has a key binding which you can discover with `meta-p`.
The command line is also (currently) the only place you can perform a search. Hitting
`meta-f` opens the command line and prepopulates it with the `/` command. This finds
text in the current buffer, starting at the location of the cursor. Pressing `meta-g`
repeats the search. Hitting `meta-shift-f` opens the command line and prepopulates
it with `Xx/`, which is a composite command that performs a global search. The results
of the search appear in the operation preview list, which you can focus
with `meta-:`.
Atom's command language is still under construction and is loosely based on
Atom's command language is still under construction, and is loosely based on
the [Sam editor](http://doc.cat-v.org/bell_labs/sam_lang_tutorial/) from the
Plan 9 operating system. It's similar to Ex mode in Vim, but is selection-based
Plan 9 operating system. It's similar to Ex mode in vim, but is selection-based
rather than line-based. It allows you to compose commands together in
interesting ways.
#### Navigating By Symbols
If you want to jump to a method, you can use the ctags-based symbols package.
The `meta-j` binding will open a list of all symbols in the current file. The
`meta-shift-j` binding will open a list of all symbols for the current project
based on a tags file. And `meta-.` will jump to the tag for the word currently
under the cursor. Make sure you have a tags file generated for the project for
The `meta-j` binding opens a list of all symbols in the current file. The
`meta-shift-j` binding opens a list of all symbols for the current project
based on a tags file. `meta-.` jumps to the tag for the word currently
under the cursor.
Make sure you have a tags file generated for the project for
the latter of these two bindings to work. Also, if you're editing CoffeeScript,
it's a good idea to update your `~/.ctags` file to understand the language. Here
is [a good example](https://github.com/kevinsawicki/dotfiles/blob/master/.ctags).
@@ -106,31 +111,31 @@ command, as follows: `s/foo/bar/g`. Note that if you have a selection, the
replacement will only occur inside the selected text. An empty selection will
cause the replacement to occur across the whole buffer. If you want to run the
command on the whole buffer even if you have a selection, precede your
substitution with the `,` address, which specifies that the command following it
operate on the whole buffer.
substitution with the `,` address; this indicates that the following command should
run on the whole buffer.
### Split Panes
You can split any editor pane horizontally or vertically by using `ctrl-shift-|` or
You can split any editor pane horizontally or vertically by using `ctrl-\` or
`ctrl-w v`. Once you have a split pane, you can move focus between them with
`ctrl-tab` or `ctrl-w w`. To close a pane, close all tabs inside it.
### Folding
You can fold everything with `ctrl-shift-[` and unfold everything with
`ctrl-shift-]`. Or, you can fold / unfold by a single level with `ctrl-[` and
You can fold everything with `ctrl-{` and unfold everything with
`ctrl-}`. Or, you can fold / unfold by a single level with `ctrl-[` and
`ctrl-]`. The user interaction around folds is still a bit rough, but we're
planning to improve it soon.
### Soft-Wrap
If you want to toggle soft wrap, trigger the command from the command palette.
Press `meta-p` to open the palette, then type "wrap" to find the correct
Hit `meta-p` to open the palette, then type "wrap" to find the correct
command.
## Your .atom Directory
When you install Atom, a `.atom` directory is created in your home directory.
When you install Atom, an `.atom` directory is created in your home directory.
If you press `meta-,`, that directory will be opened in a new window. For the
time being, this will serve as the primary interface for adjusting configuration
settings, adding and changing key bindings, tweaking styles, etc.
+1 -4
Ver Arquivo
@@ -49,10 +49,7 @@ the following way:
# basic key update
config.set("core.autosave", true)
# if you mutate a config key, you'll need to call `config.update` to inform
# observers of the change
config.get("fuzzyFinder.ignoredPaths").push "vendor"
config.update()
config.pushAtKeyPath("core.disabledPackages", "wrap-guide")
```
You can also use `setDefaults`, which will assign default values for keys that
+6 -2
Ver Arquivo
@@ -1,10 +1,14 @@
getting-started.md
configuring-atom.md
built-in-packages/intro.md
built-in-packages/command-panel.md
built-in-packages/markdown-preview.md
built-in-packages/wrap-guide.md
authoring-themes.md
authoring-packages..md
packages/authoring-packages.md
packages/creating_a_package.md
packages/included_libraries.md
packages/package_json.md
themes/authoring-themes.md
internals/intro.md
internals/configuration.md
internals/keymaps.md
+211
Ver Arquivo
@@ -0,0 +1,211 @@
# Authoring Packages
Packages are at the core of Atom. Nearly everything outside of the main editor manipulation
is handled by a package. That includes "core" pieces like the command panel, status bar,
file tree, and more.
A package can contain a variety of different resource types to change Atom's
behavior. The basic package layout is as follows (though not every package will
have all of these directories):
```text
my-package/
lib/
stylesheets/
keymaps/
snippets/
grammars/
spec/
package.json
index.coffee
```
**NOTE:** NPM behavior is partially implemented until we get a working Node.js
API built into Atom. The goal is to make Atom packages be a superset of NPM
packages.
Below, we'll break down each directory. There's also [a tutorial](./creating_a_package.md)
on creating your first package.
## package.json
Similar to [npm packages](http://en.wikipedia.org/wiki/Npm_(software)), Atom packages
can contain a _package.json_ file in their top-level directory. This file contains metadata
about the package, such as the path to its "main" module, library dependencies,
and manifests specifying the order in which its resources should be loaded.
In addition to the regular [npm package.json keys](https://npmjs.org/doc/json.html)
available, Atom package.json files [have their own additions](./package_json.md).
## Source Code
If you want to extend Atom's behavior, your package should contain a single
top-level module, which you export from _index.coffee_ (or whichever file is
indicated by the `main` key in your _package.json_ file). The remainder of your
code should be placed in the `lib` directory, and required from your top-level
file.
Your package's top-level module is a singleton object that manages the lifecycle
of your extensions to Atom. Even if your package creates ten different views and
appends them to different parts of the DOM, it's all managed from your top-level
object.
Your package's top-level module should implement the following methods:
- `activate(rootView, state)`: This **required** method is called when your
package is loaded. It is always passed the window's global `rootView`, and is
sometimes passed state data if the window has been reloaded and your module
implements the `serialize` method. Use this to do initialization work when your
package is started (like setting up DOM elements or binding events).
- `serialize()`: This **optional** method is called when the window is shutting
down, allowing you to return JSON to represent the state of your component. When
the window is later restored, the data you returned is passed to your
module's `activate` method so you can restore your view to where the user left
off.
- `deactivate()`: This **optional** method is called when the window is shutting
down. If your package is watching any files or holding external resources in any
other way, release them here. If you're just subscribing to things on window,
you don't need to worry because that's getting torn down anyway.
### Simple Package Code
```text
my-package/
package.json # optional
index.coffee
lib/
my-package.coffee
```
`index.coffee`:
```coffeescript
module.exports = require "./lib/my-package"
```
`my-package/my-package.coffee`:
```coffeescript
module.exports =
activate: (rootView, state) -> # ...
deactivate: -> # ...
serialize: -> # ...
```
Beyond this simple contract, your package has full access to Atom's internal
API. Anything we call internally, you can call as well. Be aware that since we
are early in development, APIs are subject to change and we have not yet
established clear boundaries between what is public and what is private. Also,
please collaborate with us if you need an API that doesn't exist. Our goal is
to build out Atom's API organically based on the needs of package authors like
you.
See [Atom's built-in packages](https://github.com/github/atom/tree/master/src/packages)
for examples of Atom's API in action.
## Stylesheets
Stylesheets for your package should be placed in the _stylesheets_ directory.
Any stylesheets in this directory will be loaded and attached to the DOM when
your package is activated. Stylesheets can be written as CSS or LESS.
An optional `stylesheets` array in your _package.json_ can list the stylesheets by
name to specify a loading order; otherwise, stylesheets are loaded alphabetically.
## Keymaps
Keymaps are placed in the _keymaps_ subdirectory. It's a good idea to provide
default keymaps for your extension, especially if you're also adding a new command.
By default, all keymaps are loaded in alphabetical order. An optional `keymaps`
array in your _package.json_ can specify which keymaps to load and in what order.
See the [main keymaps documentation](../internals/keymaps.md) for more information on
how keymaps work.
## Snippets
An extension can supply language snippets in the _snippets_ directory. These can
be `.cson` or `.json` files. Here's an example:
```coffeescript
".source.coffee .specs":
"Expect":
prefix: "ex"
body: "expect($1).to$2"
"Describe":
prefix: "de"
body: """
describe "${1:description}", ->
${2:body}
"""
```
A snippets file contains scope selectors at its top level (`.source.coffee .spec`).
Each scope selector contains a hash of snippets keyed by their name (`Expect`, `Describe`).
Each snippet also specifies a `prefix` and a `body` key. The `prefix` represents
the first few letters to type before hitting the `tab` key to autocomplete. The
`body` defines the autofilled text. You can use placeholders like `$1`, `$2`, to indicate
regions in the body the user can navigate to every time they hit `tab`.
All files in the directory are automatically loaded, unless the
_package.json_ supplies a `snippets` key. As with all scoped
items, snippets loaded later take precedence over earlier snippets when two
snippets match a scope with the same specificity.
## Language Grammars
If you're developing a new language grammar, you'll want to place your file in
the _grammars_ directory. Each grammar is a pairing of two keys, `match` and
`captures`. `match` is a regular expression identifying the pattern to highlight,
while `captures` is a JSON representing what to do with each matching group.
For example:
```json
{
'match': '(?:^|\\s)(__[^_]+__)'
'captures':
'1': 'name': 'markup.bold.gfm'
}
```
This indicates that the first matching capture (`(__[^_]+__)`) should have the
`markup.bold.gfm` token applied to it.
To capture a single group, simply use the `name` key instead:
```json
{
'match': '^#{1,6}\\s+.+$'
'name': 'markup.heading.gfm'
}
```
This indicates that Markdown header lines (`#`, `##`, `###`) should be applied with
the `markup.heading.gfm` token.
More information about the significance of these tokens can be found in
[section 12.4 of the TextMate Manual](http://manual.macromates.com/en/language_grammars.html).
Your grammar should also include a `filetypes` array, which is a list of file extensions
your grammar supports:
```
'fileTypes': [
'markdown'
'md'
'mkd'
'mkdown'
'ron'
]
```
## Writing Tests
Your package **should** have tests, and if they're placed in the _spec_ directory,
they can be run by Atom.
Under the hood, [Jasmine](https://github.com/pivotal/jasmine) is being used to run
to execute the tests, so you can assume that any DSL available there is available
to your package as well.
+254
Ver Arquivo
@@ -0,0 +1,254 @@
# Creating Packages
Let's take a look at creating our first package.
Atom has a command you can enter that'll create a package for you:
`package-generator:generate`. Otherwise, you can hit `meta-p`, and start typing
"Package Generator." Once you activate this package, it'll ask you for a name for
your new package. Let's call ours _changer_.
Now, _changer_ is going to have a default set of folders and files created for us.
Hit `meta-R` to reload Atom, then hit `meta-p` and start typing "Changer." You'll
see a new `Changer:Toggle` command which, if selected, pops up a new message. So
far, so good!
In order to demonstrate the capabilities of Atom and its API, our Changer plugin
is going to do two things:
1. It'll show only modified files in the file tree
2. It'll append a new pane to the editor with some information about the modified
files
Let's get started!
## Changing Keybindings and Commands
Since Changer is primarily concerned with the file tree, let's write a keybinding
that works only when the tree is focused. Instead of using the default `toggle`,
our keybinding executes a new command called `magic`.
_keymaps/changer.cson_ can easily become this:
```cson
'.tree-view-scroller':
'ctrl-V': 'changer:magic'
```
Notice that the keybinding is called `ctrl-V`--that's actually `ctrl-shift-v`.
You can use capital letters to denote using `shift` for your binding.
`.tree-view-scroller` represents the parent container for the tree view. Keybindings
only work within the context of where they're entered. For example, hitting `ctrl-V`
anywhere other than tree won't do anything. You can map to `body` if you want
to scope to anywhere in Atom, or just `.editor` for the editor portion.
To bind keybindings to a command, we'll use the `rootView.command` method. This
takes a command name and executes a function in the code. For example:
```coffeescript
rootView.command "changer:magic", => @magic()
```
It's common practice to namespace your commands with your package name, and separate
it with a colon (`:`). Rename the existing `toggle` method to `magic` to get the
binding to work.
Reload the editor, click on the tree, hit your keybinding, and...nothing happens! What the heck?!
Open up the _package.json_ file, and notice the key that says `activationEvents`.
Basically, this tells Atom to not load a package until it hears a certain event.
Let's change the event to `changer:magic` and reload the editor.
Hitting the key binding on the tree now works!
## Working with styles
The next step is to hide elements in the tree that aren't modified. To do that,
we'll first try and get a list of files that have not changed.
All packages are able to use jQuery in their code. In fact, we have [a list of
some of the bundled libraries Atom provides by default](./included_libraries.md).
Let's bring in jQuery:
```coffeescript
$ = require 'jquery'
```
Now, we can query the tree to get us a list of every file that _wasn't_ modified:
```coffeescript
magic: ->
$('ol.entries li').each (i, el) ->
if !$(el).hasClass("modified")
console.log el
```
You can access the dev console by hitting `alt-meta-i`. When we execute the
`changer:magic` command, the browser console lists the items that are not being
modified. Let's add a class to each of these elements called `hide-me`:
```coffeescript
magic: ->
$('ol.entries li').each (i, el) ->
if !$(el).hasClass("modified")
$(el).addClass("hide-me")
```
With our newly added class, we can manipulate the visibility of the elements
with a simple stylesheet. Open up _changer.css_ in the _stylesheets_ directory,
and add a single entry:
```css
ol.entries .hide-me {
display: none;
}
```
Refresh atom, and run the `changer` command. You'll see all the non-changed files
disappear from the tree. There are a number of ways you can get the list back;
let's just naively iterate over the same elements and remove the class:
```coffeescript
magic: ->
$('ol.entries li').each (i, el) ->
if !$(el).hasClass("modified")
if !$(el).hasClass("hide-me")
$(el).addClass("hide-me")
else
$(el).removeClass("hide-me")
```
## Creating a New Pane
The next goal of this package is to append a pane to the Atom editor that lists
some information about the modified files.
To do that, we're going to first create a new class method called `content`. Every
package that extends from the `View` class can provide an optional class method
called `content`. The `content` method constructs the DOM that your package uses
as its UI. The principals of `content` are built entirely on [SpacePen](https://github.com/nathansobo/space-pen),
which we'll touch upon only briefly here.
Our display will simply be an unordered list of the file names, and their
modified times. Let's start by carving out a `div` to hold the filenames:
```coffeescript
@content: ->
@div class: 'modified-files-container', =>
@ul class: 'modified-files-list', outlet: 'modifiedFilesList', =>
@li 'Test'
@li 'Test2'
```
You can add any HTML5 attribute you like. `outlet` names the variable
your package can uses to manipulate the element directly. The fat pipe (`=>`) indicates
that the next set are nested children.
We'll add one more line to `magic` to make this pane appear:
```coffeescript
rootView.vertical.append(this)
```
If you hit the key command, you'll see a box appear right underneath the editor.
Success!
Before we populate this, let's apply some logic to toggle the pane off and on, just
like we did with the tree view:
```coffeescript
# toggles the pane
if @hasParent()
rootView.vertical.children().last().remove()
else
rootView.vertical.append(this)
```
There are about a hundred different ways to toggle a pane on and off, and this
might not be the most efficient one. If you know your package needs to be toggled
on and off more freely, it might be better to draw the UI during the initialization,
then immediately call `hide()` on the element to remove it from the view. You can
then swap between `show()` and `hide()`, and instead of forcing Atom to add and remove
the element as we're doing here, it'll just set a CSS property to control your package's
visibility.
You might have noticed that our two `li` elements aren't showing up. Let's set
a color on them so that they pop. Open up `changer.css` and add this CSS:
```css
ul.modified-files-list {
color: white;
}
```
Refresh Atom, hit the key combo, and see your brilliantly white test list.
## Calling Node.js Code
Since Atom is built on top of Node.js, you can call any of its libraries, including
other modules that your package requires.
We'll iterate through our resulting tree, and construct the path to our modified
file based on its depth in the tree:
```coffeescript
path = require 'path'
# ...
modifiedFiles = []
# for each single entry...
$('ol.entries li.file.modified span.name').each (i, el) ->
filePath = []
# ...grab its name...
filePath.unshift($(el).text())
# ... then find its parent directories, and grab their names
parents = $(el).parents('.directory.modified')
parents.each (i, el) ->
filePath.unshift($(el).find('div.header span.name').eq(0).text())
modifiedFilePath = path.join(project.rootDirectory.path, filePath.join(path.sep))
modifiedFiles.push modifiedFilePath
```
`modifiedFiles` is an array containing a list of our modified files. We're also using
the node.js [`path` library](http://nodejs.org/docs/latest/api/path.html) to get
the proper directory separator for our system.
Let's remove the two `@li` elements we added in `@content`, so that we can populate
our `modifiedFilesList` with real information. We'll do that by iterating over
`modifiedFiles`, accessing a file's last modified time, and appending it to
`modifiedFilesList`:
```coffeescript
# toggles the pane
if @hasParent()
rootView.vertical.children().last().remove()
else
for file in modifiedFiles
stat = fs.lstatSync(file)
mtime = stat.mtime
@modifiedFilesList.append("<li>#{file} - Modified at #{mtime}")
rootView.vertical.append(this)
```
When you toggle the modified files list, your pane is now populated with the filenames
and modified times of files in your project. You might notice that subsequent calls
to this command reduplicate information. We could provide an elegant way of rechecking
files already in the list, but for this demonstration, we'll just clear the `modifiedFilesList`
each time it's closed:
```coffeescript
# toggles the pane
if @hasParent()
@modifiedFilesList.empty()
rootView.vertical.children().last().remove()
else
for file in modifiedFiles
stat = fs.lstatSync(file)
mtime = stat.mtime
@modifiedFilesList.append("<li>#{file} - Modified at #{mtime}")
rootView.vertical.append(this)
```
+10
Ver Arquivo
@@ -0,0 +1,10 @@
# Included Libraries
In addition to core node.js modules, all packages can `require` the following popular
libraries into their packages:
* [SpacePen](https://github.com/nathansobo/space-pen) (as `require 'space-pen'`)
* [jQuery](http://jquery.com/) (as `require 'jquery'`)
* [Underscore](http://underscorejs.org/) (as `require 'underscore'`)
Additional libraries can be found by browsing Atom's _node_modules_ folder.
+18
Ver Arquivo
@@ -0,0 +1,18 @@
# package.json format
The following keys are available to your package's _package.json_ manifest file:
- `main` (**Required**): the path to the CoffeeScript file that's the entry point
to your package
- `stylesheets` (**Optional**): an Array of Strings identifying the order of the
stylesheets your package needs to load. If not specified, stylesheets in the _stylesheets_
directory are added alphabetically.
- `keymaps`(**Optional**): an Array of Strings identifying the order of the
key mappings your package needs to load. If not specified, mappings in the _keymaps_
directory are added alphabetically.
- `snippets` (**Optional**): an Array of Strings identifying the order of the
snippets your package needs to load. If not specified, snippets in the _snippets_
directory are added alphabetically.
- `activationEvents` (**Optional**): an Array of Strings identifying events that
trigger your package's activation. You can delay the loading of your package until
one of these events is trigged.
@@ -1,4 +1,4 @@
# Authoring A Theme
# Authoring Themes
If you understand CSS, you can write an Atom theme easily. Your theme can style
Atom's user interface, specify the appearance of syntax-highlighted code, or
@@ -9,9 +9,9 @@ translate scope names to CSS classes. To theme Atom's user interface, take a
look at the existing light and dark themes for an example. Pressing `alt-meta-i`
and inspecting the Atom's markup directly can also be helpful.
The most basic theme is just a `.css` file. More complex themes occupy their own
The most basic theme is just a _.css_ file. More complex themes occupy their own
folder, which can contain multiple stylesheets along with an optional
`package.cson` file containing a manifest to control their load-order:
_package.cson_ file containing a manifest to control their load-order:
```text
~/.atom/themes/
-32
Ver Arquivo
@@ -1,32 +0,0 @@
#include "include/cef_app.h"
#include "include/cef_application_mac.h"
class AtomCefClient;
@interface AtomApplication : NSApplication <CefAppProtocol, NSApplicationDelegate> {
IBOutlet NSMenuItem *_versionMenuItem;
NSWindowController *_backgroundWindowController;
NSDictionary *_arguments;
NSInvocation *_updateInvocation;
NSString *_updateStatus;
BOOL _filesOpened;
BOOL _handlingSendEvent;
}
+ (AtomApplication *)sharedApplication;
+ (id)applicationWithArguments:(char **)argv count:(int)argc;
+ (CefSettings)createCefSettings;
+ (NSDictionary *)parseArguments:(char **)argv count:(int)argc;
- (void)open:(NSString *)path;
- (void)openDev:(NSString *)path;
- (void)open:(NSString *)path pidToKillWhenWindowCloses:(NSNumber *)pid;
- (void)openConfig;
- (IBAction)runSpecs:(id)sender;
- (IBAction)runBenchmarks:(id)sender;
- (void)runSpecsThenExit:(BOOL)exitWhenDone;
- (NSDictionary *)arguments;
- (void)runBenchmarksThenExit:(BOOL)exitWhenDone;
@property (nonatomic, retain) NSDictionary *arguments;
@end
-334
Ver Arquivo
@@ -1,334 +0,0 @@
#import "include/cef_application_mac.h"
#import "native/atom_cef_client.h"
#import "native/atom_application.h"
#import "native/atom_window_controller.h"
#import "native/atom_cef_app.h"
#import <getopt.h>
#import <Sparkle/Sparkle.h>
#import <Quincy/BWQuincyManager.h>
@implementation AtomApplication
@synthesize arguments=_arguments;
+ (AtomApplication *)sharedApplication {
return (AtomApplication *)[super sharedApplication];
}
+ (id)applicationWithArguments:(char **)argv count:(int)argc {
AtomApplication *application = [self sharedApplication];
CefInitialize(CefMainArgs(argc, argv), [self createCefSettings], new AtomCefApp);
application.arguments = [self parseArguments:argv count:argc];
return application;
}
+ (NSDictionary *)parseArguments:(char **)argv count:(int)argc {
NSMutableDictionary *arguments = [[NSMutableDictionary alloc] init];
// Remove non-posix (i.e. -long_argument_with_one_leading_hyphen) added by OS X from the command line
int cleanArgc = argc;
size_t argvSize = argc * sizeof(char *);
char **cleanArgv = (char **)alloca(argvSize);
for (int i=0; i < argc; i++) {
if (strcmp(argv[i], "-NSDocumentRevisionsDebugMode") == 0) { // Xcode inserts useless command-line args by default: http://trac.wxwidgets.org/ticket/13732
cleanArgc -= 2;
i++;
}
else if (strncmp(argv[i], "-psn_", 5) == 0) { // OS X inserts a -psn_[PID] argument.
cleanArgc -= 1;
}
else {
cleanArgv[i] = argv[i];
}
}
int opt;
int longindex;
static struct option longopts[] = {
{ "executed-from", required_argument, NULL, 'K' },
{ "resource-path", required_argument, NULL, 'R' },
{ "benchmark", no_argument, NULL, 'B' },
{ "test", no_argument, NULL, 'T' },
{ "dev", no_argument, NULL, 'D' },
{ "pid", required_argument, NULL, 'P' },
{ "wait", no_argument, NULL, 'W' },
{ NULL, 0, NULL, 0 }
};
while ((opt = getopt_long(cleanArgc, cleanArgv, "K:R:BYDP:Wh?", longopts, &longindex)) != -1) {
NSString *key, *value;
switch (opt) {
case 'K':
case 'R':
case 'B':
case 'T':
case 'D':
case 'W':
case 'P':
key = [NSString stringWithUTF8String:longopts[longindex].name];
value = optarg ? [NSString stringWithUTF8String:optarg] : @"YES";
[arguments setObject:value forKey:key];
break;
case 0:
break;
default:
NSLog(@"usage: atom [--resource-path=<path>] [<path>]");
}
}
cleanArgc -= optind;
cleanArgv += optind;
if (cleanArgc > 0) {
NSString *path = [NSString stringWithUTF8String:cleanArgv[0]];
path = [self standardizePathToOpen:path withArguments:arguments];
[arguments setObject:path forKey:@"path"];
} else {
NSString *executedFromPath = [arguments objectForKey:@"executed-from"];
if (executedFromPath) {
[arguments setObject:executedFromPath forKey:@"path"];
}
}
return arguments;
}
+ (NSString *)standardizePathToOpen:(NSString *)path withArguments:(NSDictionary *)arguments {
NSString *standardizedPath = path;
NSString *executedFromPath = [arguments objectForKey:@"executed-from"];
if (![standardizedPath isAbsolutePath] && executedFromPath) {
standardizedPath = [executedFromPath stringByAppendingPathComponent:standardizedPath];
}
standardizedPath = [standardizedPath stringByStandardizingPath];
return standardizedPath;
}
+ (NSString *)supportDirectory {
NSString *cachePath = [NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) objectAtIndex:0];
NSString *executableName = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleExecutable"];
NSString *supportDirectory = [cachePath stringByAppendingPathComponent:executableName];
NSFileManager *fs = [NSFileManager defaultManager];
NSError *error;
BOOL success = [fs createDirectoryAtPath:supportDirectory withIntermediateDirectories:YES attributes:nil error:&error];
if (!success) {
NSLog(@"Warning: Can't create support directory '%@' because %@", supportDirectory, [error localizedDescription]);
supportDirectory = @"";
}
return supportDirectory;
}
+ (CefSettings)createCefSettings {
CefSettings settings;
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
NSString *userAgent = [NSString stringWithFormat:@"GitHubAtom/%@", version];
CefString(&settings.cache_path) = [[self supportDirectory] UTF8String];
CefString(&settings.user_agent) = [userAgent UTF8String];
CefString(&settings.log_file) = "";
CefString(&settings.javascript_flags) = "--harmony_collections";
settings.remote_debugging_port = 9090;
settings.log_severity = LOGSEVERITY_ERROR;
return settings;
}
- (void)dealloc {
[_backgroundWindowController release];
[_arguments release];
[_updateInvocation release];
[super dealloc];
}
- (void)open:(NSString *)path pidToKillWhenWindowCloses:(NSNumber *)pid {
BOOL openingDirectory = false;
[[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&openingDirectory];
if (!pid) {
for (NSWindow *window in [self windows]) {
if (![window isExcludedFromWindowsMenu]) {
AtomWindowController *controller = [window windowController];
if (!controller.pathToOpen) {
continue;
}
if (!openingDirectory) {
BOOL openedPathIsDirectory = false;
[[NSFileManager defaultManager] fileExistsAtPath:controller.pathToOpen isDirectory:&openedPathIsDirectory];
NSString *projectPath = NULL;
if (openedPathIsDirectory) {
projectPath = [NSString stringWithFormat:@"%@/", controller.pathToOpen];
}
else {
projectPath = [controller.pathToOpen stringByDeletingLastPathComponent];
}
if ([path hasPrefix:projectPath]) {
[window makeKeyAndOrderFront:nil];
[controller openPath:path];
return;
}
}
if ([path isEqualToString:controller.pathToOpen]) {
[window makeKeyAndOrderFront:nil];
return;
}
}
}
}
AtomWindowController *windowController = [[AtomWindowController alloc] initWithPath:path];
[windowController setPidToKillOnClose:pid];
return windowController;
}
- (void)open:(NSString *)path {
[self open:path pidToKillWhenWindowCloses:nil];
}
- (void)openDev:(NSString *)path {
[[AtomWindowController alloc] initDevWithPath:path];
}
- (void)openConfig {
for (NSWindow *window in [self windows]) {
if ([[window windowController] isConfig]) {
[window makeKeyAndOrderFront:nil];
return;
}
}
[[AtomWindowController alloc] initConfig];
}
- (IBAction)runSpecs:(id)sender {
[self runSpecsThenExit:NO];
}
- (void)runSpecsThenExit:(BOOL)exitWhenDone {
[[AtomWindowController alloc] initSpecsThenExit:exitWhenDone];
}
- (IBAction)runBenchmarks:(id)sender {
[self runBenchmarksThenExit:NO];
}
- (void)runBenchmarksThenExit:(BOOL)exitWhenDone {
[[AtomWindowController alloc] initBenchmarksThenExit:exitWhenDone];
}
# pragma mark NSApplicationDelegate
- (BOOL)shouldOpenFiles {
if ([self.arguments objectForKey:@"benchmark"]) {
return NO;
}
if ([self.arguments objectForKey:@"test"]) {
return NO;
}
return YES;
}
- (void)application:(NSApplication *)sender openFiles:(NSArray *)filenames {
if ([self shouldOpenFiles]) {
for (NSString *path in filenames) {
path = [[self class] standardizePathToOpen:path withArguments:self.arguments];
NSNumber *pid = [self.arguments objectForKey:@"wait"] ? [self.arguments objectForKey:@"pid"] : nil;
[self open:path pidToKillWhenWindowCloses:pid];
}
if ([filenames count] > 0) {
_filesOpened = YES;
}
}
}
- (void)applicationDidFinishLaunching:(NSNotification *)notification {
BWQuincyManager *manager = [BWQuincyManager sharedQuincyManager];
[manager setCompanyName:@"GitHub"];
[manager setSubmissionURL:@"https://speakeasy.githubapp.com/submit_crash_log"];
[manager setAutoSubmitCrashReport:YES];
if (!_filesOpened && [self shouldOpenFiles]) {
NSString *path = [self.arguments objectForKey:@"path"];
NSNumber *pid = [self.arguments objectForKey:@"wait"] ? [self.arguments objectForKey:@"pid"] : nil;
[self open:path pidToKillWhenWindowCloses:pid];
}
}
- (void)applicationWillFinishLaunching:(NSNotification *)notification {
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
_versionMenuItem.title = [NSString stringWithFormat:@"Version %@", version];
if ([self.arguments objectForKey:@"benchmark"]) {
[self runBenchmarksThenExit:true];
}
else if ([self.arguments objectForKey:@"test"]) {
[self runSpecsThenExit:true];
}
else {
_backgroundWindowController = [[AtomWindowController alloc] initInBackground];
#if defined(CODE_SIGNING_ENABLED)
SUUpdater.sharedUpdater.delegate = self;
SUUpdater.sharedUpdater.automaticallyChecksForUpdates = YES;
SUUpdater.sharedUpdater.automaticallyDownloadsUpdates = YES;
[SUUpdater.sharedUpdater checkForUpdatesInBackground];
#endif
}
}
- (NSApplicationTerminateReply)applicationShouldTerminate:
(NSApplication *)sender {
for (NSWindow *window in [self windows]) {
[window performClose:self];
}
return NSTerminateCancel;
}
# pragma mark CefAppProtocol
- (BOOL)isHandlingSendEvent {
return _handlingSendEvent;
}
- (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
_handlingSendEvent = handlingSendEvent;
}
- (void)sendEvent:(NSEvent*)event {
CefScopedSendingEvent sendingEventScoper;
if ([[self mainMenu] performKeyEquivalent:event]) return;
if (_backgroundWindowController && ![self keyWindow] && [event type] == NSKeyDown) {
[_backgroundWindowController.window makeKeyWindow];
[_backgroundWindowController.window sendEvent:event];
}
else {
[super sendEvent:event];
}
}
#pragma mark SUUpdaterDelegate
- (void)updaterDidNotFindUpdate:(SUUpdater *)update {
}
- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update {
}
- (void)updater:(SUUpdater *)updater willExtractUpdate:(SUAppcastItem *)update {
}
- (void)updater:(SUUpdater *)updater willInstallUpdateOnQuit:(SUAppcastItem *)update immediateInstallationInvocation:(NSInvocation *)invocation {
_updateInvocation = [invocation retain];
_versionMenuItem.title = [NSString stringWithFormat:@"Update to %@", update.versionString];
_versionMenuItem.target = _updateInvocation;
_versionMenuItem.action = @selector(invoke);
}
- (void)updater:(SUUpdater *)updater didCancelInstallUpdateOnQuit:(SUAppcastItem *)update {
}
@end
-18
Ver Arquivo
@@ -1,18 +0,0 @@
#ifndef ATOM_CEF_APP_H_
#define ATOM_CEF_APP_H_
#pragma once
#include "include/cef_app.h"
#include "atom_cef_render_process_handler.h"
class AtomCefApp : public CefApp {
virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() OVERRIDE {
return CefRefPtr<CefRenderProcessHandler>(new AtomCefRenderProcessHandler);
}
IMPLEMENT_REFCOUNTING(AtomCefApp);
};
#endif
-276
Ver Arquivo
@@ -1,276 +0,0 @@
#include <sstream>
#include <iostream>
#include <assert.h>
#include "include/cef_app.h"
#include "include/cef_path_util.h"
#include "include/cef_process_util.h"
#include "include/cef_task.h"
#include "include/cef_runnable.h"
#include "include/cef_trace.h"
#include "cef_types.h"
#include "native/atom_cef_client.h"
#include "cef_v8.h"
#define REQUIRE_UI_THREAD() assert(CefCurrentlyOn(TID_UI));
#define REQUIRE_IO_THREAD() assert(CefCurrentlyOn(TID_IO));
#define REQUIRE_FILE_THREAD() assert(CefCurrentlyOn(TID_FILE));
static int numberOfOpenBrowsers = 0;
AtomCefClient::AtomCefClient() {
}
AtomCefClient::AtomCefClient(bool handlePasteboardCommands, bool ignoreTitleChanges) {
m_HandlePasteboardCommands = handlePasteboardCommands;
m_IgnoreTitleChanges = ignoreTitleChanges;
}
AtomCefClient::~AtomCefClient() {
}
bool AtomCefClient::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) {
std::string name = message->GetName().ToString();
CefRefPtr<CefListValue> argumentList = message->GetArgumentList();
int messageId = argumentList->GetInt(0);
if (name == "open") {
bool hasArguments = argumentList->GetSize() > 1;
hasArguments ? Open(argumentList->GetString(1)) : Open();
}
if (name == "openDev") {
bool hasArguments = argumentList->GetSize() > 1;
hasArguments ? OpenDev(argumentList->GetString(1)) : OpenDev();
}
else if (name == "newWindow") {
NewWindow();
}
else if (name == "openConfig") {
OpenConfig();
}
else if (name == "toggleDevTools") {
ToggleDevTools(browser);
}
else if (name == "showDevTools") {
ShowDevTools(browser);
}
else if (name == "confirm") {
std::string message = argumentList->GetString(1).ToString();
std::string detailedMessage = argumentList->GetString(2).ToString();
std::vector<std::string> buttonLabels(argumentList->GetSize() - 3);
for (int i = 3; i < argumentList->GetSize(); i++) {
buttonLabels[i - 3] = argumentList->GetString(i).ToString();
}
Confirm(messageId, message, detailedMessage, buttonLabels, browser);
}
else if (name == "showSaveDialog") {
ShowSaveDialog(messageId, browser);
}
else if (name == "focus") {
GetBrowser()->GetHost()->SetFocus(true);
}
else if (name == "exit") {
Exit(argumentList->GetInt(1));
}
else if (name == "log") {
std::string message = argumentList->GetString(1).ToString();
Log(message.c_str());
}
else if (name == "beginTracing") {
BeginTracing();
}
else if (name == "endTracing") {
EndTracing();
}
else if (name == "show") {
Show(browser);
}
else if (name == "toggleFullScreen") {
ToggleFullScreen(browser);
}
else if (name == "getVersion") {
GetVersion(messageId, browser);
}
else if (name == "crash") {
__builtin_trap();
}
else if (name == "restartRendererProcess") {
RestartRendererProcess(browser);
}
else {
return false;
}
return true;
}
void AtomCefClient::OnBeforeContextMenu(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params,
CefRefPtr<CefMenuModel> model) {
model->Clear();
model->AddItem(MENU_ID_USER_FIRST, "&Toggle DevTools");
}
bool AtomCefClient::OnContextMenuCommand(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params,
int command_id,
EventFlags event_flags) {
if (command_id == MENU_ID_USER_FIRST) {
ToggleDevTools(browser);
return true;
}
else {
return false;
}
}
bool AtomCefClient::OnConsoleMessage(CefRefPtr<CefBrowser> browser,
const CefString& message,
const CefString& source,
int line) {
REQUIRE_UI_THREAD();
Log(message.ToString().c_str());
return true;
}
bool AtomCefClient::OnKeyEvent(CefRefPtr<CefBrowser> browser,
const CefKeyEvent& event,
CefEventHandle os_event) {
if (event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'r') {
browser->SendProcessMessage(PID_RENDERER, CefProcessMessage::Create("reload"));
}
if (m_HandlePasteboardCommands && event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'x') {
browser->GetFocusedFrame()->Cut();
}
if (m_HandlePasteboardCommands && event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'c') {
browser->GetFocusedFrame()->Copy();
}
if (m_HandlePasteboardCommands && event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == 'v') {
browser->GetFocusedFrame()->Paste();
}
else if (event.modifiers == (EVENTFLAG_COMMAND_DOWN | EVENTFLAG_ALT_DOWN) && event.unmodified_character == 'i') {
ToggleDevTools(browser);
} else if (event.modifiers == EVENTFLAG_COMMAND_DOWN && event.unmodified_character == '`') {
FocusNextWindow();
} else if (event.modifiers == (EVENTFLAG_COMMAND_DOWN | EVENTFLAG_SHIFT_DOWN) && event.unmodified_character == '~') {
FocusPreviousWindow();
}
else {
return false;
}
return true;
}
void AtomCefClient::OnBeforeClose(CefRefPtr<CefBrowser> browser) {
// REQUIRE_UI_THREAD(); // When uncommented this fails when app is terminated
m_Browser = NULL;
numberOfOpenBrowsers--;
if (numberOfOpenBrowsers == 0) {
CefQuitMessageLoop();
}
}
void AtomCefClient::OnAfterCreated(CefRefPtr<CefBrowser> browser) {
REQUIRE_UI_THREAD();
AutoLock lock_scope(this);
if (!m_Browser.get()) {
m_Browser = browser;
}
GetBrowser()->GetHost()->SetFocus(true);
numberOfOpenBrowsers++;
}
void AtomCefClient::OnLoadError(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
ErrorCode errorCode,
const CefString& errorText,
const CefString& failedUrl) {
REQUIRE_UI_THREAD();
frame->LoadString(std::string(errorText) + "<br />" + std::string(failedUrl), failedUrl);
}
void AtomCefClient::BeginTracing() {
if (CefCurrentlyOn(TID_UI)) {
class Client : public CefTraceClient,
public CefRunFileDialogCallback {
public:
explicit Client(CefRefPtr<AtomCefClient> handler)
: handler_(handler),
trace_data_("{\"traceEvents\":["),
first_(true) {
}
virtual void OnTraceDataCollected(const char* fragment,
size_t fragment_size) OVERRIDE {
if (first_)
first_ = false;
else
trace_data_.append(",");
trace_data_.append(fragment, fragment_size);
}
virtual void OnEndTracingComplete() OVERRIDE {
REQUIRE_UI_THREAD();
trace_data_.append("]}");
handler_->GetBrowser()->GetHost()->RunFileDialog(
FILE_DIALOG_SAVE, CefString(), "/tmp/atom-trace.txt", std::vector<CefString>(),
this);
}
virtual void OnFileDialogDismissed(
CefRefPtr<CefBrowserHost> browser_host,
const std::vector<CefString>& file_paths) OVERRIDE {
if (!file_paths.empty())
handler_->Save(file_paths.front(), trace_data_);
}
private:
CefRefPtr<AtomCefClient> handler_;
std::string trace_data_;
bool first_;
IMPLEMENT_REFCOUNTING(Callback);
};
CefBeginTracing(new Client(this), CefString());
} else {
CefPostTask(TID_UI, NewCefRunnableMethod(this, &AtomCefClient::BeginTracing));
}
}
void AtomCefClient::EndTracing() {
if (CefCurrentlyOn(TID_UI)) {
CefEndTracingAsync();
} else {
CefPostTask(TID_UI, NewCefRunnableMethod(this, &AtomCefClient::BeginTracing));
}
}
bool AtomCefClient::Save(const std::string& path, const std::string& data) {
FILE* f = fopen(path.c_str(), "w");
if (!f)
return false;
fwrite(data.c_str(), data.size(), 1, f);
fclose(f);
return true;
}
void AtomCefClient::RestartRendererProcess(CefRefPtr<CefBrowser> browser) {
// Navigating to the same URL has the effect of restarting the renderer
// process, because cefode has overridden ContentBrowserClient's
// ShouldSwapProcessesForNavigation method.
CefRefPtr<CefFrame> frame = browser->GetFocusedFrame();
frame->LoadURL(frame->GetURL());
}
-139
Ver Arquivo
@@ -1,139 +0,0 @@
#ifndef ATOM_CEF_CLIENT_H_
#define ATOM_CEF_CLIENT_H_
#pragma once
#include <set>
#include <string>
#include "include/cef_client.h"
class AtomCefClient : public CefClient,
public CefContextMenuHandler,
public CefDisplayHandler,
public CefJSDialogHandler,
public CefKeyboardHandler,
public CefLifeSpanHandler,
public CefLoadHandler,
public CefRequestHandler {
public:
AtomCefClient();
AtomCefClient(bool handlePasteboardCommands, bool ignoreTitleChanges);
virtual ~AtomCefClient();
CefRefPtr<CefBrowser> GetBrowser() { return m_Browser; }
virtual CefRefPtr<CefContextMenuHandler> GetContextMenuHandler() OVERRIDE {
return this;
}
virtual CefRefPtr<CefDisplayHandler> GetDisplayHandler() OVERRIDE {
return this;
}
virtual CefRefPtr<CefJSDialogHandler> GetJSDialogHandler() {
return this;
}
virtual CefRefPtr<CefKeyboardHandler> GetKeyboardHandler() OVERRIDE {
return this;
}
virtual CefRefPtr<CefLifeSpanHandler> GetLifeSpanHandler() OVERRIDE {
return this;
}
virtual CefRefPtr<CefLoadHandler> GetLoadHandler() OVERRIDE {
return this;
}
virtual CefRefPtr<CefRequestHandler> GetRequestHandler() OVERRIDE {
return this;
}
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) OVERRIDE;
// CefContextMenuHandler methods
virtual void OnBeforeContextMenu(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params,
CefRefPtr<CefMenuModel> model) OVERRIDE;
virtual bool OnContextMenuCommand(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefContextMenuParams> params,
int command_id,
EventFlags event_flags) OVERRIDE;
// CefDisplayHandler methods
virtual bool OnConsoleMessage(CefRefPtr<CefBrowser> browser,
const CefString& message,
const CefString& source,
int line) OVERRIDE;
virtual void OnTitleChange(CefRefPtr<CefBrowser> browser,
const CefString& title) OVERRIDE;
// CefJsDialogHandlerMethods
virtual bool OnBeforeUnloadDialog(CefRefPtr<CefBrowser> browser,
const CefString& message_text,
bool is_reload,
CefRefPtr<CefJSDialogCallback> callback) {
callback->Continue(true, "");
return true;
}
// CefKeyboardHandler methods
virtual bool OnKeyEvent(CefRefPtr<CefBrowser> browser,
const CefKeyEvent& event,
CefEventHandle os_event) OVERRIDE;
// CefLifeSpanHandler methods
virtual void OnAfterCreated(CefRefPtr<CefBrowser> browser) OVERRIDE;
virtual void OnBeforeClose(CefRefPtr<CefBrowser> browser) OVERRIDE;
virtual bool DoClose(CefRefPtr<CefBrowser> browser) OVERRIDE;
// CefLoadHandler methods
virtual void OnLoadError(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
ErrorCode errorCode,
const CefString& errorText,
const CefString& failedUrl) OVERRIDE;
void BeginTracing();
void EndTracing();
bool Save(const std::string& path, const std::string& data);
void RestartRendererProcess(CefRefPtr<CefBrowser> browser);
bool IsClosed() { return m_IsClosed; };
protected:
CefRefPtr<CefBrowser> m_Browser;
bool m_HandlePasteboardCommands = false;
bool m_IgnoreTitleChanges = false;
bool m_IsClosed = false;
void FocusNextWindow();
void FocusPreviousWindow();
void Open(std::string path);
void Open();
void OpenDev(std::string path);
void OpenDev();
void NewWindow();
void OpenConfig();
void ToggleDevTools(CefRefPtr<CefBrowser> browser);
void ShowDevTools(CefRefPtr<CefBrowser> browser);
void Confirm(int replyId,
std::string message,
std::string detailedMessage,
std::vector<std::string> buttonLabels,
CefRefPtr<CefBrowser> browser);
void ShowSaveDialog(int replyId, CefRefPtr<CefBrowser> browser);
CefRefPtr<CefListValue> CreateReplyDescriptor(int replyId, int callbackIndex);
void Exit(int status);
void Log(const char *message);
void Show(CefRefPtr<CefBrowser> browser);
void ToggleFullScreen(CefRefPtr<CefBrowser> browser);
void GetVersion(int replyId, CefRefPtr<CefBrowser> browser);
IMPLEMENT_REFCOUNTING(AtomCefClient);
IMPLEMENT_LOCKING(AtomCefClient);
};
#endif
-63
Ver Arquivo
@@ -1,63 +0,0 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#include <gtk/gtk.h>
#include <string>
#include "cefclient/client_handler.h"
#include "include/cef_browser.h"
#include "include/cef_frame.h"
void ClientHandler::OnAddressChange(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
const CefString& url) {
REQUIRE_UI_THREAD();
if (m_BrowserId == browser->GetIdentifier() && frame->IsMain()) {
// Set the edit window text
std::string urlStr(url);
gtk_entry_set_text(GTK_ENTRY(m_EditHwnd), urlStr.c_str());
}
}
void ClientHandler::OnTitleChange(CefRefPtr<CefBrowser> browser,
const CefString& title) {
REQUIRE_UI_THREAD();
GtkWidget* window = gtk_widget_get_ancestor(
GTK_WIDGET(browser->GetHost()->GetWindowHandle()),
GTK_TYPE_WINDOW);
std::string titleStr(title);
gtk_window_set_title(GTK_WINDOW(window), titleStr.c_str());
}
void ClientHandler::SendNotification(NotificationType type) {
// TODO(port): Implement this method.
}
void ClientHandler::SetLoading(bool isLoading) {
if (isLoading)
gtk_widget_set_sensitive(GTK_WIDGET(m_StopHwnd), true);
else
gtk_widget_set_sensitive(GTK_WIDGET(m_StopHwnd), false);
}
void ClientHandler::SetNavState(bool canGoBack, bool canGoForward) {
if (canGoBack)
gtk_widget_set_sensitive(GTK_WIDGET(m_BackHwnd), true);
else
gtk_widget_set_sensitive(GTK_WIDGET(m_BackHwnd), false);
if (canGoForward)
gtk_widget_set_sensitive(GTK_WIDGET(m_ForwardHwnd), true);
else
gtk_widget_set_sensitive(GTK_WIDGET(m_ForwardHwnd), false);
}
void ClientHandler::CloseMainWindow() {
// TODO(port): Close main window.
}
std::string ClientHandler::GetDownloadPath(const std::string& file_name) {
return std::string();
}
-182
Ver Arquivo
@@ -1,182 +0,0 @@
#import <AppKit/AppKit.h>
#import <iostream>
#import "include/cef_browser.h"
#import "include/cef_frame.h"
#import "native/atom_cef_client.h"
#import "atom_application.h"
#import "atom_window_controller.h"
#import "atom_application.h"
void AtomCefClient::FocusNextWindow() {
NSArray *windows = [NSApp windows];
int count = [windows count];
int start = [windows indexOfObject:[NSApp keyWindow]];
int i = start;
while (true) {
i = (i + 1) % count;
if (i == start) break;
NSWindow *window = [windows objectAtIndex:i];
if ([window isVisible] && ![window isExcludedFromWindowsMenu]) {
[window makeKeyAndOrderFront:nil];
break;
}
}
}
void AtomCefClient::FocusPreviousWindow() {
NSArray *windows = [NSApp windows];
int count = [windows count];
int start = [windows indexOfObject:[NSApp keyWindow]];
int i = start;
while (true) {
i = i - 1;
if (i == 0) i = count -1;
if (i == start) break;
NSWindow *window = [windows objectAtIndex:i];
if ([window isVisible] && ![window isExcludedFromWindowsMenu]) {
[window makeKeyAndOrderFront:nil];
break;
}
}
}
void AtomCefClient::Open(std::string path) {
NSString *pathString = [NSString stringWithCString:path.c_str() encoding:NSUTF8StringEncoding];
[(AtomApplication *)[AtomApplication sharedApplication] open:pathString];
}
void AtomCefClient::Open() {
NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel setCanChooseDirectories:YES];
if ([panel runModal] == NSFileHandlingPanelOKButton) {
NSURL *url = [[panel URLs] lastObject];
Open([[url path] UTF8String]);
}
}
void AtomCefClient::OpenDev(std::string path) {
NSString *pathString = [NSString stringWithCString:path.c_str() encoding:NSUTF8StringEncoding];
[(AtomApplication *)[AtomApplication sharedApplication] openDev:pathString];
}
void AtomCefClient::OpenDev() {
NSOpenPanel *panel = [NSOpenPanel openPanel];
[panel setCanChooseDirectories:YES];
if ([panel runModal] == NSFileHandlingPanelOKButton) {
NSURL *url = [[panel URLs] lastObject];
OpenDev([[url path] UTF8String]);
}
}
void AtomCefClient::NewWindow() {
[(AtomApplication *)[AtomApplication sharedApplication] open:nil];
}
void AtomCefClient::OpenConfig() {
[(AtomApplication *)[AtomApplication sharedApplication] openConfig];
}
void AtomCefClient::Confirm(int replyId,
std::string message,
std::string detailedMessage,
std::vector<std::string> buttonLabels,
CefRefPtr<CefBrowser> browser) {
NSAlert *alert = [[[NSAlert alloc] init] autorelease];
[alert setMessageText:[NSString stringWithCString:message.c_str() encoding:NSUTF8StringEncoding]];
[alert setInformativeText:[NSString stringWithCString:detailedMessage.c_str() encoding:NSUTF8StringEncoding]];
for (int i = 0; i < buttonLabels.size(); i++) {
NSString *title = [NSString stringWithCString:buttonLabels[i].c_str() encoding:NSUTF8StringEncoding];
NSButton *button = [alert addButtonWithTitle:title];
[button setTag:i];
}
NSUInteger clickedButtonTag = [alert runModal];
CefRefPtr<CefProcessMessage> replyMessage = CefProcessMessage::Create("reply");
CefRefPtr<CefListValue> replyArguments = replyMessage->GetArgumentList();
replyArguments->SetSize(1);
replyArguments->SetList(0, CreateReplyDescriptor(replyId, clickedButtonTag));
browser->SendProcessMessage(PID_RENDERER, replyMessage);
}
void AtomCefClient::OnTitleChange(CefRefPtr<CefBrowser> browser, const CefString& title) {
if (m_IgnoreTitleChanges) return;
NSWindow *window = [browser->GetHost()->GetWindowHandle() window];
[window setTitle:[NSString stringWithUTF8String:title.ToString().c_str()]];
}
void AtomCefClient::ToggleDevTools(CefRefPtr<CefBrowser> browser) {
AtomWindowController *windowController = [[browser->GetHost()->GetWindowHandle() window] windowController];
[windowController toggleDevTools];
}
void AtomCefClient::ShowDevTools(CefRefPtr<CefBrowser> browser) {
AtomWindowController *windowController = [[browser->GetHost()->GetWindowHandle() window] windowController];
[windowController showDevTools];
}
void AtomCefClient::Show(CefRefPtr<CefBrowser> browser) {
AtomWindowController *windowController = [[browser->GetHost()->GetWindowHandle() window] windowController];
[windowController.webView setHidden:NO];
}
void AtomCefClient::ToggleFullScreen(CefRefPtr<CefBrowser> browser) {
[[browser->GetHost()->GetWindowHandle() window] toggleFullScreen:nil];
}
void AtomCefClient::ShowSaveDialog(int replyId, CefRefPtr<CefBrowser> browser) {
CefRefPtr<CefProcessMessage> replyMessage = CefProcessMessage::Create("reply");
CefRefPtr<CefListValue> replyArguments = replyMessage->GetArgumentList();
NSSavePanel *panel = [NSSavePanel savePanel];
if ([panel runModal] == NSFileHandlingPanelOKButton) {
CefString path = CefString([[[panel URL] path] UTF8String]);
replyArguments->SetSize(2);
replyArguments->SetString(1, path);
}
else {
replyArguments->SetSize(1);
}
replyArguments->SetList(0, CreateReplyDescriptor(replyId, 0));
browser->SendProcessMessage(PID_RENDERER, replyMessage);
}
CefRefPtr<CefListValue> AtomCefClient::CreateReplyDescriptor(int replyId, int callbackIndex) {
CefRefPtr<CefListValue> descriptor = CefListValue::Create();
descriptor->SetSize(2);
descriptor->SetInt(0, replyId);
descriptor->SetInt(1, callbackIndex);
return descriptor;
}
void AtomCefClient::Exit(int status) {
exit(status);
}
void AtomCefClient::Log(const char *message) {
NSLog(@"%s", message);
}
void AtomCefClient::GetVersion(int replyId, CefRefPtr<CefBrowser> browser) {
CefRefPtr<CefProcessMessage> replyMessage = CefProcessMessage::Create("reply");
CefRefPtr<CefListValue> replyArguments = replyMessage->GetArgumentList();
NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
replyArguments->SetSize(2);
replyArguments->SetString(1, [version UTF8String]);
replyArguments->SetList(0, CreateReplyDescriptor(replyId, 0));
browser->SendProcessMessage(PID_RENDERER, replyMessage);
}
bool AtomCefClient::DoClose(CefRefPtr<CefBrowser> browser) {
m_IsClosed = true;
NSWindow *window = [browser->GetHost()->GetWindowHandle() window];
[window performClose:window];
return false;
}
-86
Ver Arquivo
@@ -1,86 +0,0 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#include "cefclient/client_handler.h"
#include <string>
#include <windows.h>
#include <shlobj.h>
#include "include/cef_browser.h"
#include "include/cef_frame.h"
#include "cefclient/resource.h"
void ClientHandler::OnAddressChange(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
const CefString& url) {
REQUIRE_UI_THREAD();
if (m_BrowserId == browser->GetIdentifier() && frame->IsMain()) {
// Set the edit window text
SetWindowText(m_EditHwnd, std::wstring(url).c_str());
}
}
void ClientHandler::OnTitleChange(CefRefPtr<CefBrowser> browser,
const CefString& title) {
REQUIRE_UI_THREAD();
// Set the frame window title bar
CefWindowHandle hwnd = browser->GetHost()->GetWindowHandle();
if (m_BrowserId == browser->GetIdentifier()) {
// The frame window will be the parent of the browser window
hwnd = GetParent(hwnd);
}
SetWindowText(hwnd, std::wstring(title).c_str());
}
void ClientHandler::SendNotification(NotificationType type) {
UINT id;
switch (type) {
case NOTIFY_CONSOLE_MESSAGE:
id = ID_WARN_CONSOLEMESSAGE;
break;
case NOTIFY_DOWNLOAD_COMPLETE:
id = ID_WARN_DOWNLOADCOMPLETE;
break;
case NOTIFY_DOWNLOAD_ERROR:
id = ID_WARN_DOWNLOADERROR;
break;
default:
return;
}
PostMessage(m_MainHwnd, WM_COMMAND, id, 0);
}
void ClientHandler::SetLoading(bool isLoading) {
ASSERT(m_EditHwnd != NULL && m_ReloadHwnd != NULL && m_StopHwnd != NULL);
EnableWindow(m_EditHwnd, TRUE);
EnableWindow(m_ReloadHwnd, !isLoading);
EnableWindow(m_StopHwnd, isLoading);
}
void ClientHandler::SetNavState(bool canGoBack, bool canGoForward) {
ASSERT(m_BackHwnd != NULL && m_ForwardHwnd != NULL);
EnableWindow(m_BackHwnd, canGoBack);
EnableWindow(m_ForwardHwnd, canGoForward);
}
void ClientHandler::CloseMainWindow() {
::PostMessage(m_MainHwnd, WM_CLOSE, 0, 0);
}
std::string ClientHandler::GetDownloadPath(const std::string& file_name) {
TCHAR szFolderPath[MAX_PATH];
std::string path;
// Save the file in the user's "My Documents" folder.
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PERSONAL | CSIDL_FLAG_CREATE,
NULL, 0, szFolderPath))) {
path = CefString(szFolderPath);
path += "\\" + file_name;
}
return path;
}
-27
Ver Arquivo
@@ -1,27 +0,0 @@
#ifndef ATOM_CEF_RENDER_PROCESS_HANDLER_H_
#define ATOM_CEF_RENDER_PROCESS_HANDLER_H_
#pragma once
#include "include/cef_app.h"
class AtomCefRenderProcessHandler : public CefRenderProcessHandler {
virtual void OnWebKitInitialized() OVERRIDE;
virtual void OnContextCreated(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context) OVERRIDE;
virtual void OnContextReleased(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context) OVERRIDE;
virtual bool OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) OVERRIDE;
void Reload(CefRefPtr<CefBrowser> browser);
bool CallMessageReceivedHandler(CefRefPtr<CefV8Context> context, CefRefPtr<CefProcessMessage> message);
void InjectExtensionsIntoV8Context(CefRefPtr<CefV8Context> context);
IMPLEMENT_REFCOUNTING(AtomCefRenderProcessHandler);
};
#endif // ATOM_CEF_RENDER_PROCESS_HANDLER_H_
-83
Ver Arquivo
@@ -1,83 +0,0 @@
#import <iostream>
#import "native/v8_extensions/atom.h"
#import "native/v8_extensions/native.h"
#import "native/message_translation.h"
#import "atom_cef_render_process_handler.h"
void AtomCefRenderProcessHandler::OnWebKitInitialized() {
}
void AtomCefRenderProcessHandler::OnContextCreated(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context) {
InjectExtensionsIntoV8Context(context);
}
void AtomCefRenderProcessHandler::OnContextReleased(CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame> frame,
CefRefPtr<CefV8Context> context) {
}
bool AtomCefRenderProcessHandler::OnProcessMessageReceived(CefRefPtr<CefBrowser> browser,
CefProcessId source_process,
CefRefPtr<CefProcessMessage> message) {
std::string name = message->GetName().ToString();
if (name == "reload") {
Reload(browser);
return true;
}
else {
return CallMessageReceivedHandler(browser->GetMainFrame()->GetV8Context(), message);
}
}
void AtomCefRenderProcessHandler::Reload(CefRefPtr<CefBrowser> browser) {
CefRefPtr<CefV8Context> context = browser->GetMainFrame()->GetV8Context();
CefRefPtr<CefV8Value> global = context->GetGlobal();
context->Enter();
CefV8ValueList arguments;
CefRefPtr<CefV8Value> reloadFunction = global->GetValue("reload");
reloadFunction->ExecuteFunction(global, arguments);
if (!reloadFunction->IsFunction() || reloadFunction->HasException()) {
browser->ReloadIgnoreCache();
}
context->Exit();
}
bool AtomCefRenderProcessHandler::CallMessageReceivedHandler(CefRefPtr<CefV8Context> context, CefRefPtr<CefProcessMessage> message) {
context->Enter();
CefRefPtr<CefV8Value> atom = context->GetGlobal()->GetValue("atom");
CefRefPtr<CefV8Value> receiveFn = atom->GetValue("receiveMessageFromBrowserProcess");
CefV8ValueList arguments;
arguments.push_back(CefV8Value::CreateString(message->GetName().ToString()));
CefRefPtr<CefListValue> messageArguments = message->GetArgumentList();
if (messageArguments->GetSize() > 0) {
CefRefPtr<CefV8Value> data = CefV8Value::CreateArray(messageArguments->GetSize());
TranslateList(messageArguments, data);
arguments.push_back(data);
}
receiveFn->ExecuteFunction(atom, arguments);
context->Exit();
if (receiveFn->HasException()) {
std::cout << "ERROR: Exception in JS receiving message " << message->GetName().ToString() << "\n";
return false;
}
else {
return true;
}
}
void AtomCefRenderProcessHandler::InjectExtensionsIntoV8Context(CefRefPtr<CefV8Context> context) {
// these objects are deleted when the context removes all references to them
(new v8_extensions::Atom())->CreateContextBinding(context);
(new v8_extensions::Native())->CreateContextBinding(context);
}
-408
Ver Arquivo
@@ -1,408 +0,0 @@
// Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#include <gtk/gtk.h>
#include <stdlib.h>
#include <unistd.h>
#include <string>
#include "cefclient/cefclient.h"
#include "include/cef_app.h"
#include "include/cef_browser.h"
#include "include/cef_frame.h"
#include "include/cef_runnable.h"
#include "cefclient/binding_test.h"
#include "cefclient/client_handler.h"
#include "cefclient/dom_test.h"
#include "cefclient/scheme_test.h"
#include "cefclient/string_util.h"
char szWorkingDir[512]; // The current working directory
// The global ClientHandler reference.
extern CefRefPtr<ClientHandler> g_handler;
void destroy(void) {
CefQuitMessageLoop();
}
void TerminationSignalHandler(int signatl) {
destroy();
}
// Callback for Debug > Get Source... menu item.
gboolean GetSourceActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
RunGetSourceTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > Get Source... menu item.
gboolean GetTextActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
RunGetTextTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > Request... menu item.
gboolean RequestActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
RunRequestTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > Local Storage... menu item.
gboolean LocalStorageActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
RunLocalStorageTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > XMLHttpRequest... menu item.
gboolean XMLHttpRequestActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
RunXMLHTTPRequestTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > Scheme Handler... menu item.
gboolean SchemeHandlerActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
scheme_test::RunTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > JavaScript Binding... menu item.
gboolean BindingActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
binding_test::RunTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > Plugin Info... menu item.
gboolean PluginInfoActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
RunPluginInfoTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > DOM Access... menu item.
gboolean DOMAccessActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
dom_test::RunTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > Popup Window... menu item.
gboolean PopupWindowActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
RunPopupTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > Accelerated 2D Canvas... menu item.
gboolean Accelerated2DCanvasActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
RunAccelerated2DCanvasTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > Accelerated Layers... menu item.
gboolean AcceleratedLayersActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
RunAcceleratedLayersTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > WebGL... menu item.
gboolean WebGLActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
RunWebGLTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > HTML5 Video... menu item.
gboolean HTML5VideoActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
RunHTML5VideoTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > HTML5 Drag & Drop... menu item.
gboolean HTML5DragDropActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId())
RunDragDropTest(g_handler->GetBrowser());
return FALSE; // Don't stop this message.
}
// Callback for Debug > Zoom In... menu item.
gboolean ZoomInActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId()) {
CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
browser->GetHost()->SetZoomLevel(browser->GetHost()->GetZoomLevel() + 0.5);
}
return FALSE; // Don't stop this message.
}
// Callback for Debug > Zoom Out... menu item.
gboolean ZoomOutActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId()) {
CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
browser->GetHost()->SetZoomLevel(browser->GetHost()->GetZoomLevel() - 0.5);
}
return FALSE; // Don't stop this message.
}
// Callback for Debug > Zoom Reset... menu item.
gboolean ZoomResetActivated(GtkWidget* widget) {
if (g_handler.get() && g_handler->GetBrowserId()) {
CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
browser->GetHost()->SetZoomLevel(0.0);
}
return FALSE; // Don't stop this message.
}
// Callback for when you click the back button.
void BackButtonClicked(GtkButton* button) {
if (g_handler.get() && g_handler->GetBrowserId())
g_handler->GetBrowser()->GoBack();
}
// Callback for when you click the forward button.
void ForwardButtonClicked(GtkButton* button) {
if (g_handler.get() && g_handler->GetBrowserId())
g_handler->GetBrowser()->GoForward();
}
// Callback for when you click the stop button.
void StopButtonClicked(GtkButton* button) {
if (g_handler.get() && g_handler->GetBrowserId())
g_handler->GetBrowser()->StopLoad();
}
// Callback for when you click the reload button.
void ReloadButtonClicked(GtkButton* button) {
if (g_handler.get() && g_handler->GetBrowserId())
g_handler->GetBrowser()->Reload();
}
// Callback for when you press enter in the URL box.
void URLEntryActivate(GtkEntry* entry) {
if (!g_handler.get() || !g_handler->GetBrowserId())
return;
const gchar* url = gtk_entry_get_text(entry);
g_handler->GetBrowser()->GetMainFrame()->LoadURL(std::string(url).c_str());
}
// GTK utility functions ----------------------------------------------
GtkWidget* AddMenuEntry(GtkWidget* menu_widget, const char* text,
GCallback callback) {
GtkWidget* entry = gtk_menu_item_new_with_label(text);
g_signal_connect(entry, "activate", callback, NULL);
gtk_menu_shell_append(GTK_MENU_SHELL(menu_widget), entry);
return entry;
}
GtkWidget* CreateMenu(GtkWidget* menu_bar, const char* text) {
GtkWidget* menu_widget = gtk_menu_new();
GtkWidget* menu_header = gtk_menu_item_new_with_label(text);
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menu_header), menu_widget);
gtk_menu_shell_append(GTK_MENU_SHELL(menu_bar), menu_header);
return menu_widget;
}
GtkWidget* CreateMenuBar() {
GtkWidget* menu_bar = gtk_menu_bar_new();
GtkWidget* debug_menu = CreateMenu(menu_bar, "Tests");
AddMenuEntry(debug_menu, "Get Source",
G_CALLBACK(GetSourceActivated));
AddMenuEntry(debug_menu, "Get Text",
G_CALLBACK(GetTextActivated));
AddMenuEntry(debug_menu, "Request",
G_CALLBACK(RequestActivated));
AddMenuEntry(debug_menu, "Local Storage",
G_CALLBACK(LocalStorageActivated));
AddMenuEntry(debug_menu, "XMLHttpRequest",
G_CALLBACK(XMLHttpRequestActivated));
AddMenuEntry(debug_menu, "Scheme Handler",
G_CALLBACK(SchemeHandlerActivated));
AddMenuEntry(debug_menu, "JavaScript Binding",
G_CALLBACK(BindingActivated));
AddMenuEntry(debug_menu, "Plugin Info",
G_CALLBACK(PluginInfoActivated));
AddMenuEntry(debug_menu, "DOM Access",
G_CALLBACK(DOMAccessActivated));
AddMenuEntry(debug_menu, "Popup Window",
G_CALLBACK(PopupWindowActivated));
AddMenuEntry(debug_menu, "Accelerated 2D Canvas",
G_CALLBACK(Accelerated2DCanvasActivated));
AddMenuEntry(debug_menu, "Accelerated Layers",
G_CALLBACK(AcceleratedLayersActivated));
AddMenuEntry(debug_menu, "WebGL",
G_CALLBACK(WebGLActivated));
AddMenuEntry(debug_menu, "HTML5 Video",
G_CALLBACK(HTML5VideoActivated));
AddMenuEntry(debug_menu, "HTML5 Drag & Drop",
G_CALLBACK(HTML5DragDropActivated));
AddMenuEntry(debug_menu, "Zoom In",
G_CALLBACK(ZoomInActivated));
AddMenuEntry(debug_menu, "Zoom Out",
G_CALLBACK(ZoomOutActivated));
AddMenuEntry(debug_menu, "Zoom Reset",
G_CALLBACK(ZoomResetActivated));
return menu_bar;
}
// WebViewDelegate::TakeFocus in the test webview delegate.
static gboolean HandleFocus(GtkWidget* widget,
GdkEventFocus* focus) {
if (g_handler.get() && g_handler->GetBrowserId()) {
// Give focus to the browser window.
g_handler->GetBrowser()->GetHost()->SetFocus(true);
}
return TRUE;
}
int main(int argc, char* argv[]) {
CefMainArgs main_args(argc, argv);
CefRefPtr<ClientApp> app(new ClientApp);
// Execute the secondary process, if any.
int exit_code = CefExecuteProcess(main_args, app.get());
if (exit_code >= 0)
return exit_code;
if (!getcwd(szWorkingDir, sizeof (szWorkingDir)))
return -1;
GtkWidget* window;
gtk_init(&argc, &argv);
// Parse command line arguments.
AppInitCommandLine(argc, argv);
CefSettings settings;
// Populate the settings based on command line arguments.
AppGetSettings(settings, app);
// Initialize CEF.
CefInitialize(main_args, settings, app.get());
// Register the scheme handler.
scheme_test::InitTest();
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_default_size(GTK_WINDOW(window), 800, 600);
g_signal_connect(window, "focus", G_CALLBACK(&HandleFocus), NULL);
GtkWidget* vbox = gtk_vbox_new(FALSE, 0);
GtkWidget* menu_bar = CreateMenuBar();
gtk_box_pack_start(GTK_BOX(vbox), menu_bar, FALSE, FALSE, 0);
GtkWidget* toolbar = gtk_toolbar_new();
// Turn off the labels on the toolbar buttons.
gtk_toolbar_set_style(GTK_TOOLBAR(toolbar), GTK_TOOLBAR_ICONS);
GtkToolItem* back = gtk_tool_button_new_from_stock(GTK_STOCK_GO_BACK);
g_signal_connect(back, "clicked",
G_CALLBACK(BackButtonClicked), NULL);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), back, -1 /* append */);
GtkToolItem* forward = gtk_tool_button_new_from_stock(GTK_STOCK_GO_FORWARD);
g_signal_connect(forward, "clicked",
G_CALLBACK(ForwardButtonClicked), NULL);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), forward, -1 /* append */);
GtkToolItem* reload = gtk_tool_button_new_from_stock(GTK_STOCK_REFRESH);
g_signal_connect(reload, "clicked",
G_CALLBACK(ReloadButtonClicked), NULL);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), reload, -1 /* append */);
GtkToolItem* stop = gtk_tool_button_new_from_stock(GTK_STOCK_STOP);
g_signal_connect(stop, "clicked",
G_CALLBACK(StopButtonClicked), NULL);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), stop, -1 /* append */);
GtkWidget* m_editWnd = gtk_entry_new();
g_signal_connect(G_OBJECT(m_editWnd), "activate",
G_CALLBACK(URLEntryActivate), NULL);
GtkToolItem* tool_item = gtk_tool_item_new();
gtk_container_add(GTK_CONTAINER(tool_item), m_editWnd);
gtk_tool_item_set_expand(tool_item, TRUE);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), tool_item, -1); // append
gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0);
g_signal_connect(G_OBJECT(window), "destroy",
G_CALLBACK(gtk_widget_destroyed), &window);
g_signal_connect(G_OBJECT(window), "destroy",
G_CALLBACK(destroy), NULL);
// Create the handler.
g_handler = new ClientHandler();
g_handler->SetMainHwnd(vbox);
g_handler->SetEditHwnd(m_editWnd);
g_handler->SetButtonHwnds(GTK_WIDGET(back), GTK_WIDGET(forward),
GTK_WIDGET(reload), GTK_WIDGET(stop));
// Create the browser view.
CefWindowInfo window_info;
CefBrowserSettings browserSettings;
// Populate the settings based on command line arguments.
AppGetBrowserSettings(browserSettings);
window_info.SetAsChild(vbox);
CefBrowserHost::CreateBrowserSync(
window_info, g_handler.get(),
g_handler->GetStartupURL(), browserSettings);
gtk_container_add(GTK_CONTAINER(window), vbox);
gtk_widget_show_all(GTK_WIDGET(window));
// Install an signal handler so we clean up after ourselves.
signal(SIGINT, TerminationSignalHandler);
signal(SIGTERM, TerminationSignalHandler);
CefRunMessageLoop();
CefShutdown();
return 0;
}
// Global functions
std::string AppGetWorkingDirectory() {
return szWorkingDir;
}
-1
Ver Arquivo
@@ -1 +0,0 @@
__attribute__((visibility("default"))) int AtomMain(int argc, char* argv[]);
-139
Ver Arquivo
@@ -1,139 +0,0 @@
#import "atom_main.h"
#import "atom_cef_app.h"
#import "include/cef_application_mac.h"
#import "native/atom_application.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
void sendPathToMainProcessAndExit(int fd, NSString *socketPath, NSDictionary *arguments);
void handleBeingOpenedAgain(int argc, char* argv[]);
void listenForPathToOpen(int fd, NSString *socketPath);
void activateOpenApp();
BOOL isAppAlreadyOpen();
int AtomMain(int argc, char* argv[]) {
// Check if we're being run as a secondary process.
CefMainArgs main_args(argc, argv);
CefRefPtr<CefApp> app(new AtomCefApp);
int exitCode = CefExecuteProcess(main_args, app);
if (exitCode >= 0)
return exitCode;
// We're the main process.
@autoreleasepool {
handleBeingOpenedAgain(argc, argv);
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
AtomApplication *application = [AtomApplication applicationWithArguments:argv count:argc];
NSString *mainNibName = [infoDictionary objectForKey:@"NSMainNibFile"];
NSNib *mainNib = [[NSNib alloc] initWithNibNamed:mainNibName bundle:[NSBundle bundleWithIdentifier:@"com.github.atom.framework"]];
[mainNib instantiateWithOwner:application topLevelObjects:nil];
CefRunMessageLoop();
CefShutdown();
}
return 0;
}
void handleBeingOpenedAgain(int argc, char* argv[]) {
NSString *socketPath = [NSString stringWithFormat:@"/tmp/atom-%d.sock", getuid()];
int fd = socket(AF_UNIX, SOCK_DGRAM, 0);
fcntl(fd, F_SETFD, FD_CLOEXEC);
if (isAppAlreadyOpen()) {
NSDictionary *arguments = [AtomApplication parseArguments:argv count:argc];
sendPathToMainProcessAndExit(fd, socketPath, arguments);
}
else {
listenForPathToOpen(fd, socketPath);
}
}
void sendPathToMainProcessAndExit(int fd, NSString *socketPath, NSDictionary *arguments) {
struct sockaddr_un send_addr;
send_addr.sun_family = AF_UNIX;
strcpy(send_addr.sun_path, [socketPath UTF8String]);
NSString *path = [arguments objectForKey:@"path"];
if (path) {
NSMutableString *packedString = [NSMutableString stringWithString:path];
if ([arguments objectForKey:@"wait"]) {
[packedString appendFormat:@"\n%@", [arguments objectForKey:@"pid"]];
}
const char *buf = [packedString UTF8String];
if (sendto(fd, buf, [packedString lengthOfBytesUsingEncoding:NSUTF8StringEncoding], 0, (sockaddr *)&send_addr, sizeof(send_addr)) < 0) {
perror("Error: Failed to sending path to main Atom process");
exit(1);
}
} else {
activateOpenApp();
}
exit(0);
}
void listenForPathToOpen(int fd, NSString *socketPath) {
struct sockaddr_un addr;
addr.sun_family = AF_UNIX;
strcpy(addr.sun_path, [socketPath UTF8String]);
unlink([socketPath UTF8String]);
if (bind(fd, (sockaddr*)&addr, sizeof(addr)) < 0) {
perror("ERROR: Binding to socket");
}
else {
dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_async(queue, ^{
char buf[MAXPATHLEN + 16]; // Add 16 to hold the pid string
struct sockaddr_un listen_addr;
listen_addr.sun_family = AF_UNIX;
strcpy(listen_addr.sun_path, [socketPath UTF8String]);
socklen_t listen_addr_length;
while(true) {
memset(buf, 0, sizeof(buf));
if (recvfrom(fd, &buf, sizeof(buf), 0, (sockaddr *)&listen_addr, &listen_addr_length) < 0) {
perror("ERROR: Receiving from socket");
}
else {
NSArray *components = [[NSString stringWithUTF8String:buf] componentsSeparatedByString:@"\n"];
NSString *path = [components objectAtIndex:0];
NSNumber *pid = nil;
if (components.count > 1) pid = [NSNumber numberWithInt:[[components objectAtIndex:1] intValue]];
dispatch_queue_t mainQueue = dispatch_get_main_queue();
dispatch_async(mainQueue, ^{
[[AtomApplication sharedApplication] open:path pidToKillWhenWindowCloses:pid];
[NSApp activateIgnoringOtherApps:YES];
});
}
}
});
}
}
void activateOpenApp() {
for (NSRunningApplication *app in [[NSWorkspace sharedWorkspace] runningApplications]) {
BOOL hasSameBundleId = [app.bundleIdentifier isEqualToString:[[NSBundle mainBundle] bundleIdentifier]];
BOOL hasSameProcessesId = app.processIdentifier == [[NSProcessInfo processInfo] processIdentifier];
if (hasSameBundleId && !hasSameProcessesId) {
[app activateWithOptions:NSApplicationActivateIgnoringOtherApps];
return;
}
}
}
BOOL isAppAlreadyOpen() {
for (NSRunningApplication *app in [[NSWorkspace sharedWorkspace] runningApplications]) {
BOOL hasSameBundleId = [app.bundleIdentifier isEqualToString:[[NSBundle mainBundle] bundleIdentifier]];
BOOL hasSameProcessesId = app.processIdentifier == [[NSProcessInfo processInfo] processIdentifier];
if (hasSameBundleId && !hasSameProcessesId) {
return true;
}
}
return false;
}
-546
Ver Arquivo
@@ -1,546 +0,0 @@
// Copyright (c) 2010 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
#include "cefclient/cefclient.h"
#include <windows.h>
#include <commdlg.h>
#include <shellapi.h>
#include <direct.h>
#include <sstream>
#include <string>
#include "include/cef_app.h"
#include "include/cef_browser.h"
#include "include/cef_frame.h"
#include "include/cef_runnable.h"
#include "cefclient/binding_test.h"
#include "cefclient/client_handler.h"
#include "cefclient/dom_test.h"
#include "cefclient/resource.h"
#include "cefclient/scheme_test.h"
#include "cefclient/string_util.h"
#define MAX_LOADSTRING 100
#define MAX_URL_LENGTH 255
#define BUTTON_WIDTH 72
#define URLBAR_HEIGHT 24
// Global Variables:
HINSTANCE hInst; // current instance
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // the main window class name
char szWorkingDir[MAX_PATH]; // The current working directory
// Forward declarations of functions included in this code module:
ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM);
// The global ClientHandler reference.
extern CefRefPtr<ClientHandler> g_handler;
#if defined(OS_WIN)
// Add Common Controls to the application manifest because it's required to
// support the default tooltip implementation.
#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") // NOLINT(whitespace/line_length)
#endif
// Program entry point function.
int APIENTRY wWinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
int nCmdShow) {
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
CefMainArgs main_args(hInstance);
CefRefPtr<ClientApp> app(new ClientApp);
// Execute the secondary process, if any.
int exit_code = CefExecuteProcess(main_args, app.get());
if (exit_code >= 0)
return exit_code;
// Retrieve the current working directory.
if (_getcwd(szWorkingDir, MAX_PATH) == NULL)
szWorkingDir[0] = 0;
// Parse command line arguments. The passed in values are ignored on Windows.
AppInitCommandLine(0, NULL);
CefSettings settings;
// Populate the settings based on command line arguments.
AppGetSettings(settings, app);
// Initialize CEF.
CefInitialize(main_args, settings, app.get());
// Register the scheme handler.
scheme_test::InitTest();
HACCEL hAccelTable;
// Initialize global strings
LoadString(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadString(hInstance, IDC_CEFCLIENT, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hInstance);
// Perform application initialization
if (!InitInstance (hInstance, nCmdShow))
return FALSE;
hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_CEFCLIENT));
int result = 0;
if (!settings.multi_threaded_message_loop) {
// Run the CEF message loop. This function will block until the application
// recieves a WM_QUIT message.
CefRunMessageLoop();
} else {
MSG msg;
// Run the application message loop.
while (GetMessage(&msg, NULL, 0, 0)) {
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
result = static_cast<int>(msg.wParam);
}
// Shut down CEF.
CefShutdown();
return result;
}
//
// FUNCTION: MyRegisterClass()
//
// PURPOSE: Registers the window class.
//
// COMMENTS:
//
// This function and its usage are only necessary if you want this code
// to be compatible with Win32 systems prior to the 'RegisterClassEx'
// function that was added to Windows 95. It is important to call this
// function so that the application will get 'well formed' small icons
// associated with it.
//
ATOM MyRegisterClass(HINSTANCE hInstance) {
WNDCLASSEX wcex;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hInstance = hInstance;
wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_CEFCLIENT));
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = MAKEINTRESOURCE(IDC_CEFCLIENT);
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
return RegisterClassEx(&wcex);
}
//
// FUNCTION: InitInstance(HINSTANCE, int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
// In this function, we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) {
HWND hWnd;
hInst = hInstance; // Store instance handle in our global variable
hWnd = CreateWindow(szWindowClass, szTitle,
WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, CW_USEDEFAULT, 0,
CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
if (!hWnd)
return FALSE;
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}
// Change the zoom factor on the UI thread.
static void ModifyZoom(CefRefPtr<CefBrowser> browser, double delta) {
if (CefCurrentlyOn(TID_UI)) {
browser->GetHost()->SetZoomLevel(
browser->GetHost()->GetZoomLevel() + delta);
} else {
CefPostTask(TID_UI, NewCefRunnableFunction(ModifyZoom, browser, delta));
}
}
//
// FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM)
//
// PURPOSE: Processes messages for the main window.
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
LPARAM lParam) {
static HWND backWnd = NULL, forwardWnd = NULL, reloadWnd = NULL,
stopWnd = NULL, editWnd = NULL;
static WNDPROC editWndOldProc = NULL;
// Static members used for the find dialog.
static FINDREPLACE fr;
static WCHAR szFindWhat[80] = {0};
static WCHAR szLastFindWhat[80] = {0};
static bool findNext = false;
static bool lastMatchCase = false;
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;
if (hWnd == editWnd) {
// Callback for the edit window
switch (message) {
case WM_CHAR:
if (wParam == VK_RETURN && g_handler.get()) {
// When the user hits the enter key load the URL
CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
wchar_t strPtr[MAX_URL_LENGTH+1] = {0};
*((LPWORD)strPtr) = MAX_URL_LENGTH;
LRESULT strLen = SendMessage(hWnd, EM_GETLINE, 0, (LPARAM)strPtr);
if (strLen > 0) {
strPtr[strLen] = 0;
browser->GetMainFrame()->LoadURL(strPtr);
}
return 0;
}
}
return (LRESULT)CallWindowProc(editWndOldProc, hWnd, message, wParam,
lParam);
} else {
// Callback for the main window
switch (message) {
case WM_CREATE: {
// Create the single static handler class instance
g_handler = new ClientHandler();
g_handler->SetMainHwnd(hWnd);
// Create the child windows used for navigation
RECT rect;
int x = 0;
GetClientRect(hWnd, &rect);
backWnd = CreateWindow(L"BUTTON", L"Back",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON
| WS_DISABLED, x, 0, BUTTON_WIDTH, URLBAR_HEIGHT,
hWnd, (HMENU) IDC_NAV_BACK, hInst, 0);
x += BUTTON_WIDTH;
forwardWnd = CreateWindow(L"BUTTON", L"Forward",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON
| WS_DISABLED, x, 0, BUTTON_WIDTH,
URLBAR_HEIGHT, hWnd, (HMENU) IDC_NAV_FORWARD,
hInst, 0);
x += BUTTON_WIDTH;
reloadWnd = CreateWindow(L"BUTTON", L"Reload",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON
| WS_DISABLED, x, 0, BUTTON_WIDTH,
URLBAR_HEIGHT, hWnd, (HMENU) IDC_NAV_RELOAD,
hInst, 0);
x += BUTTON_WIDTH;
stopWnd = CreateWindow(L"BUTTON", L"Stop",
WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON
| WS_DISABLED, x, 0, BUTTON_WIDTH, URLBAR_HEIGHT,
hWnd, (HMENU) IDC_NAV_STOP, hInst, 0);
x += BUTTON_WIDTH;
editWnd = CreateWindow(L"EDIT", 0,
WS_CHILD | WS_VISIBLE | WS_BORDER | ES_LEFT |
ES_AUTOVSCROLL | ES_AUTOHSCROLL| WS_DISABLED,
x, 0, rect.right - BUTTON_WIDTH * 4,
URLBAR_HEIGHT, hWnd, 0, hInst, 0);
// Assign the edit window's WNDPROC to this function so that we can
// capture the enter key
editWndOldProc =
reinterpret_cast<WNDPROC>(GetWindowLongPtr(editWnd, GWLP_WNDPROC));
SetWindowLongPtr(editWnd, GWLP_WNDPROC,
reinterpret_cast<LONG_PTR>(WndProc));
g_handler->SetEditHwnd(editWnd);
g_handler->SetButtonHwnds(backWnd, forwardWnd, reloadWnd, stopWnd);
rect.top += URLBAR_HEIGHT;
CefWindowInfo info;
CefBrowserSettings settings;
// Populate the settings based on command line arguments.
AppGetBrowserSettings(settings);
// Initialize window info to the defaults for a child window
info.SetAsChild(hWnd, rect);
// Creat the new child browser window
CefBrowserHost::CreateBrowser(info, g_handler.get(),
g_handler->GetStartupURL(), settings);
return 0;
}
case WM_COMMAND: {
CefRefPtr<CefBrowser> browser;
if (g_handler.get())
browser = g_handler->GetBrowser();
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId) {
case IDM_ABOUT:
DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About);
return 0;
case IDM_EXIT:
DestroyWindow(hWnd);
return 0;
case ID_WARN_CONSOLEMESSAGE:
if (g_handler.get()) {
std::wstringstream ss;
ss << L"Console messages will be written to "
<< std::wstring(CefString(g_handler->GetLogFile()));
MessageBox(hWnd, ss.str().c_str(), L"Console Messages",
MB_OK | MB_ICONINFORMATION);
}
return 0;
case ID_WARN_DOWNLOADCOMPLETE:
case ID_WARN_DOWNLOADERROR:
if (g_handler.get()) {
std::wstringstream ss;
ss << L"File \"" <<
std::wstring(CefString(g_handler->GetLastDownloadFile())) <<
L"\" ";
if (wmId == ID_WARN_DOWNLOADCOMPLETE)
ss << L"downloaded successfully.";
else
ss << L"failed to download.";
MessageBox(hWnd, ss.str().c_str(), L"File Download",
MB_OK | MB_ICONINFORMATION);
}
return 0;
case IDC_NAV_BACK: // Back button
if (browser.get())
browser->GoBack();
return 0;
case IDC_NAV_FORWARD: // Forward button
if (browser.get())
browser->GoForward();
return 0;
case IDC_NAV_RELOAD: // Reload button
if (browser.get())
browser->Reload();
return 0;
case IDC_NAV_STOP: // Stop button
if (browser.get())
browser->StopLoad();
return 0;
case ID_TESTS_GETSOURCE: // Test the GetSource function
if (browser.get())
RunGetSourceTest(browser);
return 0;
case ID_TESTS_GETTEXT: // Test the GetText function
if (browser.get())
RunGetTextTest(browser);
return 0;
case ID_TESTS_POPUP: // Test a popup window
if (browser.get())
RunPopupTest(browser);
return 0;
case ID_TESTS_REQUEST: // Test a request
if (browser.get())
RunRequestTest(browser);
return 0;
case ID_TESTS_SCHEME_HANDLER: // Test the scheme handler
if (browser.get())
scheme_test::RunTest(browser);
return 0;
case ID_TESTS_BINDING: // Test JavaScript binding
if (browser.get())
binding_test::RunTest(browser);
return 0;
case ID_TESTS_DIALOGS: // Test JavaScript dialogs
if (browser.get())
RunDialogTest(browser);
return 0;
case ID_TESTS_PLUGIN_INFO: // Test plugin info
if (browser.get())
RunPluginInfoTest(browser);
return 0;
case ID_TESTS_DOM_ACCESS: // Test DOM access
if (browser.get())
dom_test::RunTest(browser);
return 0;
case ID_TESTS_LOCALSTORAGE: // Test localStorage
if (browser.get())
RunLocalStorageTest(browser);
return 0;
case ID_TESTS_ACCELERATED2DCANVAS: // Test accelerated 2d canvas
if (browser.get())
RunAccelerated2DCanvasTest(browser);
return 0;
case ID_TESTS_ACCELERATEDLAYERS: // Test accelerated layers
if (browser.get())
RunAcceleratedLayersTest(browser);
return 0;
case ID_TESTS_WEBGL: // Test WebGL
if (browser.get())
RunWebGLTest(browser);
return 0;
case ID_TESTS_HTML5VIDEO: // Test HTML5 video
if (browser.get())
RunHTML5VideoTest(browser);
return 0;
case ID_TESTS_XMLHTTPREQUEST: // Test XMLHttpRequest
if (browser.get())
RunXMLHTTPRequestTest(browser);
return 0;
case ID_TESTS_DRAGDROP: // Test drag & drop
if (browser.get())
RunDragDropTest(browser);
return 0;
case ID_TESTS_GEOLOCATION: // Test geolocation
if (browser.get())
RunGeolocationTest(browser);
return 0;
case ID_TESTS_ZOOM_IN:
if (browser.get())
ModifyZoom(browser, 0.5);
return 0;
case ID_TESTS_ZOOM_OUT:
if (browser.get())
ModifyZoom(browser, -0.5);
return 0;
case ID_TESTS_ZOOM_RESET:
if (browser.get())
browser->GetHost()->SetZoomLevel(0.0);
return 0;
}
break;
}
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
EndPaint(hWnd, &ps);
return 0;
case WM_SETFOCUS:
if (g_handler.get() && g_handler->GetBrowser()) {
// Pass focus to the browser window
CefWindowHandle hwnd =
g_handler->GetBrowser()->GetHost()->GetWindowHandle();
if (hwnd)
PostMessage(hwnd, WM_SETFOCUS, wParam, NULL);
}
return 0;
case WM_SIZE:
// Minimizing resizes the window to 0x0 which causes our layout to go all
// screwy, so we just ignore it.
if (wParam != SIZE_MINIMIZED && g_handler.get() &&
g_handler->GetBrowser()) {
CefWindowHandle hwnd =
g_handler->GetBrowser()->GetHost()->GetWindowHandle();
if (hwnd) {
// Resize the browser window and address bar to match the new frame
// window size
RECT rect;
GetClientRect(hWnd, &rect);
rect.top += URLBAR_HEIGHT;
int urloffset = rect.left + BUTTON_WIDTH * 4;
HDWP hdwp = BeginDeferWindowPos(1);
hdwp = DeferWindowPos(hdwp, editWnd, NULL, urloffset,
0, rect.right - urloffset, URLBAR_HEIGHT, SWP_NOZORDER);
hdwp = DeferWindowPos(hdwp, hwnd, NULL,
rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
SWP_NOZORDER);
EndDeferWindowPos(hdwp);
}
}
break;
case WM_ERASEBKGND:
if (g_handler.get() && g_handler->GetBrowser()) {
CefWindowHandle hwnd =
g_handler->GetBrowser()->GetHost()->GetWindowHandle();
if (hwnd) {
// Dont erase the background if the browser window has been loaded
// (this avoids flashing)
return 0;
}
}
break;
case WM_CLOSE:
if (g_handler.get()) {
CefRefPtr<CefBrowser> browser = g_handler->GetBrowser();
if (browser.get()) {
// Let the browser window know we are about to destroy it.
browser->GetHost()->ParentWindowWillClose();
}
}
break;
case WM_DESTROY:
// The frame window has exited
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hWnd, message, wParam, lParam);
}
}
// Message handler for about box.
INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) {
UNREFERENCED_PARAMETER(lParam);
switch (message) {
case WM_INITDIALOG:
return (INT_PTR)TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) {
EndDialog(hDlg, LOWORD(wParam));
return (INT_PTR)TRUE;
}
break;
}
return (INT_PTR)FALSE;
}
// Global functions
std::string AppGetWorkingDirectory() {
return szWorkingDir;
}
-43
Ver Arquivo
@@ -1,43 +0,0 @@
#include "include/cef_app.h"
class AtomCefClient;
@interface AtomWindowController : NSWindowController <NSWindowDelegate> {
NSSplitView *_splitView;
NSView *_devToolsView;
NSView *_webView;
NSButton *_devButton;
NSString *_bootstrapScript;
NSString *_resourcePath;
NSString *_pathToOpen;
NSNumber *_pidToKillOnClose;
CefRefPtr<AtomCefClient> _cefClient;
CefRefPtr<AtomCefClient> _cefDevToolsClient;
CefRefPtr<CefV8Context> _atomContext;
BOOL _runningSpecs;
BOOL _exitWhenDone;
BOOL _isConfig;
}
@property (nonatomic, retain) IBOutlet NSSplitView *splitView;
@property (nonatomic, retain) IBOutlet NSView *webView;
@property (nonatomic, retain) IBOutlet NSView *devToolsView;
@property (nonatomic, retain) NSString *pathToOpen;
@property (nonatomic) BOOL isConfig;
- (id)initWithPath:(NSString *)path;
- (id)initDevWithPath:(NSString *)path;
- (id)initInBackground;
- (id)initConfig;
- (id)initSpecsThenExit:(BOOL)exitWhenDone;
- (id)initBenchmarksThenExit:(BOOL)exitWhenDone;
- (void)setPidToKillOnClose:(NSNumber *)pid;
- (BOOL)isDevMode;
- (void)toggleDevTools;
- (void)showDevTools;
- (void)openPath:(NSString*)path;
@end
-346
Ver Arquivo
@@ -1,346 +0,0 @@
#import "include/cef_application_mac.h"
#import "include/cef_client.h"
#import "native/atom_cef_client.h"
#import "native/atom_window_controller.h"
#import "native/atom_application.h"
#import <signal.h>
@implementation AtomWindowController
@synthesize splitView=_splitView;
@synthesize webView=_webView;
@synthesize devToolsView=_devToolsView;
@synthesize pathToOpen=_pathToOpen;
@synthesize isConfig=_isConfig;
- (void)dealloc {
[_splitView release];
[_devToolsView release];
[_webView release];
[_devButton release];
[_bootstrapScript release];
[_resourcePath release];
[_pathToOpen release];
_cefClient = NULL;
_cefDevToolsClient = NULL;
[super dealloc];
}
- (id)initWithBootstrapScript:(NSString *)bootstrapScript background:(BOOL)background useBundleResourcePath:(BOOL)useBundleResourcePath {
self = [super initWithWindowNibName:@"AtomWindow"];
_bootstrapScript = [bootstrapScript retain];
AtomApplication *atomApplication = (AtomApplication *)[AtomApplication sharedApplication];
if (useBundleResourcePath) {
_resourcePath = [[NSBundle bundleForClass:self.class] resourcePath];
}
else {
_resourcePath = [[atomApplication.arguments objectForKey:@"resource-path"] stringByStandardizingPath];
if (!_resourcePath) {
NSString *defaultRepositoryPath = [@"~/github/atom" stringByStandardizingPath];
if ([defaultRepositoryPath characterAtIndex:0] == '/') {
BOOL isDir = false;
BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:defaultRepositoryPath isDirectory:&isDir];
if (isDir && exists) {
_resourcePath = defaultRepositoryPath;
}
else {
NSLog(@"Warning: No resource path specified and no directory exists at ~/github/atom");
}
}
}
}
if ([self isDevMode]) {
[self displayDevIcon];
}
_resourcePath = [_resourcePath stringByStandardizingPath];
[_resourcePath retain];
NSMutableArray *paths = [NSMutableArray arrayWithObjects:
@"src/stdlib",
@"src/app",
@"src/packages",
@"src",
@"vendor",
@"static",
@"node_modules",
nil];
NSMutableArray *resourcePaths = [[NSMutableArray alloc] init];
if (_runningSpecs) {
[paths insertObject:@"benchmark" atIndex:0];
[paths insertObject:@"spec" atIndex:0];
NSString *fixturePackagesDirectory = [NSString stringWithFormat:@"%@/spec/fixtures/packages", _resourcePath];
[resourcePaths addObject:fixturePackagesDirectory];
}
NSString *userPackagesDirectory = [@"~/.atom/packages" stringByStandardizingPath];
[resourcePaths addObject:userPackagesDirectory];
for (int i = 0; i < paths.count; i++) {
NSString *fullPath = [NSString stringWithFormat:@"%@/%@", _resourcePath, [paths objectAtIndex:i]];
[resourcePaths addObject:fullPath];
}
[resourcePaths addObject:_resourcePath];
NSString *nodePath = [resourcePaths componentsJoinedByString:@":"];
setenv("NODE_PATH", [nodePath UTF8String], TRUE);
if (!background) {
[self setShouldCascadeWindows:NO];
[self setWindowFrameAutosaveName:@"AtomWindow"];
NSColor *background = [NSColor colorWithDeviceRed:(51.0/255.0) green:(51.0/255.0f) blue:(51.0/255.0f) alpha:1.0];
[self.window setBackgroundColor:background];
if (self.isConfig) {
NSRect frame = self.window.frame;
frame.size.width = 800;
frame.size.height = 600;
[self.window setFrame:frame display: YES];
}
[self showWindow:self];
}
return self;
}
- (id)initWithPath:(NSString *)path {
_pathToOpen = [path retain];
return [self initWithBootstrapScript:@"window-bootstrap" background:NO useBundleResourcePath:![self isDevMode]];
}
- (id)initDevWithPath:(NSString *)path {
_pathToOpen = [path retain];
return [self initWithBootstrapScript:@"window-bootstrap" background:NO useBundleResourcePath:false];
}
- (id)initInBackground {
[self initWithBootstrapScript:@"window-bootstrap" background:YES useBundleResourcePath:![self isDevMode]];
[self.window setFrame:NSMakeRect(0, 0, 0, 0) display:NO];
[self.window setExcludedFromWindowsMenu:YES];
[self.window setCollectionBehavior:NSWindowCollectionBehaviorStationary];
return self;
}
- (id)initSpecsThenExit:(BOOL)exitWhenDone {
_runningSpecs = true;
_exitWhenDone = exitWhenDone;
return [self initWithBootstrapScript:@"spec-bootstrap" background:NO useBundleResourcePath:NO];
}
- (id)initBenchmarksThenExit:(BOOL)exitWhenDone {
_runningSpecs = true;
_exitWhenDone = exitWhenDone;
return [self initWithBootstrapScript:@"benchmark-bootstrap" background:NO useBundleResourcePath:NO];
}
- (id)initConfig {
_isConfig = true;
return [self initWithBootstrapScript:@"config-bootstrap" background:NO useBundleResourcePath:![self isDevMode]];
}
- (void)addBrowserToView:(NSView *)view url:(const char *)url cefHandler:(CefRefPtr<AtomCefClient>)cefClient {
CefBrowserSettings settings;
[self populateBrowserSettings:settings];
CefWindowInfo window_info;
window_info.SetAsChild(view, 0, 0, view.bounds.size.width, view.bounds.size.height);
CefBrowserHost::CreateBrowser(window_info, cefClient.get(), url, settings);
}
- (NSString *)encodeUrlParam:(NSString *)param {
param = [param stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
param = [param stringByReplacingOccurrencesOfString:@"&" withString:@"%26"];
return param;
}
- (void)windowDidLoad {
[self.window setDelegate:self];
[self performSelector:@selector(attachWebView) withObject:nil afterDelay:0];
}
// If this is run directly in windowDidLoad, the web view doesn't
// have the correct initial size based on the frame's last stored size.
// HACK: I hate this and want to place this code directly in windowDidLoad
- (void)attachWebView {
NSMutableString *urlString = [NSMutableString string];
NSURL *indexUrl = [[NSURL alloc] initFileURLWithPath:[_resourcePath stringByAppendingPathComponent:@"static/index.html"]];
[urlString appendString:[indexUrl absoluteString]];
[urlString appendFormat:@"?bootstrapScript=%@", [self encodeUrlParam:_bootstrapScript]];
[urlString appendFormat:@"&resourcePath=%@", [self encodeUrlParam:_resourcePath]];
if ([self isDevMode])
[urlString appendFormat:@"&devMode=1"];
if (_exitWhenDone)
[urlString appendString:@"&exitWhenDone=1"];
if (_pathToOpen)
[urlString appendFormat:@"&pathToOpen=%@", [self encodeUrlParam:_pathToOpen]];
_cefClient = new AtomCefClient();
[self.webView setHidden:YES];
[self addBrowserToView:self.webView url:[urlString UTF8String] cefHandler:_cefClient];
}
- (BOOL)isBrowserUsable {
return _cefClient && !_cefClient->IsClosed() && _cefClient->GetBrowser();
}
- (void)toggleDevTools {
if (_devToolsView) {
[self hideDevTools];
}
else {
[self showDevTools];
}
}
- (void)showDevTools {
if (_devToolsView) return;
if (![self isBrowserUsable]) return;
NSRect webViewFrame = _webView.frame;
NSRect devToolsViewFrame = _webView.frame;
devToolsViewFrame.size.height = NSHeight(webViewFrame) / 3;
webViewFrame.size.height = NSHeight(webViewFrame) - NSHeight(devToolsViewFrame);
[_webView setFrame:webViewFrame];
_devToolsView = [[NSView alloc] initWithFrame:devToolsViewFrame];
[_splitView addSubview:_devToolsView];
[_splitView adjustSubviews];
_cefDevToolsClient = new AtomCefClient(true, true);
std::string devtools_url = _cefClient->GetBrowser()->GetHost()->GetDevToolsURL(true);
[self addBrowserToView:_devToolsView url:devtools_url.c_str() cefHandler:_cefDevToolsClient];
}
- (void)hideDevTools {
[_devToolsView removeFromSuperview];
[_splitView adjustSubviews];
[_devToolsView release];
_devToolsView = nil;
_cefDevToolsClient = NULL;
if ([self isBrowserUsable]) {
_cefClient->GetBrowser()->GetHost()->SetFocus(true);
}
}
- (void)openPath:(NSString*)path {
if (![self isBrowserUsable]) return;
CefRefPtr<CefProcessMessage> openMessage = CefProcessMessage::Create("openPath");
CefRefPtr<CefListValue> openArguments = openMessage->GetArgumentList();
openArguments->SetSize(1);
openArguments->SetString(0, [path UTF8String]);
_cefClient->GetBrowser()->SendProcessMessage(PID_RENDERER, openMessage);
}
- (void)setPidToKillOnClose:(NSNumber *)pid {
_pidToKillOnClose = [pid retain];
}
# pragma mark NSWindowDelegate
- (void)windowDidResignMain:(NSNotification *)notification {
if (!_runningSpecs) {
[self.window makeFirstResponder:nil];
}
}
- (void)windowDidBecomeMain:(NSNotification *)notification {
if ([self isBrowserUsable]) {
_cefClient->GetBrowser()->GetHost()->SetFocus(true);
}
}
- (BOOL)windowShouldClose:(NSNotification *)notification {
if ([self isBrowserUsable]) {
_cefClient->GetBrowser()->GetHost()->CloseBrowser(false);
return NO;
}
if (_pidToKillOnClose) kill([_pidToKillOnClose intValue], SIGQUIT);
[self autorelease];
return YES;
}
- (void)windowWillEnterFullScreen:(NSNotification *)notification {
if (_devButton)
[_devButton setHidden:YES];
}
- (void)windowDidExitFullScreen:(NSNotification *)notification {
if (_devButton)
[_devButton setHidden:NO];
}
- (BOOL)isDevMode {
NSString *bundleResourcePath = [[NSBundle bundleForClass:self.class] resourcePath];
return ![_resourcePath isEqualToString:bundleResourcePath];
}
- (void)displayDevIcon {
NSView *themeFrame = [self.window.contentView superview];
NSButton *fullScreenButton = nil;
for (NSView *view in themeFrame.subviews) {
if (![view isKindOfClass:NSButton.class]) continue;
NSButton *button = (NSButton *)view;
if (button.action != @selector(toggleFullScreen:)) continue;
fullScreenButton = button;
break;
}
_devButton = [[NSButton alloc] init];
[_devButton setTitle:@"\xF0\x9F\x92\x80"];
_devButton.autoresizingMask = NSViewMinXMargin | NSViewMinYMargin;
_devButton.buttonType = NSMomentaryChangeButton;
_devButton.bordered = NO;
[_devButton sizeToFit];
_devButton.frame = NSMakeRect(fullScreenButton.frame.origin.x - _devButton.frame.size.width - 5, fullScreenButton.frame.origin.y, _devButton.frame.size.width, _devButton.frame.size.height);
[[self.window.contentView superview] addSubview:_devButton];
}
- (void)populateBrowserSettings:(CefBrowserSettings &)settings {
CefString(&settings.default_encoding) = "UTF-8";
settings.remote_fonts = STATE_ENABLED;
settings.javascript = STATE_ENABLED;
settings.javascript_open_windows = STATE_ENABLED;
settings.javascript_close_windows = STATE_ENABLED;
settings.javascript_access_clipboard = STATE_ENABLED;
settings.javascript_dom_paste = STATE_DISABLED;
settings.caret_browsing = STATE_DISABLED;
settings.java = STATE_DISABLED;
settings.plugins = STATE_DISABLED;
settings.universal_access_from_file_urls = STATE_DISABLED;
settings.file_access_from_file_urls = STATE_DISABLED;
settings.web_security = STATE_DISABLED;
settings.image_loading = STATE_ENABLED;
settings.image_shrink_standalone_to_fit = STATE_DISABLED;
settings.text_area_resize = STATE_ENABLED;
settings.page_cache = STATE_DISABLED;
settings.tab_to_links = STATE_DISABLED;
settings.author_and_user_styles = STATE_ENABLED;
settings.local_storage = STATE_ENABLED;
settings.databases = STATE_ENABLED;
settings.application_cache = STATE_ENABLED;
settings.webgl = STATE_ENABLED;
settings.accelerated_compositing = STATE_ENABLED;
settings.developer_tools = STATE_ENABLED;
}
@end
@interface GraySplitView : NSSplitView
- (NSColor*)dividerColor;
@end
@implementation GraySplitView
- (NSColor*)dividerColor {
return [NSColor darkGrayColor];
}
@end
-1
Ver Arquivo
@@ -1 +0,0 @@
Versions/Current/Headers
-1
Ver Arquivo
@@ -1 +0,0 @@
Versions/Current/Quincy
@@ -1 +0,0 @@
Versions/Current/Resources
@@ -1,169 +0,0 @@
/*
* Author: Andreas Linde <mail@andreaslinde.de>
* Kent Sutherland
*
* Copyright (c) 2011 Andreas Linde & Kent Sutherland.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
#import <Cocoa/Cocoa.h>
typedef enum CrashAlertType {
CrashAlertTypeSend = 0,
CrashAlertTypeFeedback = 1,
} CrashAlertType;
typedef enum CrashReportStatus {
// This app version is set to discontinued, no new crash reports accepted by the server
CrashReportStatusFailureVersionDiscontinued = -30,
// XML: Sender ersion string contains not allowed characters, only alphanumberical including space and . are allowed
CrashReportStatusFailureXMLSenderVersionNotAllowed = -21,
// XML: Version string contains not allowed characters, only alphanumberical including space and . are allowed
CrashReportStatusFailureXMLVersionNotAllowed = -20,
// SQL for adding a symoblicate todo entry in the database failed
CrashReportStatusFailureSQLAddSymbolicateTodo = -18,
// SQL for adding crash log in the database failed
CrashReportStatusFailureSQLAddCrashlog = -17,
// SQL for adding a new version in the database failed
CrashReportStatusFailureSQLAddVersion = -16,
// SQL for checking if the version is already added in the database failed
CrashReportStatusFailureSQLCheckVersionExists = -15,
// SQL for creating a new pattern for this bug and set amount of occurrances to 1 in the database failed
CrashReportStatusFailureSQLAddPattern = -14,
// SQL for checking the status of the bugfix version in the database failed
CrashReportStatusFailureSQLCheckBugfixStatus = -13,
// SQL for updating the occurances of this pattern in the database failed
CrashReportStatusFailureSQLUpdatePatternOccurances = -12,
// SQL for getting all the known bug patterns for the current app version in the database failed
CrashReportStatusFailureSQLFindKnownPatterns = -11,
// SQL for finding the bundle identifier in the database failed
CrashReportStatusFailureSQLSearchAppName = -10,
// the post request didn't contain valid data
CrashReportStatusFailureInvalidPostData = -3,
// incoming data may not be added, because e.g. bundle identifier wasn't found
CrashReportStatusFailureInvalidIncomingData = -2,
// database cannot be accessed, check hostname, username, password and database name settings in config.php
CrashReportStatusFailureDatabaseNotAvailable = -1,
CrashReportStatusUnknown = 0,
CrashReportStatusAssigned = 1,
CrashReportStatusSubmitted = 2,
CrashReportStatusAvailable = 3,
} CrashReportStatus;
@class BWQuincyUI;
@protocol BWQuincyManagerDelegate <NSObject>
@required
// Invoked once the modal sheets are gone
- (void) showMainApplicationWindow;
@optional
// Return the description the crashreport should contain, empty by default. The string will automatically be wrapped into <[DATA[ ]]>, so make sure you don't do that in your string.
-(NSString *) crashReportDescription;
// Return the userid the crashreport should contain, empty by default
-(NSString *) crashReportUserID;
// Return the contact value (e.g. email) the crashreport should contain, empty by default
-(NSString *) crashReportContact;
@end
@interface BWQuincyManager : NSObject
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
<NSXMLParserDelegate>
#endif
{
CrashReportStatus _serverResult;
NSInteger _statusCode;
NSMutableString *_contentOfProperty;
id<BWQuincyManagerDelegate> _delegate;
NSString *_submissionURL;
NSString *_companyName;
NSString *_appIdentifier;
BOOL _autoSubmitCrashReport;
NSString *_crashFile;
BWQuincyUI *_quincyUI;
}
- (NSString*) modelVersion;
+ (BWQuincyManager *)sharedQuincyManager;
// submission URL defines where to send the crash reports to (required)
@property (nonatomic, retain) NSString *submissionURL;
// defines the company name to be shown in the crash reporting dialog
@property (nonatomic, retain) NSString *companyName;
// delegate is required
@property (nonatomic, assign) id <BWQuincyManagerDelegate> delegate;
// if YES, the crash report will be submitted without asking the user
// if NO, the user will be asked if the crash report can be submitted (default)
@property (nonatomic, assign, getter=isAutoSubmitCrashReport) BOOL autoSubmitCrashReport;
///////////////////////////////////////////////////////////////////////////////////////////////////
// settings
// If you want to use HockeyApp instead of your own server, this is required
@property (nonatomic, retain) NSString *appIdentifier;
- (void) cancelReport;
- (void) sendReportCrash:(NSString*)crashContent
description:(NSString*)description;
- (NSString *) applicationName;
- (NSString *) applicationVersionString;
- (NSString *) applicationVersion;
@end
Arquivo binário não exibido.
Arquivo binário não exibido.
@@ -1,34 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>12D78</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>Quincy</string>
<key>CFBundleIdentifier</key>
<string>de.buzzworks.Quincy</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>DTCompiler</key>
<string></string>
<key>DTPlatformBuild</key>
<string>4H512</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>12D75</string>
<key>DTSDKName</key>
<string>macosx10.8</string>
<key>DTXcode</key>
<string>0461</string>
<key>DTXcodeBuild</key>
<string>4H512</string>
</dict>
</plist>
@@ -1 +0,0 @@
A
@@ -1 +0,0 @@
Versions/Current/Headers
@@ -1 +0,0 @@
Versions/Current/Resources
@@ -1 +0,0 @@
Versions/Current/Sparkle
@@ -1,36 +0,0 @@
//
// SUAppcast.h
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUAPPCAST_H
#define SUAPPCAST_H
@class SUAppcastItem;
@interface SUAppcast : NSObject
{
@private
NSArray *items;
NSString *userAgentString;
id delegate;
NSString *downloadFilename;
NSURLDownload *download;
}
- (void)fetchAppcastFromURL:(NSURL *)url;
- (void)setDelegate:delegate;
- (void)setUserAgentString:(NSString *)userAgentString;
- (NSArray *)items;
@end
@interface NSObject (SUAppcastDelegate)
- (void)appcastDidFinishLoading:(SUAppcast *)appcast;
- (void)appcast:(SUAppcast *)appcast failedToLoadWithError:(NSError *)error;
@end
#endif
@@ -1,61 +0,0 @@
//
// SUAppcastItem.h
// Sparkle
//
// Created by Andy Matuschak on 3/12/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUAPPCASTITEM_H
#define SUAPPCASTITEM_H
@interface SUAppcastItem : NSObject
{
@private
NSString *title;
NSDate *date;
NSString *itemDescription;
NSURL *releaseNotesURL;
NSString *DSASignature;
NSString *minimumSystemVersion;
NSString *maximumSystemVersion;
NSURL *fileURL;
NSString *versionString;
NSString *displayVersionString;
NSDictionary *deltaUpdates;
NSDictionary *propertiesDictionary;
NSURL *infoURL; // UK 2007-08-31
}
// Initializes with data from a dictionary provided by the RSS class.
- initWithDictionary:(NSDictionary *)dict;
- initWithDictionary:(NSDictionary *)dict failureReason:(NSString**)error;
- (NSString *)title;
- (NSString *)versionString;
- (NSString *)displayVersionString;
- (NSDate *)date;
- (NSString *)itemDescription;
- (NSURL *)releaseNotesURL;
- (NSURL *)fileURL;
- (NSString *)DSASignature;
- (NSString *)minimumSystemVersion;
- (NSString *)maximumSystemVersion;
- (NSDictionary *)deltaUpdates;
- (BOOL)isDeltaUpdate;
- (BOOL)isCriticalUpdate;
// Returns the dictionary provided in initWithDictionary; this might be useful later for extensions.
- (NSDictionary *)propertiesDictionary;
- (NSURL *)infoURL; // UK 2007-08-31
@end
#endif
@@ -1,169 +0,0 @@
//
// SUUpdater.h
// Sparkle
//
// Created by Andy Matuschak on 1/4/06.
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SUUPDATER_H
#define SUUPDATER_H
#import "SUVersionComparisonProtocol.h"
#import "SUVersionDisplayProtocol.h"
@class SUUpdateDriver, SUAppcastItem, SUHost, SUAppcast;
@interface SUUpdater : NSObject
{
@private
NSTimer *checkTimer;
SUUpdateDriver *driver;
NSString *customUserAgentString;
SUHost *host;
IBOutlet id delegate;
}
+ (SUUpdater *)sharedUpdater;
+ (SUUpdater *)updaterForBundle:(NSBundle *)bundle;
- initForBundle:(NSBundle *)bundle;
- (NSBundle *)hostBundle;
- (void)setDelegate:(id)delegate;
- delegate;
- (void)setAutomaticallyChecksForUpdates:(BOOL)automaticallyChecks;
- (BOOL)automaticallyChecksForUpdates;
- (void)setUpdateCheckInterval:(NSTimeInterval)interval;
- (NSTimeInterval)updateCheckInterval;
- (void)setFeedURL:(NSURL *)feedURL;
- (NSURL *)feedURL; // *** MUST BE CALLED ON MAIN THREAD ***
- (void)setUserAgentString:(NSString *)userAgent;
- (NSString *)userAgentString;
- (void)setSendsSystemProfile:(BOOL)sendsSystemProfile;
- (BOOL)sendsSystemProfile;
- (void)setAutomaticallyDownloadsUpdates:(BOOL)automaticallyDownloadsUpdates;
- (BOOL)automaticallyDownloadsUpdates;
// This IBAction is meant for a main menu item. Hook up any menu item to this action,
// and Sparkle will check for updates and report back its findings verbosely.
- (IBAction)checkForUpdates:(id)sender;
// This kicks off an update meant to be programmatically initiated. That is, it will display no UI unless it actually finds an update,
// in which case it proceeds as usual. If the fully automated updating is turned on, however, this will invoke that behavior, and if an
// update is found, it will be downloaded and prepped for installation.
- (void)checkForUpdatesInBackground;
// Date of last update check. Returns nil if no check has been performed.
- (NSDate*)lastUpdateCheckDate;
// This begins a "probing" check for updates which will not actually offer to update to that version. The delegate methods, though,
// (up to updater:didFindValidUpdate: and updaterDidNotFindUpdate:), are called, so you can use that information in your UI.
- (void)checkForUpdateInformation;
// Call this to appropriately schedule or cancel the update checking timer according to the preferences for time interval and automatic checks. This call does not change the date of the next check, but only the internal NSTimer.
- (void)resetUpdateCycle;
- (BOOL)updateInProgress;
@end
// -----------------------------------------------------------------------------
// SUUpdater Delegate:
// -----------------------------------------------------------------------------
@interface NSObject (SUUpdaterDelegateInformalProtocol)
// Use this to keep Sparkle from popping up e.g. while your setup assistant is showing:
- (BOOL)updaterMayCheckForUpdates:(SUUpdater *)bundle;
// This method allows you to add extra parameters to the appcast URL, potentially based on whether or not Sparkle will also be sending along the system profile. This method should return an array of dictionaries with keys: "key", "value", "displayKey", "displayValue", the latter two being specifically for display to the user.
- (NSArray *)feedParametersForUpdater:(SUUpdater *)updater sendingSystemProfile:(BOOL)sendingProfile;
// Override this to dynamically specify the entire URL.
- (NSString*)feedURLStringForUpdater:(SUUpdater*)updater;
// Use this to override the default behavior for Sparkle prompting the user about automatic update checks.
- (BOOL)updaterShouldPromptForPermissionToCheckForUpdates:(SUUpdater *)bundle;
// Implement this if you want to do some special handling with the appcast once it finishes loading.
- (void)updater:(SUUpdater *)updater didFinishLoadingAppcast:(SUAppcast *)appcast;
// If you're using special logic or extensions in your appcast, implement this to use your own logic for finding
// a valid update, if any, in the given appcast.
- (SUAppcastItem *)bestValidUpdateInAppcast:(SUAppcast *)appcast forUpdater:(SUUpdater *)bundle;
// Sent when a valid update is found by the update driver.
- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)update;
// Sent when a valid update is not found.
- (void)updaterDidNotFindUpdate:(SUUpdater *)update;
// Sent immediately before extracting the specified update.
- (void)updater:(SUUpdater *)updater willExtractUpdate:(SUAppcastItem *)update;
// Sent immediately before installing the specified update.
- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update;
// Return YES to delay the relaunch until you do some processing; invoke the given NSInvocation to continue.
// This is not called if the user didn't relaunch on the previous update, in that case it will immediately
// restart.
- (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation;
// Some apps *can not* be relaunched in certain circumstances. They can use this method
// to prevent a relaunch "hard":
- (BOOL)updaterShouldRelaunchApplication:(SUUpdater *)updater;
// Called immediately before relaunching.
- (void)updaterWillRelaunchApplication:(SUUpdater *)updater;
// This method allows you to provide a custom version comparator.
// If you don't implement this method or return nil, the standard version comparator will be used.
- (id <SUVersionComparison>)versionComparatorForUpdater:(SUUpdater *)updater;
// This method allows you to provide a custom version comparator.
// If you don't implement this method or return nil, the standard version displayer will be used.
- (id <SUVersionDisplay>)versionDisplayerForUpdater:(SUUpdater *)updater;
// Returns the path which is used to relaunch the client after the update is installed. By default, the path of the host bundle.
- (NSString *)pathToRelaunchForUpdater:(SUUpdater *)updater;
// Called before and after, respectively, an updater shows a modal alert window, to give the host
// the opportunity to hide attached windows etc. that may get in the way:
-(void) updaterWillShowModalAlert:(SUUpdater *)updater;
-(void) updaterDidShowModalAlert:(SUUpdater *)updater;
// Called when an update is scheduled to be silently installed on quit.
// The invocation can be used to trigger an immediate silent install and relaunch.
- (void)updater:(SUUpdater *)updater willInstallUpdateOnQuit:(SUAppcastItem *)update immediateInstallationInvocation:(NSInvocation *)invocation;
- (void)updater:(SUUpdater *)updater didCancelInstallUpdateOnQuit:(SUAppcastItem *)update;
@end
// -----------------------------------------------------------------------------
// Constants:
// -----------------------------------------------------------------------------
// Define some minimum intervals to avoid DOS-like checking attacks. These are in seconds.
#if defined(DEBUG) && DEBUG && 0
#define SU_MIN_CHECK_INTERVAL 60
#else
#define SU_MIN_CHECK_INTERVAL 60*60
#endif
#if defined(DEBUG) && DEBUG && 0
#define SU_DEFAULT_CHECK_INTERVAL 60
#else
#define SU_DEFAULT_CHECK_INTERVAL 60*60*24
#endif
#endif
@@ -1,29 +0,0 @@
//
// SUVersionComparisonProtocol.h
// Sparkle
//
// Created by Andy Matuschak on 12/21/07.
// Copyright 2007 Andy Matuschak. All rights reserved.
//
#ifndef SUVERSIONCOMPARISONPROTOCOL_H
#define SUVERSIONCOMPARISONPROTOCOL_H
#import <Cocoa/Cocoa.h>
/*!
@protocol
@abstract Implement this protocol to provide version comparison facilities for Sparkle.
*/
@protocol SUVersionComparison
/*!
@method
@abstract An abstract method to compare two version strings.
@discussion Should return NSOrderedAscending if b > a, NSOrderedDescending if b < a, and NSOrderedSame if they are equivalent.
*/
- (NSComparisonResult)compareVersion:(NSString *)versionA toVersion:(NSString *)versionB; // *** MAY BE CALLED ON NON-MAIN THREAD!
@end
#endif
@@ -1,27 +0,0 @@
//
// SUVersionDisplayProtocol.h
// EyeTV
//
// Created by Uli Kusterer on 08.12.09.
// Copyright 2009 Elgato Systems GmbH. All rights reserved.
//
#import <Cocoa/Cocoa.h>
/*!
@protocol
@abstract Implement this protocol to apply special formatting to the two
version numbers.
*/
@protocol SUVersionDisplay
/*!
@method
@abstract An abstract method to format two version strings.
@discussion You get both so you can display important distinguishing
information, but leave out unnecessary/confusing parts.
*/
-(void) formatVersion: (NSString**)inOutVersionA andVersion: (NSString**)inOutVersionB;
@end
@@ -1,21 +0,0 @@
//
// Sparkle.h
// Sparkle
//
// Created by Andy Matuschak on 3/16/06. (Modified by CDHW on 23/12/07)
// Copyright 2006 Andy Matuschak. All rights reserved.
//
#ifndef SPARKLE_H
#define SPARKLE_H
// This list should include the shared headers. It doesn't matter if some of them aren't shared (unless
// there are name-space collisions) so we can list all of them to start with:
#import <Sparkle/SUUpdater.h>
#import <Sparkle/SUAppcast.h>
#import <Sparkle/SUAppcastItem.h>
#import <Sparkle/SUVersionComparisonProtocol.h>
#endif
@@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>12C60</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>Sparkle</string>
<key>CFBundleIdentifier</key>
<string>org.andymatuschak.Sparkle</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Sparkle</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.5 Beta (git)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>4abc126</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>4G2008a</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>11E52</string>
<key>DTSDKName</key>
<string>macosx10.7</string>
<key>DTXcode</key>
<string>0452</string>
<key>DTXcodeBuild</key>
<string>4G2008a</string>
</dict>
</plist>
@@ -1,38 +0,0 @@
Copyright (c) 2006 Andy Matuschak
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
=================
EXTERNAL LICENSES
=================
License for bspatch.c and bsdiff.c, from bsdiff 4.3 (<http://www.daemonology.net/bsdiff/>:
/*-
* Copyright 2003-2005 Colin Percival
* All rights reserved
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted providing that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
@@ -1,182 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ADP2,1</key>
<string>Developer Transition Kit</string>
<key>iMac1,1</key>
<string>iMac G3 (Rev A-D)</string>
<key>iMac4,1</key>
<string>iMac (Core Duo)</string>
<key>iMac4,2</key>
<string>iMac for Education (17-inch, Core Duo)</string>
<key>iMac5,1</key>
<string>iMac (Core 2 Duo, 17 or 20 inch, SuperDrive)</string>
<key>iMac5,2</key>
<string>iMac (Core 2 Duo, 17 inch, Combo Drive)</string>
<key>iMac6,1</key>
<string>iMac (Core 2 Duo, 24 inch, SuperDrive)</string>
<key>iMac8,1</key>
<string>iMac (April 2008)</string>
<key>MacBook1,1</key>
<string>MacBook (Core Duo)</string>
<key>MacBook2,1</key>
<string>MacBook (Core 2 Duo)</string>
<key>MacBook4,1</key>
<string>MacBook (Core 2 Duo Feb 2008)</string>
<key>MacBookAir1,1</key>
<string>MacBook Air (January 2008)</string>
<key>MacBookAir2,1</key>
<string>MacBook Air (June 2009)</string>
<key>MacBookAir3,1</key>
<string>MacBook Air (October 2010)</string>
<key>MacBookPro1,1</key>
<string>MacBook Pro Core Duo (15-inch)</string>
<key>MacBookPro1,2</key>
<string>MacBook Pro Core Duo (17-inch)</string>
<key>MacBookPro2,1</key>
<string>MacBook Pro Core 2 Duo (17-inch)</string>
<key>MacBookPro2,2</key>
<string>MacBook Pro Core 2 Duo (15-inch)</string>
<key>MacBookPro3,1</key>
<string>MacBook Pro Core 2 Duo (15-inch LED, Core 2 Duo)</string>
<key>MacBookPro3,2</key>
<string>MacBook Pro Core 2 Duo (17-inch HD, Core 2 Duo)</string>
<key>MacBookPro4,1</key>
<string>MacBook Pro (Core 2 Duo Feb 2008)</string>
<key>Macmini1,1</key>
<string>Mac Mini (Core Solo/Duo)</string>
<key>MacPro1,1</key>
<string>Mac Pro (four-core)</string>
<key>MacPro2,1</key>
<string>Mac Pro (eight-core)</string>
<key>MacPro3,1</key>
<string>Mac Pro (January 2008 4- or 8- core &quot;Harpertown&quot;)</string>
<key>MacPro4,1</key>
<string>Mac Pro (March 2009)</string>
<key>MacPro5,1</key>
<string>Mac Pro (August 2010)</string>
<key>PowerBook1,1</key>
<string>PowerBook G3</string>
<key>PowerBook2,1</key>
<string>iBook G3</string>
<key>PowerBook2,2</key>
<string>iBook G3 (FireWire)</string>
<key>PowerBook2,3</key>
<string>iBook G3</string>
<key>PowerBook2,4</key>
<string>iBook G3</string>
<key>PowerBook3,1</key>
<string>PowerBook G3 (FireWire)</string>
<key>PowerBook3,2</key>
<string>PowerBook G4</string>
<key>PowerBook3,3</key>
<string>PowerBook G4 (Gigabit Ethernet)</string>
<key>PowerBook3,4</key>
<string>PowerBook G4 (DVI)</string>
<key>PowerBook3,5</key>
<string>PowerBook G4 (1GHz / 867MHz)</string>
<key>PowerBook4,1</key>
<string>iBook G3 (Dual USB, Late 2001)</string>
<key>PowerBook4,2</key>
<string>iBook G3 (16MB VRAM)</string>
<key>PowerBook4,3</key>
<string>iBook G3 Opaque 16MB VRAM, 32MB VRAM, Early 2003)</string>
<key>PowerBook5,1</key>
<string>PowerBook G4 (17 inch)</string>
<key>PowerBook5,2</key>
<string>PowerBook G4 (15 inch FW 800)</string>
<key>PowerBook5,3</key>
<string>PowerBook G4 (17-inch 1.33GHz)</string>
<key>PowerBook5,4</key>
<string>PowerBook G4 (15 inch 1.5/1.33GHz)</string>
<key>PowerBook5,5</key>
<string>PowerBook G4 (17-inch 1.5GHz)</string>
<key>PowerBook5,6</key>
<string>PowerBook G4 (15 inch 1.67GHz/1.5GHz)</string>
<key>PowerBook5,7</key>
<string>PowerBook G4 (17-inch 1.67GHz)</string>
<key>PowerBook5,8</key>
<string>PowerBook G4 (Double layer SD, 15 inch)</string>
<key>PowerBook5,9</key>
<string>PowerBook G4 (Double layer SD, 17 inch)</string>
<key>PowerBook6,1</key>
<string>PowerBook G4 (12 inch)</string>
<key>PowerBook6,2</key>
<string>PowerBook G4 (12 inch, DVI)</string>
<key>PowerBook6,3</key>
<string>iBook G4</string>
<key>PowerBook6,4</key>
<string>PowerBook G4 (12 inch 1.33GHz)</string>
<key>PowerBook6,5</key>
<string>iBook G4 (Early-Late 2004)</string>
<key>PowerBook6,7</key>
<string>iBook G4 (Mid 2005)</string>
<key>PowerBook6,8</key>
<string>PowerBook G4 (12 inch 1.5GHz)</string>
<key>PowerMac1,1</key>
<string>Power Macintosh G3 (Blue &amp; White)</string>
<key>PowerMac1,2</key>
<string>Power Macintosh G4 (PCI Graphics)</string>
<key>PowerMac10,1</key>
<string>Mac Mini G4</string>
<key>PowerMac10,2</key>
<string>Mac Mini (Late 2005)</string>
<key>PowerMac11,2</key>
<string>Power Macintosh G5 (Late 2005)</string>
<key>PowerMac12,1</key>
<string>iMac G5 (iSight)</string>
<key>PowerMac2,1</key>
<string>iMac G3 (Slot-loading CD-ROM)</string>
<key>PowerMac2,2</key>
<string>iMac G3 (Summer 2000)</string>
<key>PowerMac3,1</key>
<string>Power Macintosh G4 (AGP Graphics)</string>
<key>PowerMac3,2</key>
<string>Power Macintosh G4 (AGP Graphics)</string>
<key>PowerMac3,3</key>
<string>Power Macintosh G4 (Gigabit Ethernet)</string>
<key>PowerMac3,4</key>
<string>Power Macintosh G4 (Digital Audio)</string>
<key>PowerMac3,5</key>
<string>Power Macintosh G4 (Quick Silver)</string>
<key>PowerMac3,6</key>
<string>Power Macintosh G4 (Mirrored Drive Door)</string>
<key>PowerMac4,1</key>
<string>iMac G3 (Early/Summer 2001)</string>
<key>PowerMac4,2</key>
<string>iMac G4 (Flat Panel)</string>
<key>PowerMac4,4</key>
<string>eMac</string>
<key>PowerMac4,5</key>
<string>iMac G4 (17-inch Flat Panel)</string>
<key>PowerMac5,1</key>
<string>Power Macintosh G4 Cube</string>
<key>PowerMac6,1</key>
<string>iMac G4 (USB 2.0)</string>
<key>PowerMac6,3</key>
<string>iMac G4 (20-inch Flat Panel)</string>
<key>PowerMac6,4</key>
<string>eMac (USB 2.0, 2005)</string>
<key>PowerMac7,2</key>
<string>Power Macintosh G5</string>
<key>PowerMac7,3</key>
<string>Power Macintosh G5</string>
<key>PowerMac8,1</key>
<string>iMac G5</string>
<key>PowerMac8,2</key>
<string>iMac G5 (Ambient Light Sensor)</string>
<key>PowerMac9,1</key>
<string>Power Macintosh G5 (Late 2005)</string>
<key>RackMac1,1</key>
<string>Xserve G4</string>
<key>RackMac1,2</key>
<string>Xserve G4 (slot-loading, cluster node)</string>
<key>RackMac3,1</key>
<string>Xserve G5</string>
<key>Xserve1,1</key>
<string>Xserve (Intel Xeon)</string>
<key>Xserve2,1</key>
<string>Xserve (January 2008 quad-core)</string>
</dict>
</plist>
Arquivo binário não exibido.
@@ -1,50 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>12C60</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>finish_installation</string>
<key>CFBundleIconFile</key>
<string>Sparkle</string>
<key>CFBundleIdentifier</key>
<string>org.andymatuschak.sparkle.finish-installation</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>4G2008a</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>11E52</string>
<key>DTSDKName</key>
<string>macosx10.7</string>
<key>DTXcode</key>
<string>0452</string>
<key>DTXcodeBuild</key>
<string>4G2008a</string>
<key>LSBackgroundOnly</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>10.4</string>
<key>LSUIElement</key>
<string>1</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

Alguns arquivos não foram exibidos porque demasiados arquivos foram alterados neste diff Mostrar Mais