Commit Graph

2172 Commits

Author SHA1 Message Date
Allan Odgaard
10b6941e13 Extend bundle item chooser’s search capabilities 2014-07-31 15:36:19 +02:00
Allan Odgaard
fef0ed8fc5 Use ruby18 shebang in bundle command template 2014-07-31 15:36:19 +02:00
Allan Odgaard
833d724779 Check for failure when creating CTLineRef related objects 2014-07-31 15:36:19 +02:00
Allan Odgaard
bb3b997a56 Do not create temporary CTLineRef for lines without tabs
This also avoids creating the paragraph style object for these lines.
2014-07-31 15:36:19 +02:00
Allan Odgaard
082c665457 Do not create tab stop at location zero
I do not understand what the point of this tab stop is.
2014-07-31 15:36:19 +02:00
Steven Clukey
98dfefb5e0 Add space invisible
The implements the space invisible using the new method of drawing the invisibles so it does not affect right-to-left text.
2014-07-31 15:36:18 +02:00
Steven Clukey
e0c6e14de0 Make CoreText manage the tabs
Rather than putting tabs in their own node, leave them in the text nodes and allow core text to handle the size. This fixes the issue with using tabs in right-to-left text.
2014-07-31 15:36:18 +02:00
Etienne Samson
a52fc3493b Make the Find and HTML window switch back to a Space TM is actually in 2014-07-30 18:18:02 +02:00
Allan Odgaard
421f087b18 Do not destroy shared authorization rights
Each time we used an authorization right in the privileged helper tool, TextMate would lose the right since the helper tool destroyed it after use.
2014-07-30 17:40:23 +02:00
Allan Odgaard
795909748b Only report privileged helper tool outdated when a new one exists
This is so that we can use the privileged helper tool from tests, assuming it has already been installed.
2014-07-30 15:15:47 +02:00
Allan Odgaard
135667b655 Add file type extension to document backups 2014-07-29 23:48:37 +02:00
Allan Odgaard
86dd335024 Don’t read bundle sources or signing keys from disk
This was to allow third party indexes but we newer got anywhere with that, so it’s just unnecessary code complexity and the potential for problems if the files on disk are wrong.
2014-07-29 22:33:24 +02:00
Allan Odgaard
acaf24dca0 Remove unused code
This should have been removed in 36cfb177a5.
2014-07-28 21:57:44 +02:00
Boris Dušek
ae373343c1 Implement basic accessibility for OakKeyEquivalentView
I experimented a lot with different combination of attributes, this one works
reasonably well compared to the others (even though it is less feature
complete). I may revisit experimenting with it at some later point.
2014-07-28 17:10:15 +02:00
Boris Dušek
279ac58bf4 Improve accessibility for OakBundleItemCell
More specifically item's displayed keyboard shortcut or tab trigger is now
announced by VoiceOver.

Implementation of accessibilityAttributeValue:forParameter: returns nil for
some attributes. This is a hack to avoid doing tedious adjustments of certain
parameterized attributes (like AXStringForRange, AXAttributedStringForRange,
AXBoundsForRange, AXRTFForRange) for string AXValue that is extended (appended)
by extra information at its end in accessibilityAttributeValue:. To get an idea
how tedious this is (even though our case is a bit simpler by not *prepending*
anything before the AXValue, and not being an editable field), look at
OakLinkedSearchFieldCell. This looses the ability for the user to interact with
the text, but considering how seldom this will be used (if at all), for now
this seems acceptable.

This is needed because VoiceOver asks for the *StringForRange attributes and if
implemented, will never query AXValue (which is where our custom behavior is).

In the future when tables will be migrated from cell-based to view-based ones,
the tab trigger or shortcut could be a separate NSView, which would probably
allow for much more elegant solution to this problem.
2014-07-28 17:10:15 +02:00
Boris Dušek
2d554bd7bc Use AXValue of OakChooser's cells for accessibility announcements
Previously we used [NSCell stringValue], which is not suited for cells with
custom implementation for AXValue accessibility attribute.
2014-07-28 17:10:15 +02:00
Jeremy Whitlock
f3b6c07bfb Make ⌘F default to 'Selection' for multi-line selection
Previously using ⌘F with a multiline selection would automatically set the “in”
pop-up to “Document”. This is no longer the case, but can be brought back by
running: `defaults write alwaysFindInDocument -bool YES`
2014-07-27 22:55:39 -06:00
Allan Odgaard
2d09d503ee When clearing marked range, ensure pending range is also cleared
This fixes an issue with complex input managers.

Using Chinese pinyin input and entering ‘ci’ followed by ‘1’ to insert first glyph would insert the glyph (‘刺’) and then set the pending marked range (0-2), which would have caret end up in the middle of a multi-byte sequence.
2014-07-24 22:37:38 +02:00
Allan Odgaard
cc7f149f52 Avoid using Application Support for temporary file
Since the user’s library folder might be on a network we should probably avoid writing to it unless strictly necessary.
2014-07-24 22:37:38 +02:00
Ronald Wampler
d2b3610059 VariablesPreferences: Abort editing before deleting a row
This prevents `tableView:objectValueForTableColumn:row:` from throwing an exception (index beyond bounds) when the user deletes the last row while it is being edited.
2014-07-19 14:14:22 +02:00
Ronald Wampler
ad37b94e3f VariablesPreference: Disable delete button when table is empty 2014-07-19 14:14:21 +02:00
Boris Dušek
7e01bab12a Optimize Zoom support a little bit
This makes Zoom support avoid doing all 2 conversions between UTF-8 to UTF-16,
and replaces call to rect_for_range with call to rect_at_index, which is
more efficient.

