Commit Graph

2379 Commits

Author SHA1 Message Date
Allan Odgaard
03d0a9d181 Assume cap’n’proto is installed in parent of build directory v2.0-alpha.9523 2014-03-25 12:41:37 +07:00
Allan Odgaard
1f6863180e Checkin release notes 2014-03-25 12:41:37 +07:00
Allan Odgaard
003d32832e Suppress “unused variable” warning from code generated by ragel 2014-03-25 12:41:37 +07:00
Allan Odgaard
cefb8cb2db Simplify sub-word movement tests 2014-03-25 12:19:58 +07:00
Allan Odgaard
527668683c Include numbers as a group for sub-word movement 2014-03-25 12:19:58 +07:00
Allan Odgaard
73453e5152 Do not restore project state for projects with no documents
The state being restored here would be file browser state, which might confuse the user if they are opening a folder via “mate” and then get a file browser restored for that project folder that show another location than the actual folder they open.

The reason we ignore the state when loading, rather than not saving it in the first place, is that by saving the state we make the folder show up in File → Open Favorites…
2014-03-25 12:19:58 +07:00
Allan Odgaard
69504292e5 Better job of moving caret/preserving selection for “toggle case”
Previously we would set a mark, mutate the buffer, and then restore selection based on how the mark was moved.

When a mutation was changing the buffer to its existing value (e.g. toggling case of a space character) then the buffer would effectively ignore the mutation, and the mark would not be properly updated, meaning for “toggle case of character” the caret would not be moved forward.

Additionally we previously always moved to the end of a mutation, even if it was done on a user selection. We now only move to the end if the user didn’t select anything (but ran the mutation on an implicitly selected unit, like a word). The “toggle case of word” action is affected by this.
2014-03-25 12:19:58 +07:00
Allan Odgaard
15025edbcc Set “color” to true if range is untouched by ‘extend_if_empty’ 2014-03-25 12:19:57 +07:00
Allan Odgaard
62645601f5 Introduce range_t::color field for somewhat arbitrary use
Also do a better job of preserving the “unanchored” property of a range.
2014-03-25 12:19:57 +07:00
Allan Odgaard
90d1fd432d Non-local drags from TextMate now include NSDragOperationGeneric 2014-03-25 12:19:57 +07:00
Allan Odgaard
1a95579844 Rework OakFileIconImage
We no longer let the image representation point back to the image, since the image might be copied.
2014-03-23 22:47:16 +07:00
Allan Odgaard
78cb28db9e Fix infinite loop in folder search for multi-byte encoded files
This would happen if a multi-byte encoded file ended with a partial code point, as we would continue to try and read more data to finish decoding.
2014-03-23 22:47:16 +07:00
Allan Odgaard
291dae476a Fix format string expansion for new bundles/bundle items
Iteration was unintentionally changed (in c2397484b8) to iterate over const references, which would prevent the referenced types to be updated.

The reason the compiler did not complain about it is due to the catch-all template function, indirectly changing visitation from non-const to const, and providing no-op visitation functions for the const types.

For this reason, I have replaced the template (member) function with functions for all types.
2014-03-23 22:47:16 +07:00
Allan Odgaard
d4faf3bef8 Code indicated we were preserving selection for kChangeCaseOfWord 2014-03-23 22:47:16 +07:00
Allan Odgaard
ab4e711c27 Fix AF_INET6 → PF_INET6
Also remove extraneous whitespace.
2014-03-23 22:47:16 +07:00
Allan Odgaard
2c20ab23b0 Ask for maximum queue length for pending socket connections
This is mainly because the SOMAXCONN constant looks better (in the source) than some arbitrarily chosen number. The constant is presently defined as 128 so it doesn’t seem wasteful, and presumably the queue will only take up space if we are not actually responding to socket connections.
2014-03-23 22:47:16 +07:00
Allan Odgaard
54d7f4bbeb Split regexp used for sub-word movement into multiple lines 2014-03-23 22:47:15 +07:00
Allan Odgaard
9397335400 Add tests for sub-word movement 2014-03-23 22:47:15 +07:00
Allan Odgaard
d7660bd89e Detect first loop iteration using std::exchange “idiom” 2014-03-23 22:47:15 +07:00
Allan Odgaard
af0e6cc643 Change decltype(mapVariable)::value_type → auto (C++14) 2014-03-16 18:06:03 +07:00
Allan Odgaard
f3f4efd062 Use binary literals in code (C++14) 2014-03-16 18:06:03 +07:00
Allan Odgaard
77eb21f33e Switch from C++11 → C++1y (C++14) 2014-03-16 18:06:03 +07:00
Allan Odgaard
b4afdd818a Always ignore SCM info from root/home folder
Previously we would only pass the repository’s root to scm::info, and thus the check on the path passed in was enough, but today we are passing in paths for which we do not yet know the repository root, so the check should (also) be done for the path that ends up containing version control meta data.

