234 Commits

Author SHA1 Message Date
Allan Odgaard
41f14fe5a4 Skip expiration check when running on 10.7 or earlier 2016-06-22 19:45:24 +02:00
Allan Odgaard
c50795af91 Simplify code by using std::function 2016-06-22 18:31:49 +02:00
Allan Odgaard
f5832c975f Add missing include statements 2016-06-22 18:31:49 +02:00
Ronald Wampler
e452a5ee55 Move "Go to Tab" to the Window menu and rename to "Select Tab"
Also edit the source to reflect the change in name (e.g., `updateGoToMenu:` → `updateSelectTabMenu:`).
2016-06-19 08:45:16 +02:00
Allan Odgaard
c649aed750 Update window title for Recent Projects dialog 2016-05-29 21:19:07 +02:00
Allan Odgaard
42b6c04089 Load plug-ins before bundles
The reason is that if there are no bundles, we will extract the default set to Application Support, and in doing so, we call tar which implicitly sets up the command environment, which is re-used for all successive commands.

The problem is that loading a plug-in may add to the environment (e.g. setting the DIALOG environment variable), so if plug-ins are loaded after the call to tar (as would be the case for on a clean system), the DIALOG variable will be missing from the environment.

Kudos to René Schwaiger for discovering this issue.
2016-02-25 09:51:14 +07:00
Allan Odgaard
ac3e69b443 Group themes using their semantic class
The semantic class must be of the form: `theme.«group»[.«whatever»]*`.

If a theme lacks a semantic class, or the semantic class does not have a `theme.` prefix then the theme gets into the “unspecified” group.

