Commit Graph

1331 Commits

Author SHA1 Message Date
Allan Odgaard
d89321c4ba Checkin release notes v2.0-alpha.9391 2013-03-07 16:31:07 +01:00
Allan Odgaard
14cfedb287 Implement Replace [and Find] bound to ⌥⌘G
Currently this is implemented in OakTextView which means that it doesn’t work for macros. Some refactoring is in order so that the implementation can be shared (lack of sharing has to do with how OakTextView reports status to Find dialog or via tool tips, and macros want none of that).

There is also no check to see if the current state of the editor is the result of a find operation, i.e. you can invoke “replace” regardless of wether or not “find” was the last action.

Finally, doing a multi-file search and using “find next” at the end of one document, which brings you to the first match of next document (part of the results), will not update “captures” from a potential regular expression search, meaning that if you then do “replace”, and your replacement string is a format string that references the match (via $1-n) then it will not be correctly expanded.

Closes #104.
2013-03-07 16:21:57 +01:00
Allan Odgaard
5ad6d0c5c0 Simplify implementation of OakTextViewFindServer 2013-03-07 16:21:56 +01:00
Allan Odgaard
02f32977f2 Introduce Replace [and Find] in find protocol
Previously there was a single replace action and the options would indicate if it was a “replace all”, this mimics the “find” (which can be a “find all”) but since single match replacement is somewhat different than a “replace all”, as the former may need to know the captures from a previous find action, it makes sense to factor out these things as different actions.
2013-03-07 16:21:47 +01:00
Allan Odgaard
599d903eb4 ARC: Update Find framework 2013-03-07 10:50:41 +01:00
Allan Odgaard
4a24d0ad58 Rework find dialog (part one)
This is work in progress but I don’t think any functionality is missing compared to previous commit, although some functionality might be less polished, e.g. the action buttons don’t properly enable/disable and the height of the results list gets lost when hiding it.