We still do the initial check since it also rejects non-local paths, thus avoiding stat’ing paths on network file systems.
2014-03-16 18:06:02 +07:00
Reza Mohammadi
54d0903c2f No representation for usual ZERO-WIDTH chars
ZWNJ is so common in Persian texts, and its unicode bi-direction class in neutral.
But the representation chunk contains latin characters and are so left-to-right.
So, when ZWNJ is replaced by the representation chunk, rtl texts are rendered incorrectly.

ZWJ and ZWSP are from the same class, but less common at least in Persian texts.
2014-03-15 18:21:28 +03:30
Allan Odgaard
8ecf92e893 Disambiguate display names for SCM data source
For example if multiple files with same base name are modified or untracked, then previously it wasn’t possible to tell them apart (other than using the tool tip which show full path).
2014-03-14 22:54:27 +07:00
Allan Odgaard
7131e82102 Set cell value to display name when editing a file URL
This is incase the item’s display name is different than the file’s display name, for example if the display name contains part of the path’s parent (to disambiguate it).
2014-03-14 22:54:27 +07:00
Allan Odgaard
f36a0af13d Change FSItem’s name → displayName 2014-03-14 22:54:27 +07:00
Allan Odgaard
66d1e9cad7 Remove (internal) “sort by type” file browser option 2014-03-14 22:54:27 +07:00
Allan Odgaard
175e4cf183 Let ‘tab’ in pasteboard history move to next key view
Similarly shift-tab moves to previous key view.
2014-03-14 16:08:56 +07:00
Allan Odgaard
fe1134c6c1 Full implementation of ‘labels’ property 2014-03-13 20:51:31 +07:00
Allan Odgaard
9a9614e264 Workaround for “format string is not a string literal” warning 2014-03-13 20:51:15 +07:00
Allan Odgaard
cf8f796053 Do not use va_start macro with variable reference
This is undefined according to the standard and is a warning with clang-503.0.38.
2014-03-13 20:51:15 +07:00
Allan Odgaard
45867e7e0a Do not return void from constructor (error with clang-503.0.38) 2014-03-13 20:51:00 +07:00
Allan Odgaard
eea07b93a7 Move “Open Target” out of the Avian bundle
Instead it’s in the OakDebug bundle. This command is only useful for people working on the TextMate source (in TextMate).
2014-03-13 17:25:29 +07:00
Allan Odgaard
b57463bd0c Add attr.bundle-editor.* scope to bundle editor
This allows us to limit or override things just for the bundle editor.
2014-03-13 17:25:29 +07:00
Allan Odgaard
3646f0630d Add test for thai script
This isn’t causing an issue, though at a higher level we wish to split the combined characters when using backward delete.
2014-03-13 17:25:29 +07:00
Allan Odgaard
20dd3f0126 Use ‘assign’ instead of ‘weak’ when building for 10.7
On Mac OS X 10.7 we cannot use weak references to (amongst others) NSImage objects. In this case, there shouldn’t be a problem with using assign.
2014-03-13 09:37:58 +07:00
Allan Odgaard
159edd8aad Use bindings instead of notifications for chooser filter string 2014-03-13 09:37:58 +07:00
Allan Odgaard
5aea3fb50a Do not use ‘autorecalculatesKeyViewLoop’ for chooser windows
Instead we manually call recalculatesKeyViewLoop on the window. This is because the auto-recalculation messes up. First time the window is brought up, it works fine, but the second time, nextValidKeyView will return ‘nil’ for the last view (causing the key view loop to not be a loop).
2014-03-13 09:37:58 +07:00
Allan Odgaard
67e8c23b3b Checkin release notes v2.0-alpha.9519 2014-03-12 15:50:39 +07:00
Allan Odgaard
a89ca5c930 Ensure scope bar has one button selected
It was possible to press the already selected button to deselect it. Now we reselect it, when that happens.
2014-03-12 15:50:39 +07:00
Allan Odgaard
383fd44203 Only draw table view as key when linked search field has focus 2014-03-12 15:50:39 +07:00
Allan Odgaard
5073b2bf06 Remove unused code 2014-03-12 15:50:39 +07:00
Allan Odgaard
de99c053db Do not call unimplemented method on super
This was broken by commit 5edd3479ba.
2014-03-12 15:50:39 +07:00
Allan Odgaard
94b1f9aa6c Add titles to HTML used in about window
With voice over enabled the titles will be read aloud, so it makes sense to set them to something sensible.
2014-03-12 15:50:39 +07:00
Allan Odgaard
1183367694 fixup! Do “refresh” for actions which are no-op due to current state 2014-03-10 16:44:28 +07:00
Boris Dušek
129cc2749d Workaround for accessibility of OakChooser's search field
Currently for VoiceOver user when the text cursor is at the end of the search
field (which is 99% of the time) and the user wants to navigate the results
in the table view using arrow down, then after each arrow down, VoiceOver first
plays a "end-of-text" sound, then announces whole contents of the search field,
and only then announces the newly selected search result. (The same happens
when text cursor is at the beginning of the search field and user presses
arrow up.)

