Commit Graph

2730 Commits

Author SHA1 Message Date
Allan Odgaard
e3ca295150 Set ‘attr.test.rspec’ for projects with an ‘.rspec’ folder
This scope can be used for the Re-Run mentioned in rspec/rspec-tmbundle#90.
v2.0-alpha.9557
2014-08-08 19:42:30 +02:00
Allan Odgaard
bc65a57957 Use OakIsEmptyString where appropriate 2014-08-08 19:42:30 +02:00
Allan Odgaard
8fa83238c1 Set key equivalent view to have “shared focus” with table view 2014-08-08 14:53:44 +02:00
Allan Odgaard
fbacbe246b Better first responder observing for shared focus with table view 2014-08-08 14:53:44 +02:00
Allan Odgaard
6810c2c883 Render bundle item table view as focused for key equivalent input
This is only when we are not recording a key, and the table view will be properly rendered as highlighted in this mode.
2014-08-08 14:53:44 +02:00
Allan Odgaard
357c66b4d1 Refactor how we send text field movement keys to a table view
The code is now easier to reuse.
2014-08-08 14:53:44 +02:00
Allan Odgaard
5bb42e8bc6 Setup the OakChooser controller as window’s next responder
This means any unhandled keyDown: ends up being overridable by OakChooser.
2014-08-08 14:53:44 +02:00
Allan Odgaard
673736e325 Table view sends ‘selection changed’ accessibility notification
Since we have the ‘drawAsHighlighted’ property it makes sense to make it post the accessibility notification when this property is set to YES and we do not have focus, rather than have the controller which change our selection be responsible for this.

A minor disadvantage is that there are multiple ways to change a table view’s selection. We assume that ‘selectRowIndexes:extend:’ is the canonical way to do it (and all code that wants to trigger VO notifications should use that method).
2014-08-08 14:53:43 +02:00
Ronald Wampler
3934f1be46 Use dictionary literals 2014-08-08 14:53:43 +02:00
Ronald Wampler
dab45a5c08 Remove no longer used option for the Commit Window
Originally, the "--ask" option was used in the previous commit window to change the NSTextField above the text view; however, no SCM bundles (in textmate's repos) currently uses it.
2014-08-08 14:53:43 +02:00
Ronald Wampler
9fece6576c Retrieve the sheet delegate if present in main window 2014-08-08 14:53:43 +02:00
Allan Odgaard
afbc364fc3 Move highlight_ranges.h to ui subfolder
Only sources in the ui folder use this code and was previously including it from a parent folder, which breaks the hierarchical ordering of sources: you can include child folders, not ancestors.
2014-08-07 12:03:21 +02:00
Allan Odgaard
6e864a917d Avoid clash with NSCell’s keyEquivalent property
The rationale for the ‘string’ suffix is that our properties are things to be displayed rather than behavioral properties.
2014-08-07 12:03:21 +02:00
Allan Odgaard
0d496ea58c Look for process id file from 2.0-alpha.9553 and earlier
This is only when updating from an earlier version: Previously we would not find the pid file from the old instance and thus not tell it to quit.
2014-08-07 12:03:21 +02:00
Allan Odgaard
271608a7b0 Use NSTextInputContext instead of NSInputManager
The latter has been deprecated since 10.6 but hasn’t given any deprecation warnings (and it’s not like I’m eager to touch the NSTextInput protocol implementation, as I just barely understand how this stuff is supposed to work).
2014-08-07 12:03:21 +02:00
Allan Odgaard
0890b2aab0 Use local event monitor for key equivalent view
This ensures we get all key events, for example in the bundle item chooser window the pop-up button’s menu would previously see the key down event before the key equivalent view, so enabling recording and pressing ⌘1-3 would not record that key equivalent, but instead activate the corresponding (pop-up) menu item.
2014-08-07 12:03:21 +02:00
Zete Lui
17128edfc1 Loop select items in Chooser
If `enableLoopFilterList` is set to `YES`:

- when at top, pressing <Up> selects the last item on bottom
- when at bottom, pressing <Down> selects the first item on top
2014-08-03 09:15:34 +02:00
Joachim Mårtensson
2eaa97b1dc Remove compiler error 2014-08-03 09:05:37 +02:00
Joachim Mårtensson
2df7620b8d Add Ruby 2.0 support for build scripts 2014-08-03 09:05:33 +02:00
Allan Odgaard
d422a21006 Do proper string conversion of non-string values
Only values from the root target goes through this code, so it wasn’t causing a problem, as none of those keys had a multi-element array, but in ruby 2.0 embedding an array in a string seems to use inspect instead of to_s:

	Ruby 1.8: "#{['foo']}" #=> foo
	Ruby 2.0: "#{['foo']}" #=> ["foo"]
2014-08-03 09:05:09 +02:00
Allan Odgaard
c0c193ce7f Update some ruby shebangs 2014-08-03 09:04:57 +02:00
Allan Odgaard
34a1347622 Checkin release notes v2.0-alpha.9555 2014-07-31 18:14:08 +02:00
Allan Odgaard
5808eecd74 Add crash report info about what plug-in we’re loading 2014-07-31 18:13:51 +02:00
Allan Odgaard
10b6941e13 Extend bundle item chooser’s search capabilities 2014-07-31 15:36:19 +02:00
Allan Odgaard
65f8a8e9bf Use our “standard” idiom for setting menu item keys to ⌘1-n 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
8d9a2f5426 Improve lifetime of the authorization wrapper used by mate
While the memory was released during exit, we didn’t free the authorization right, which is shared between multiple processes, unsure if that would actually leak any resources.
2014-07-30 17:40:23 +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
f392caf100 Remove rmate from .gitmodules
We removed the actual sub-tree from the repository back in 2d4d4729d2.
2014-07-24 22:47:55 +02: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
Allan Odgaard
6e1d094fbf Detect abnormal exit when loading plug-ins
Currently we ask user about skipping it, but it might make sense to also add an uninstall option.
2014-07-24 22:37:38 +02:00
Allan Odgaard
dfe38c3708 Set required version of ninja to 1.5 2014-07-24 08:18:50 +02:00
Nyx0uf
8dbeabca23 QuickLook: Abort preview when type can't be determined 2014-07-22 23:07:59 +02:00
Nyx0uf
48ede9952b QuickLook: Check for cancellation
Add a bit of redundant code but it's useless to continue doing stuff if the request is cancelled by the user anyway.
2014-07-22 23:07:59 +02:00
Nyx0uf
3f716c27ad QuickLook: Handle thumbnail generation
Read at most 1 KiB or 50 lines of a file and render the attributed string in a bitmap context.

The theme is set to Mac Classic to ensure a white background for best look when the previews are used as icons in Finder.

The user’s default fixed width font in size 4 is used. With this font size only around 7 lines are shown, so we need to make it smaller, but we probably want to scale down the result to allow fractional line heights.

A lot of code is copy/pasted from the QuickLook preview generator.
2014-07-22 23:07:58 +02:00