Some of the stuff that has changed / improved:

 * The find/replace text fields adjust their height to encompass the content (closes #94). Presently though the initial height of the ontrols is one line regardless of content (but they should adjust on first edit).
 * You can use Save All (⌥⌘S) to save affected files after Replace All (closes #558).
 * The key equivalents / actions available in the Find dialog is now easier to find via the action pop-up, which also has enables accessibility.
 * Using Next (⌘G) or Previous (⇧⌘G) with search results will move selection up/down.
 * Using Find All with ‘in’ set to ‘Selection’ will find and select all matches in the current document, which fixes #425, though it might be more desirable to show the results in the find dialog (like Find All does for a document or folder).
2013-03-07 10:50:19 +01:00
Allan Odgaard
e8cd0b0df7 Reject bad folding meta data
Fixes issue #866.
2013-03-05 16:42:22 +01:00
Allan Odgaard
840f0922c7 Assign ⌃⌘↩ to View → Enter / Exit Full Screen
Closes issue #860.
2013-03-05 16:13:45 +01:00
Allan Odgaard
c459e0483f Remove compatibility check (10.5) 2013-03-04 13:33:38 +01:00
Allan Odgaard
32d87857b9 Checkin release notes v2.0-alpha.9389 2013-03-04 10:58:18 +01:00
Allan Odgaard
ae15687db4 Move focus to document when closing split with focus
This applies to file browser and HTML output (when configured to be shown in the document window).

Closes #838.
2013-03-04 10:43:58 +01:00
Adam Strzelecki
6ed3c93872 Lighter tab bar background for better readibility 2013-03-04 10:22:54 +01:00
Allan Odgaard
699d0676b3 Add to undo stack when replacing after folder search
Fixes #536.
2013-03-03 23:19:34 +01:00
Allan Odgaard
2f05d5aec5 Improve VO for folder pop-up button 2013-03-03 15:53:05 +01:00
Allan Odgaard
2c6504b82f Use symbolic constants for binding properties 2013-03-03 15:53:05 +01:00
Boris Dušek
5391d1d7b4 Present the file browser area as a group to VoiceOver/accessibility 2013-03-03 15:53:05 +01:00
Boris Dušek
f4e2de14f2 Present the document view as a group to VoiceOver/accessibility
This enables VoiceOver user to see the document view as a single
element and interact with it (i.e. inspect its subelements) only when
needed by using the VO-Shift-down shortcut (and stop interacting with
it using VO-Shift-up shortcut). This makes the element structure more
hierarchical where at the top level are only major user interface
components, so that it's easier for orientation. It also prevents
unrelated UI elements to be sequential as VoiceOver by default orders
elements by the visual order (top-down, left-right) rather then
the order in the AXChildren array. For example in this case,
the bottom status bar of the document window gets separated from
the bottom toolbar of the file browser, unlike the situation before
grouping when both bars were adjacent to the VoiceOver user.
2013-03-03 15:53:04 +01:00
Boris Dušek
944e1e32fa Make macro recording an NSToggleButton
This fixes semantics of the button and thus also its
accessibility. The macro recording button represents state - more
specifically a boolean state, so it has to be a NSToggleButton (or
its specialization). Then the button is presented to the VoiceOver
user as an AXCheckbox - that is a checkbox with on and off value -
which is exactly what the button's function is. Examples of this in
system apps is e.g. the "Play" button in QuickTime Player, which is
also an AXCheckbox ("Pause" is then simply an unchecked "Play"
checkbox).
2013-03-03 15:42:18 +01:00
Boris Dušek
21c70057b4 Fix initial accessibility of symbol pop-up
VoiceOver reads an AXValue for a pop-up button - that is the selected
item. But button's title does not set an AXValue, as it probably is
not a menu item. So change the code set to the title by setting a
single menu item with that title.

This fixes accessibility of the pop-up when accessing its value before
it is first popped up. It makes the code consistent with setGrammarName:
which works fine (that's how I discovered how to fix it).
2013-03-03 15:41:54 +01:00
Boris Dušek
baf2839299 Add AXDescription to pop-ups to tell about their purpose 2013-03-03 15:41:48 +01:00
Boris Dušek
c3f57b0235 Add AXDescription to image buttons 2013-03-03 15:40:39 +01:00
Steven Clukey
7892eac2d4 Add “scroll past end” option to the View menu
When enabled the height of the document is increased by the height of the view port, which means the last lines of the document are not anchored to the bottom of the view port but can e.g. be centered.

Closes #513.
2013-03-03 15:14:29 +01:00
Allan Odgaard
4e3d31e09c Improve heuristic for swipe gestures
We now try to find a scrollable view under the mouse, and if any scrolling was done, we reject the gesture as a “go back/forward” event.

Additionally we reject gestures with a duration of more than 0.2 seconds.

Maybe fixes #854.
2013-03-02 11:26:30 +01:00
Allan Odgaard
f7f3fc3638 Copy incremental search string
Fixed #631 (again).
2013-03-02 09:26:35 +01:00
Allan Odgaard
e8efb3638d Fix Go → Current Document with no project folder
We were creating an NSURL from the project folder which would throw an exception when the project folder was nil.
2013-03-01 22:03:58 +01:00
Allan Odgaard
6042bc86d6 Log current key event in diagnostic reports
When a C++ exception is thrown from code invoked via a menu item then the menu item dispatcher will catch the exception and abort, this means the report doesn’t show the actual exception or contain any of the involved code.

By logging the key event in the report we should be able to deduce what action was invoked.

Adding info to diagnostic reports “documentation” from http://mjtsai.com/blog/2013/02/27/application-specific-crash-report-information/
2013-03-01 16:41:01 +01:00
Allan Odgaard
687d0ee9e4 Ensure we use /usr/bin/mktemp
It appears some variants of mktemp require the template parameter to contain a minimum number of X’es.
2013-03-01 16:30:10 +01:00
Allan Odgaard
5e6cfe8e1e The 10th tab now get ⌘0 as key equivalent 2013-02-27 21:05:09 +01:00
Allan Odgaard
1f4eecbab7 Always use system default ruby 1.8
Maybe fixes #845.
2013-02-27 13:42:23 +01:00
Allan Odgaard
f58a92885d Add titles to all help pages
Note that the documentation is a bit outdated as it hasn’t been touched since the first public alpha — updated documentation will appear when closer to final release, in the meantime interested parties should watch the release notes, wiki, and mailing list.

Closes #822.
2013-02-25 21:07:53 +01:00
Allan Odgaard
b234f19fb4 Checkin release notes v2.0-alpha.9387 2013-02-25 15:35:55 +01:00
Allan Odgaard
57c2aeda47 Use libdispatch for monitoring file changes
This is instead of using kqueue, which has more overhead and require a dedicated thread for the kevent run-loop.
2013-02-25 15:28:37 +01:00
Allan Odgaard
bd5b105a44 Only set -fobjc-link-runtime for app targets
Ideally this should be set for executable targets that use Objective-C (and have deployment target set to 10.7).

This change is a quick fix for not having pure C++ tests leak. For more info see https://github.com/sorbits/rdar/blob/master/LeakWith10_7ObjCRunTime/README.md
2013-02-25 15:28:37 +01:00
Allan Odgaard
ccf63ae206 Use proper PCH for tests
We previously passed an array to ‘pch_for’ where we should have passed a source path, though it appear to have worked.
2013-02-25 15:28:37 +01:00
Allan Odgaard
7de06dc9f4 Changing default bundle item settings could fail
The cache would not include changes to settings keys from delta bundles.
2013-02-25 15:28:37 +01:00
Allan Odgaard
ea5d7d3af9 Use weak pointers in most async dispatch blocks
This is mainly to expedite potential destruction of the objects referenced.
2013-02-25 15:27:29 +01:00
Allan Odgaard
3859e25429 Disallow copying scm::info_t
Presently not supported.
2013-02-25 15:27:29 +01:00
Allan Odgaard
e091bdb2f0 Use const for member data initialized by constructor 2013-02-25 15:26:45 +01:00
Allan Odgaard
eb893105e4 Disallow copying test::jail_t
Since we delete the jailed directory in the destructor we can’t support a deep copy of this type. Since we don’t need it, and it’s just a type used in tests, I opted for simply disabling this (to get a compiler error, should it be attempted) rather than introduce the necessary code to allow shallow copies.
2013-02-25 15:26:41 +01:00
Allan Odgaard
38be7f56db Add scm::info_t::pop_callback
Ideally we would be able to remove arbitrary callbacks rather than the last one added, but for this we would need to introduce some sort of handle (the callback itself is a block so not suitable as handle). The push/pop API for callbacks is sufficient for our use-case though.
2013-02-25 15:25:17 +01:00
Allan Odgaard
c4323efbb7 Use path::is_child instead of custom code 2013-02-25 15:25:17 +01:00
Allan Odgaard
6d6c3e4de6 Use path::is_absolute instead of custom code 2013-02-25 15:25:17 +01:00
Allan Odgaard
a3ec258912 Update settings tests to new system 2013-02-25 15:25:17 +01:00
Allan Odgaard
10ebd31ad9 Let SCM tests use same executable as driver
The was previously only done for the svn tests and the code had some flaws, like modifying the PATH environment variable.
2013-02-23 11:24:57 +01:00
Allan Odgaard
b4ee927fdf Expose scm::find_executable (for testing)
This is so that tests can use the exact same executable to create the repository, as is used to obtain status (svn repositories created with newer executables are often not backwards compatible).
2013-02-23 11:24:56 +01:00
Allan Odgaard
a6e99c1853 Don’t call super in main menu key equivalent handler
It was calling super to keep our custom code to a minimum, but it turns out that the superclass will sometimes invoke bundle menu items even when items from the other menus are better candidates.

Partially reverts 4b0a9a08c7.
2013-02-23 11:24:56 +01:00
Allan Odgaard
b9ebb6068f Remove unused private field
Basically to avoid a clang warning.
2013-02-23 11:24:56 +01:00
Allan Odgaard
b718106ff8 Make semi-internal API private
This was previously public so that we could write tests for it, but since the test runner is linked with the object files, it can access symbols that has visibility set to hidden.
2013-02-23 11:24:56 +01:00
Allan Odgaard
2f3cd66a2b Support relative includes in tests
Since we inline the test file, rather than include it, relative includes from this inlined code would not work.
2013-02-23 09:19:45 +01:00
Michael Sheets
a05b1dca2e Use integrated graphics on laptops
Before using the 'Open…' dialog caused the discreet graphics chip to be enabled until TextMate exited. Setting this flag tells the OS that we want and are able to use the integrated graphics to conserve the battery. Detailed in Apple Technical Q&A QA1734:

http://developer.apple.com/library/mac/#qa/qa1734/
2013-02-22 18:14:00 -06:00