In theory we could analyze the themes for dark/bright background, but manually classifying themes seems more flexible, for example some themes have a transparent background, which we could put into their own group.
2016-02-05 17:37:06 +07:00
Allan Odgaard
26bee58d20 Use proper (NSInteger) type when dealing with Objective-C 2016-02-05 16:52:49 +07:00
Adam Strzelecki
272f691163 Edit->Spelling->System using system language
This sets '' (empty identifier) in Global.tmProperties that switches to system
specified spelling language (usually Automatic by Default which is OS X
default). It serves as a way back to the default when user picks any other
language than default from the menu for current buffer (effectively for
documents's directory).
2016-02-04 23:27:46 +07:00
Allan Odgaard
0a8360a8aa Add helper function to obtain the name for a locale identifier
E.g. da → Dansk, pl → Polski, etc.
2016-02-04 23:27:45 +07:00
Allan Odgaard
3478457098 Pass non-null arguments where the 10.11 SDK requires it 2015-11-20 13:12:16 +07:00
Allan Odgaard
8c19532531 Don’t change user defaults in background queue
The problem is that when we change user defaults a notification is posted, and this runs on the thread that did the change, so our own “user defaults did change” notification callbacks are executed on a background thread.
2015-11-18 09:57:29 +07:00
Ronald Wampler
f29ddf6500 Declare new protocols when building for 10.11
These were informal protocols prior to 10.11.
2015-09-21 09:50:20 -04:00
Allan Odgaard
8fe7681ebd Remove unnecessary include of oak/compat.h 2015-08-05 12:31:20 +02:00
Allan Odgaard
699cdd72cb Include scope bar in key view loop (rather than its buttons) 2015-07-20 11:40:14 +02:00
Allan Odgaard
2de5395ba5 Remove reference to OFBPathInfoCell 2015-07-20 11:28:53 +02:00
Allan Odgaard
4a7faba2c0 Do not show “TextMate is Outdated!” dialog for licensed copies 2015-06-12 14:18:53 +02:00
Allan Odgaard
e5404fb1ea Expose the registration window controller
Also make the registration window show up at the modal window layer. It should (probably) be using a modal session, though not entirely sure.
2015-06-12 14:18:19 +02:00
Allan Odgaard
4f2f799c6b Convert filter string to decomposed unicode
Since we are doing a literal (byte-by-byte) subset match we need to have the filter string use the same unicode normalization form as the items it is matched against.

For favorites and the file chooser, the items are file system names, which default to the decomposed form.

Ideally the filtering algorithm would know about diacritics, but in practice the current solution should work for most actual scenarios, and is much simpler (thus faster).
2015-06-12 14:10:17 +02:00
Anton
71a2c2dfa8 Allow opening favorites at startup and re-activation
This is enabled via the ‘showFavoritesInsteadOfUntitled’ defaults key.
2015-01-14 17:23:33 +07:00
Allan Odgaard
9f1f2f9e17 Use NSWorkspace’s frontmostApplication instead of GetFrontProcess 2014-11-30 09:12:07 +07:00
Allan Odgaard
191600fd8c Change RMateServer.cc → RMateServer.mm 2014-11-30 09:12:06 +07:00
Allan Odgaard
bf4cbd33fa Remove NSString* typecast when using to_s helper
This has a small run-time cost but source looks better and theoretically safer code.
2014-11-29 09:53:40 +07:00
Allan Odgaard
40857b1566 Do not disable Apple’s “press and hold” accent feature
With NSTextInputClient conformance this feature works fairly well, though we currently do not pass events (that we have an action for) to the current input context, which e.g. means that arrow left/right cannot be used to move through the variations.
2014-11-29 07:55:48 +07:00
Allan Odgaard
5968aa55b2 Let chooser windows remember their size (after relaunch)
Previously only the favorites / recent projects chooser would remember window size after a relaunch.
2014-11-28 15:58:40 +07:00
Allan Odgaard
568fcd49cf Opening a document via ‘mate -w’ and canceling would hang mate
For example with the following command we get an encoding dialog that allows us to cancel opening of the document:

    echo Æblegrød|iconv -f utf-8 -t mac|mate -w
2014-11-11 08:54:35 +01:00
Allan Odgaard
c1029c454b Improve bundle item chooser
We now show two lines per item: the name of the item and the location on second line.

For settings we show the (literal) value of the item next to its name (ideally user could click the item to toggle between literal and effective value).

Selecting settings items (from properties files) will go to the proper line in the properties file.
2014-11-10 10:35:37 +01:00
Allan Odgaard
912818ccfc Support line argument when opening files from bundle item chooser 2014-11-10 09:22:30 +01:00
Allan Odgaard
8be5b11d9c Ensure line break mode is set for display string in item choosers
Previously we would rely on the NSTextField cell’s line break mode, but this isn’t used when the object value is an attributed string, which it might become when the cell is selected.
2014-11-10 09:15:42 +01:00
Allan Odgaard
50ad6fce64 Loosen our expiration policy
We now give the user half a year before TextMate expires and only remind them once every week about TextMate being old, and now with a “Check for Updates” button in the dialog.
2014-11-06 23:05:43 +01:00
Allan Odgaard
6f5b02f994 Include name of symbolic link in favorites chooser
This is only when the name of the symbolic link is different from what it points to.

Closes #1272.
2014-11-06 22:32:07 +01:00
Allan Odgaard
4e5175d0d1 Manually set key view loop for the chooser windows
There are some problems with the auto-calculated key view loop:

1. Does the wrong thing when there are pending auto-layout changes.
2. Adds NSTableCellView children to the key view loop.
3. Adds views which are set to refuse first responder, which will break the loop if such view is the last one.
2014-11-06 16:47:10 +01:00
Allan Odgaard
7d2ed9a236 Set initial first responder when setting up key view loop 2014-11-06 16:42:22 +01:00
Allan Odgaard
5cefb3eac4 Show both display name and path in file/favorite chooser
Ranking has also been simplified in the file chooser: by default we match against the full path but prefer matches that only touch the base name.

The current document is placed last when there is no filter string (where we LRU sort) but once there is a filter string, we do not give it special treatment.
2014-11-05 20:49:10 +01:00
Allan Odgaard
a3b2fb8199 Switch to a view-based table view for the chooser dialogs
The favorites (recent projects) chooser now has a visible remove button to remove recent items or favorites.

Accessibility has regressed as we no longer post a notification when the table view selection changes.
2014-11-05 13:13:32 +01:00
Allan Odgaard
7aea556533 Remove custom NSArray category
We only use the firstObject method which has existed since OS 10.6 (though wasn’t mentioned until the 10.9 FoundationKit release notes).
2014-11-05 10:58:29 +01:00
Allan Odgaard
b581e20ad9 Add wrapper for adding views with auto layout enabled 2014-11-05 00:09:37 +01:00
Allan Odgaard
7ead6d418c Make the OakCreateLabel function more versatile 2014-11-04 22:22:57 +01:00
Allan Odgaard
137e6343ba Add convenience function to setup key view loop 2014-11-04 21:42:09 +01:00
Allan Odgaard
9d0191b44c Bump project’s LRU-date when opening via recent projects dialog
This ensures that re-opening the dialog has the just opened project at the top.
2014-11-04 18:12:16 +01:00
Allan Odgaard
92f8bb7586 Use sort descriptors to sort “recent projects” array 2014-11-04 18:08:52 +01:00
Allan Odgaard
1e9bd987b5 Offer user to uninstall (trash) plug-ins which crash 2014-11-02 13:53:29 +01:00
Allan Odgaard
74c76fb2aa Don’t assert CFSocket functions always succeed 2014-10-21 09:51:36 +02:00
Allan Odgaard
72fbba6339 Associate value with a mark using: mate --set-mark «mark»:«value» 2014-10-19 20:26:00 +02:00
Allan Odgaard
d9cc82ced8 Handle both clearing and setting marks in same command stream 2014-10-17 13:31:13 +02:00
Allan Odgaard
2ac17cbf83 Add support to mate protocol for setting and clearing marks 2014-10-14 22:08:13 +02:00
Allan Odgaard
639f1d282f Remove OakCreateSmallLabel helper since it’s only used once 2014-09-30 17:08:01 +02:00
Allan Odgaard
05bd76ad0b Make “Restore Session” default for session restore dialog
Since disabling session restore will discard user data, it should not be default.
2014-09-27 13:06:31 +02:00
Allan Odgaard
73b21bd836 Move WebView related print support to OakHTMLOutputView 2014-09-10 14:02:08 +02:00
Allan Odgaard
c559253a14 Allow printing WebViews even when they are not first responder
Starting with 10.9 (I think) it seems that when the WebView switches content view to show a PDF, it will lose first responder status, so pressing ⌘P (to print the PDF) does not work, but require the user to first click the PDF (to make the view first responder).

This commit uses a heuristic to figure out which view should be printed when the first responder is not a printable (web/PDF) view.
2014-09-08 22:14:51 +02:00