Commit Graph

2099 Commits

Author SHA1 Message Date
Allan Odgaard
539dee1486 Gutter view colors would be leaked when reloading themes 2014-05-17 13:21:53 +07:00
Allan Odgaard
b45ad48c00 Add attr.project.vagrant and attr.project.jekyll scopes
The latter is added when we detect a ‘_config.yml’ file in the project. This might cause false positives, but I am not aware of a better way to detect jekyll projects.
2014-05-17 13:21:53 +07:00
Allan Odgaard
4e5a7fdfe6 Delete clipboard history when seeing NSFileReadCorruptFileError 2014-05-17 13:21:53 +07:00
Allan Odgaard
49f746e795 Update saved per-window project state when terminating TextMate 2014-05-17 13:21:53 +07:00
Allan Odgaard
2b74e76a2f Disable concurrent buffer parsing when not on main thread
The problem is that we can only return to the proper thread/queue when we know what that thread/queue is. Additionally, when running tests, we are calling from a concurrent queue, so even knowing the queue, we cannot safely update the buffer with the new scopes, as only a serial queue can give us exclusive access.
2014-05-16 22:11:29 +07:00
Allan Odgaard
d7dba7cd7a Drop the oak::server_t abstraction for buffer parser 2014-05-16 22:11:29 +07:00
Allan Odgaard
42888110fb Add ‘saveOnBlur’ as a .tm_properties option
This makes it easier to enable auto-saving when TextMate loses focus and unlike using a command for this, files that cannot be saved will be silently skipped (as the user is leaving TextMate, so we should not throw up dialogs).
2014-05-16 22:11:28 +07:00
Allan Odgaard
8919ad3461 Remove duplicate code 2014-05-16 22:11:28 +07:00
Allan Odgaard
e81286b0cd Remove unused include 2014-05-16 22:11:28 +07:00
Allan Odgaard
0286a10cbc Remove unnecessary code 2014-05-16 22:11:28 +07:00
Allan Odgaard
a5dd8cc2d7 Save white I-beam cursor image with LZW compression 2014-05-16 22:11:27 +07:00
Allan Odgaard
41e4ed2cc3 Save PDF images with Preview’s “Reduce File Size” quartz filter
This reduced the file size with more than 90%.

Since the PDF files are mapped into TextMate’s address space, it results in a reduction of memory usage.
2014-05-16 22:11:27 +07:00
Allan Odgaard
af3f4aaa33 Check result of most CF/CT ‘Create’ functions 2014-05-15 13:17:30 +07:00
Allan Odgaard
b8804d1164 Fix three memory leaks
One was per launch, one was per key event, and one was per (unique) line drawn.
2014-05-15 13:17:29 +07:00
Allan Odgaard
55b5b7a3dc Use path::escape when creating TM_SELECTED_FILES
In addition to being redundant, now that we have a global escape function, the custom shell escaping code had a bug when the path contained more than one apostrophe.
2014-04-30 12:09:47 +07:00
Ronald Wampler
4c973385a8 Indent menu items in tabSizeMenu
This allow the check mark to be properly spaced with respect to its item.
2014-04-30 12:09:47 +07:00
Ronald Wampler
fc5dcf4020 Prefer NULL to nop: in most cases
This change was prompted by the appearance of the `tabSizePopUp` button in the status bar. After dismissing the menu, the title would be disabled.

To ensure we do not have similar issues elsewhere, let's prefer the use of `NULL` to `nop:` when assigning the action for menu items unless we are sure that the menu item should always be disabled (e.g., the item is used as a label).
2014-04-30 12:09:47 +07:00
Ronald Wampler
d9f4fae635 Enable "Open Files" search option in Find window
This seems to have been overlooked since most of logic was already implemented.

There is one known issue that exists when restoring sessions. Namely, after restoring a session only those documents (tabs), which have been actively "viewed" are considered "opened".
2014-04-30 12:09:46 +07:00
Ronald Wampler
3ed4722a80 Remove duplication of find_tags enumeration 2014-04-30 12:09:46 +07:00
Allan Odgaard
978ec97ecf Revert "Do not abort application shutdown when we need to save documents"
This reverts commit 73f82c6c5c.

Conflicts:
	Frameworks/DocumentWindow/src/DocumentController.mm