This is probably a bug in the way AppKit handles text field accessibility - see
http://lists.apple.com/archives/accessibility-dev/2014/Feb/msg00019.html

I also reported this as <rdar://problem/16271507>

I hereby present a hacky workaround for this - a subclass of NSSearchField
that tricks accessibility into thinking there is one extra space before and
after the text in the search field. Therefore VoiceOver will not think the user
is at the end of text when they actually are, and therefore will not play the
"end-of-text" sound and announce whole contents of the search field before
getting to the information user wants (the newly selected search result).

While this is a bit hacky, along with the previous commit it allows VoiceOver
to have the same instant great experience as a sighted user when filtering
and browsing results in OakChooser. So I think it's worth the hackiness until
there is a better alternative.

There is only last issue, as currently VoiceOver is very chatty when the
OakChooser window appears: first says "Go to file", if user interrupts it with
an action (i.e. moving VO cursor or typing a character), then VoiceOver starts
telling the whole title of the window, and only after user interrupts it again
does VoiceOver say or announce only the user actions (including search results
table selection change).

So the simpliest if the user wants to start navigating the table items
immediately after showing the OakChooser's window (i.e. without entering
a search term) is to, after showing the OakChooser (e.g. with ⌘T or ⇧⌘T),
quickly type any letter and immediately delete it with backspace and then
use arrow down/up.
2014-03-10 16:23:58 +07:00
Boris Dušek
36b1ec4fa0 Announce current OakChooser item to accessibility
This solves accessibility of situation of a user browsing results in
OakChooser (currently File Chooser and Symbol Chooser). Typically
the user is in search field and after typing the search string
wants to use arrow down and up to browse results.

The problem this presented to accessibility was that VoiceOver reads
only changes of selection in the current VoiceOver item. As the user
is on the search field but the selection changes in the results table
below, VoiceOver did not read the various search results when pressing
arrow up/down.

Alternative was to leave the search field, move to the results table,
interact with it and then navigate it with VoiceOver. This is however
not the desired user experience comparable to that of sighted users,
as the VoiceOver user still has to do quite a few steps after entering
the search string to browse the results, not to speak about the situation
when the user would like to change the search string - he/she would need
to leave the table and get back to the search field.

This solves the problem by making the search field (or more generally
any user interface element that triggers change of selection in the
results table, which should be the element the VoiceOver cursor is on)
announce to accessibility the contents of the selected row in search
results table.

See this thread on accessibility-dev mailing list where the options for
implementing such a user interface in an accessible way are discussed:

http://lists.apple.com/archives/accessibility-dev/2013/Dec/msg00000.html
and
http://lists.apple.com/archives/accessibility-dev/2014/Feb/msg00016.html

If the user did not move selection (it is on the first line) and they
want to hear it, they should use arrow up to hear it. Then they can
use arrow down to move through results.
2014-03-10 15:39:12 +07:00
Allan Odgaard
e7e1aed59c Inserting “after input” is always lower/right corner for columns
For example selecting a column of numbers and selecting “Add Numbers in Selection” will now always insert the result at a logical position rather than on the defined end points of the selection.
2014-03-10 12:40:18 +07:00
Allan Odgaard
cc446d98e5 Don’t let HTML output window itself keep track of open windows 2014-03-10 12:40:18 +07:00