Commit Graph

2686 Commits

Author SHA1 Message Date
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
Brad Choate
6172d9ae8f Adding some 2012 committers. 2014-07-22 13:10:46 -07:00
Brad Choate
e94408b0c4 Support a "--warn" switch for gen_html.
Default is to suppress any warnings for unassociated GitHub profiles.
2014-07-22 12:13:35 -07: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
754f1a1a4f Checkin release notes v2.0-alpha.9551 2014-07-12 00:07:07 +02:00
Allan Odgaard
e4d92941ee Update QuickLook generator to use the new bundle item index
This should improve startup time significantly, since it would previously have to re-index all the bundle items.
2014-07-11 14:11:03 +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
565d0b915e Limit QuickLook preview to the first 20 KiB of the file
This was suggested in pull request #1226. Ideally we would make the limit flexible, e.g. see how much we can generate in 1-2 seconds, but that is a non-trivial change, so the fixed limit will do for now, and while truncated data is suboptimal, it’s better than being killed due to QL manager’s timeout.
2014-07-08 17:49:42 +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
f2387d8d23 Workaround for ruby 2.0 warning (shadowing outer local variable) 2014-07-06 22:42:00 +02:00
Allan Odgaard
a7d45aa573 Checkin release notes v2.0-alpha.9549 2014-07-06 22:35:47 +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
Allan Odgaard
42a64270bc Remove undesired whitespace 2014-07-05 21:33:29 +02:00
Allan Odgaard
1c742b0559 The cap’n proto rule should not be a generator rule
Also change 1 → true for another use of generator (for consistency).
2014-07-05 21:33:29 +02:00
Boris Dušek
eea001f5d5 Fix build error on clear rebuild
When rebuilding textmate from scratch:

git clean -xffd; git reset --hard HEAD; rm -rf ~/build/TextMate/; ./configure; ninja

This error appears:

Frameworks/OakAppKit/src/OakTabBarView.mm:7:9: fatal error: 'OakAppKit/OakFileIconImage.h' file not found

After one issues "ninja" again, textmate continues building fine.

I guess this might be because perhaps OakAppKit's headers are being copied
to the build include directory (~/build/TextMate/include) in parallel when
building OakTabBarView.mm. No matter what actually is the case, this patch
fixes building during clean build.
2014-06-29 21:40:33 +02:00
Boris Dušek
320c3ec23a Add contributor emails
In other words, I don't like build warnings of any kind :-)
And they deserve credit for their contributions.
2014-06-29 18:21:50 +02:00
Boris Dušek
900ee1f523 Use NSAccessibilitySharedFocusElementsAttribute in OakChooser
This new 10.10 API allows one to mark, for some UI element, a set of UI
elements to track selection. VoiceOver (and other accessibility clients)
will then track and announce selection (cursor) changes not only in the
currently focused element, but also for all elements contained in its
"shared focus elements" array. This is a perfect fit for search field
with a table of results. In fact it is used for new 10.10 Spotlight -
its search field's shared focus element is the table containing the results.

As NSAccessibilitySharedFocusElementsAttribute is available only in the 10.10 SDK,
so make a way to use its value with previous SDKs (with which TextMate
is currently compiled).

We also retain the kind-of-hacky solution for pre-10.10 OSes introduced in
and instead use NSAccessibilitySharedFocusElementsAttribute.

This code was tested in all 6 fields of a 3×2 matrix:
* compiled with 10.8, 10.9 and 10.10 SDK
* run on 10.9 and 10.10 (DP2)

For user, this means more standard behavior (says the same "completion selected"
thing as with Spotlight) and a bit more correctness (no extra space
before beginning / after end of search field on braille display).

For developer, this means once we stop supporting 10.9, we will be ready to
drop a lot of code which, while serving us well to make the choosers more
user friendly on pre-10.10, will no longer be needed.
2014-06-29 11:01:58 +02:00
Allan Odgaard
a76b6eae9c Respond to next/previous tab actions in file/favorites chooser
This makes it possible to use ⌘{ and ⌘} to move between the source lists, which is consistent with other windows with multiple sources (like the Preferences and About windows).

Closes #1236.
2014-06-28 18:22:02 +02:00