2014-04-29 06:59:39 +07:00
Allan Odgaard
7fb02603b5 Revert "Disable threaded saving as a workaround for stall during quit"
This reverts commit 0b41947412.
2014-04-29 06:59:39 +07:00
Allan Odgaard
0b41947412 Disable threaded saving as a workaround for stall during quit
The problem is that during quit the OS will run a local event loop until we reply to the terminate event. In this local event loop we cannot use performSelector:withObject:afterDelay: but that is required to not block the main dispatch queue.
2014-04-28 21:45:59 +07:00
Allan Odgaard
9a80fd4226 Fix potential stall using “save all” from find in folder
This would happen if the user manually saved one of the documents with replacements before invoking save all, since the wrong “did save” callback was called when trying to save an unmodified document.
2014-04-28 21:45:59 +07:00
Allan Odgaard
7ea524b936 Drop the oak::server_t abstraction 2014-04-28 21:45:59 +07:00
Allan Odgaard
17b5928d76 Remove backup files for documents with a path during quit
Previously if we selected “Don’t Save” the discarded changes would still be there after relaunch.
2014-04-28 18:23:51 +07:00
Allan Odgaard
7698ce2783 Show an error when WebKit fails to load the requested resource
WebKit will e.g. fail to load resources identified as application/octet-stream.
2014-04-28 18:23:51 +07:00
Allan Odgaard
cb22cc0228 Make bundle update frequency configurable
This is introduced only for testing.
2014-04-28 18:23:51 +07:00
Allan Odgaard
ffbcd3c7f9 Fix error logging for download problems 2014-04-28 18:23:51 +07:00
Allan Odgaard
8b02bb2809 Do not update a bundle if it requires a newer version of TextMate 2014-04-28 18:23:51 +07:00
Allan Odgaard
d06c6f02bc Use file’s display name instead of CFBundleName
This seems to be what Finder does, and some bundles (Spotify.app) actually lack a CFBundleName key.

Also ensure our bundle has a CFBundleIdentifier.
2014-04-28 18:23:51 +07:00
Allan Odgaard
8c41396ab9 Hide link arrows in Preferences → Bundles when there is no link 2014-04-28 18:23:51 +07:00
Allan Odgaard
b8c1085b9e Let NSURL extract the host from REST_API
The custom code in network::can_reach_host only dealt with the scheme, not port number or user/password.
2014-04-28 18:23:50 +07:00
Allan Odgaard
397fdb52d4 Make REST_API a global define and make it a C string 2014-04-28 18:23:50 +07:00
Allan Odgaard
7c31761e21 Use NSWindow’s stringWithSavedFrame instead of window.frame
This includes the screen dimension so that restoring the frame on a different screen can scale the window accordingly.
2014-04-25 16:55:31 +07:00
Allan Odgaard
0ad0b12a82 Improve “Open With” submenu
- Path to application is shown in the menu item’s tool tip.
- When menu is shown for multiple file types with different default applications, we show the default applications first.
- Use the potentially localized bundle name rather than file system display name.
- Use bundle identifier to group applications rather than display name: Grouping is done to decide if version number should be shown for the item.
2014-04-25 16:55:31 +07:00
Allan Odgaard
603f06d2db Move version comparison out of s/w update framework 2014-04-25 16:55:31 +07:00
Allan Odgaard
1c7a749308 Parse the ‘required’ field from remote bundle index 2014-04-25 16:55:31 +07:00
Allan Odgaard
c272afaff2 Cleanup/harmonize whitespace
Leading indent should consist only of tabs, beyond that, only spaces should be used.
2014-04-25 16:55:31 +07:00
Allan Odgaard
6d77df7ac3 fixup! Remove trailing zeroes from numeric literals 2014-04-22 08:16:34 +07:00
Allan Odgaard
5248129566 When failing to update a bundle we would claim “download error”
We would even output it two times.
2014-04-21 17:05:35 +07:00
Allan Odgaard
6359a2ef7c Use symbolic exit success/failure constants 2014-04-21 17:05:35 +07:00
Allan Odgaard
9e4a5ccd82 Add instance counter for node_t (used by glob parser)
This will alert us of any leaks (if instance count is non-zero during quit).
2014-04-19 17:01:31 +07:00
Allan Odgaard
a2fad22bf7 Check if directory exists before asking for path::entries
This is to avoid the warning logged from path::entries (about directory not existing).
2014-04-19 17:01:31 +07:00
Allan Odgaard
91b216bf24 Use glob parser for brace expansion 2014-04-19 17:01:31 +07:00
Allan Odgaard
d178527924 Do not make expansion order assumptions about consecutive braces 2014-04-19 17:01:31 +07:00
Allan Odgaard
7d1f7941b9 Include exclude operator in glob syntax comment/documentation 2014-04-19 17:01:31 +07:00
Allan Odgaard
78e76f55d8 Improve handling of empty braces in globs
We treat empty braces as literal characters though do balance them.
2014-04-18 20:30:07 +07:00
Allan Odgaard
cc02ceb963 Match (potential) file chooser glob against full file path
Previously we would try full path, relative path, and just the name. This was done to determine wether or not the display string should include full path details or be limited to the name. The problem is that an excluding glob may require the full path, and would thus not exclude items that did match when using just the item’s name.
2014-04-18 20:30:07 +07:00
Allan Odgaard
d39fc88324 Always enable action pop-up button in find window
Previously it was only available when doing folder searches, since the items are for folder search behavior and results.

However, with “Find All” in document, we get a similar result list from which we may want to copy matches.
2014-04-18 09:24:09 +07:00
Allan Odgaard
9524439aef Handle bang in globs (negation) identically to tilde
This simplifies the code (slightly) and allows the bang to appear in other positions than leading.
2014-04-18 06:40:48 +07:00