Note that this is a typical micro-optimization not resulting from any
actual performance measurement, but just from a desire to have a lean
code not doing redundant work.
2014-07-19 14:14:21 +02:00
Boris Dušek
17c5df94ca Fix textmate/bugs#5
When setSelectionString is called during editing of text (like inserting
or deleting a character), it catches layout in a semi-consistent state
where horizontal position of individual characters cannot be determined.
Therefore during such events, we cannot pass the correct screen position
to the call to UAZoomChangeFocus.

So let's do the UAZoomChangeFocus call after this iteration of run loop.
This ensures everything in layout that had to update has updated when
calling UAZoomChangeFocus, thus enabling us to provide correct horizontal
screen position.
2014-07-19 14:14:21 +02:00
Boris Dušek
e08a40a507 layout: Fix bol_as_eol for case where range length is 0
bol_as_eol was meant for non-empty ranges, but the only place where
empty ranges were attempted with bol_as_eol was for Zoom tracking,
and it seems like I did not re-test Zoom after making the bol_as_eol
commit.

Fixes textmate/bugs#4
2014-07-16 23:21:21 +02:00
Allan Odgaard
1d57e46493 Let OakChooser decide when to render table view as having focus 2014-07-10 23:43:20 +02:00
Allan Odgaard
922f9c13af Add ‘drawAsHighlighted’ public table view property
This allows factoring out the decision of when to draw as highlighted.
2014-07-10 23:43:20 +02:00
Allan Odgaard
81e47090cc Call recalculateKeyViewLoop after current event loop iteration 2014-07-10 23:43:20 +02:00
Allan Odgaard
36cfb177a5 Leverage the default implementation of bindings 2014-07-10 23:43:20 +02:00
Allan Odgaard
4f19370458 Let key equivalent field pass unused key down events to super 2014-07-10 23:43:20 +02:00
Allan Odgaard
01fe210895 Key equivalent field no longer activate recording on return
This is to allow using the control in windows with a “default” button (which gets the return key).
2014-07-10 23:43:20 +02:00
Allan Odgaard
bfb33e6144 Let bundle item chooser’s ranker remember user corrections 2014-07-09 22:14:41 +02:00
Allan Odgaard
d4ca90724a OakChooser: Reselect first item when filter string is changed 2014-07-09 22:14:40 +02:00
Allan Odgaard
d16f5216c2 Ensure we “search by title” when opening the bundle item chooser 2014-07-09 17:25:16 +02:00
Allan Odgaard
6a8cd7e1ac Only set search field as first responder if it’s in the window
For example the bundle item chooser may swap it out with a key equivalent view.
2014-07-09 17:25:16 +02:00
Allan Odgaard
f94b70cd0d Move files on disk 2014-07-09 17:25:16 +02:00
Allan Odgaard
d821793182 Remove old filter list code 2014-07-09 17:25:16 +02:00
Allan Odgaard
c57dd931e1 Let the bundle item chooser inherit from OakChooser 2014-07-09 17:25:16 +02:00
Allan Odgaard
420f70cf93 Make OakChooser’s cancel: method public API 2014-07-09 17:03:45 +02:00
Allan Odgaard
96b8b00df7 Implement intrinsicContentSize for OakKeyEquivalentView
This will allow it to be used with constraint based layouts.
2014-07-09 17:03:45 +02:00
Allan Odgaard
d85b4e280b Reference MGScopeBar class to prevent linker from stripping it
We instantiate the class in the xib file, so the linker does not know that we actually need it.

Currently the filter list framework use MGScopeBar, which is why this issue is not an actual problem (yet).
2014-07-09 17:03:44 +02:00
Allan Odgaard
5715ebf754 Allow a limit to be passed to file::read_utf8
Currently the API does not allow the caller to know that the data was actually truncated.
2014-07-08 17:49:42 +02:00
Allan Odgaard
bef21962c8 Changing font (Show Fonts) would fail when current font was ‘nil’ 2014-07-06 22:16:14 +02:00
Allan Odgaard
5af1ec23ca Enable ligatures
If you are using the Mensch font then you need to update to version 2 to avoid problems with the ligature for ‘fi’: http://robey.lag.net/2012/08/22/mensch-2.html
2014-07-06 14:50:11 +02:00
Ronald Wampler
cc64b1e24f Add search field to Bundle preference pane 2014-07-06 11:34:34 +02:00
Ronald Wampler
8f50838b25 Use "System Small" font in VariablesPreference table
Since variable strings can be very long and we reduced the font size in the bundle table, let's be consistent and use a smaller font size here too.
2014-07-06 11:34:33 +02:00
Ronald Wampler
a2690f9418 Save VariablesPreferences.xib with Xcode 5.1.1 (5B1008) 2014-07-06 11:34:33 +02:00
Ronald Wampler
9812748a07 Use "System Small" fonts in BundlePreference table
By using a smaller font size in the bundle table we can show more of the bundle description. Also, it minimizes the amount of resizing of the pane we have to do to see the entire description string for most of the bundles.
2014-07-06 11:34:33 +02:00
Ronald Wampler
360443682d Save BundlePreferences.xib with Xcode 5.1.1 (5B1008) 2014-07-06 11:34:33 +02:00
Allan Odgaard
f370408910 File browser actions were disabled for broken symbolic links
This made it impossible to move a broken symbolic link to trash.
2014-07-05 21:33:29 +02:00
Allan Odgaard
2c8a020d39 Implement selectNext/PreviousTab in FindWindowController 2014-07-05 21:33:29 +02:00