Commit Graph

2119 Commits

Author SHA1 Message Date
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
Adam Strzelecki
59a699c078 Tune tab label inset shadow
Now it matches more way other OSX elements are inset both on Retina and
non-Retina displays.
2014-06-28 18:02:00 +02:00
Adam Strzelecki
56cfc1a3e0 Reworked OakTabBarView layout plist
Now it supports properly Retina using Cocoa rounded corner rendering instead
pixel patches. All colors are now references by name.
2014-06-28 18:02:00 +02:00
Adam Strzelecki
2ef711ad97 Define color names for OakTabBarView
This lets layout file refer to color names instead hardcoding color hex values.

Also colors referenced by name can return different values depending on OSX
version, which will in future solve problems with OSX 10.10 Yosemite L&F.
2014-06-28 17:59:27 +02:00
Adam Strzelecki
53943e4409 Extend layer_t with cornerRadius & borderColor
This allows drawing rounded layers with border in resolution independent
manner. Also it reduces number of layers needed to certain UI elements.
2014-06-28 17:56:50 +02:00
Boris Dušek
72bb6e6eb6 Fix enum/int conversion error with 10.10 SDK
10.10 SDK makes NSLineBreakMode into a proper NS_ENUM enum (in 10.9 SDK it was
a plain typedef for NSUInteger with some integer NSLineBreak* values
conveniently available for it in an anonymous enum).

Nevertheless, attr_string code should have always used NSLineBreakMode instead
of NSUInteger (unless I am missing something like values in style::line_break::mode
that do not correspond to the enum), so this commit makes it so and
thus also fixes building with 10.10 SDK.
2014-06-28 17:54:16 +02:00
Allan Odgaard
2427464f60 Disable tar’s support for extended attributes and resource forks
A problem has been reported where tar will freeze while extracting the default bundles archive to a networked Application Support folder.

From the bug report (Michael Kuron):

File servers tested: SMB on OS X 10.9.3, AFP on OS X 10.9.3, AFP on OS X 10.6.8, SMB on Windows 2008 R2.

Multiple machines tested.

Using ‘gnutar’ from MacPorts does not show the problem.

Setting ‘COPYFILE_DISABLE=1’ before running tar does not show the problem (the workaround used in this commit).
2014-06-28 17:42:23 +02:00
Allan Odgaard
e78764a89e Let threaded syntax highlight parsing for ng::buffer_t be opt-in 2014-06-28 17:42:23 +02:00
Allan Odgaard
0ae6782d80 Remove support for custom views in OakControl 2014-06-28 17:42:23 +02:00
Allan Odgaard
c1552d56bc Include some context in error message 2014-06-28 17:42:23 +02:00
Allan Odgaard
7675aeb4ec Changing case would truncate the result if it grew in size 2014-06-28 17:42:22 +02:00
Allan Odgaard
6be2935518 Type/format arguments for SecItemImport were swapped
Also collect proper error code incase the function fails.
2014-06-28 17:42:22 +02:00
Allan Odgaard
3a0adfb6bf Collect proper error code if SecItemCopyMatching fails 2014-06-28 17:42:22 +02:00
Ronald Wampler
6dd2dc1c5e Use document icons in overflow menu 2014-06-28 17:42:22 +02:00
Ronald Wampler
2dbd0d601f OakTabBarView datasource now sends the unabbreviated path 2014-06-28 17:42:22 +02:00
Ronald Wampler
c5d801cca9 Adjust click target for tab overflow button 2014-06-28 17:42:22 +02:00
Ronald Wampler
28e58bf4a4 Add effect when the tab overflow button is clicked 2014-06-28 17:42:21 +02:00
Ronald Wampler
673f5a4b73 Adjust appearance of the TabOverflow image 2014-06-28 17:42:21 +02:00
Ronald Wampler
0b3cf27cfd Add Retina asset for TabOverflow 2014-06-28 17:42:21 +02:00
Allan Odgaard
8782e2aa81 Fix bug with PATH variable containing trailing zero byte 2014-05-18 23:14:07 +07:00
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