Commit Graph

272 Commits

Author SHA1 Message Date
Allan Odgaard
8b135875bc Use custom type for items in bundle item chooser 2016-09-30 12:47:57 +02:00
Allan Odgaard
a83912489c Require the 10.11 SDK to build TextMate 2016-09-30 12:46:59 +02:00
Allan Odgaard
db6c22bd8c Delegate menu item validation for performBundleItemWithUUIDStringFrom:
We now let the object that handles performBundleItem: validate the menu item.
2016-09-29 09:16:00 +02:00
Allan Odgaard
616309bb5e Remove performBundleItemWithUUIDString:
Instead we call performBundleItemWithUUIDStringFrom: so that there is only one entry point.
2016-09-28 20:56:55 +02:00
Allan Odgaard
ede6b4b026 Change named parameter completionHandler: to outputHandler:
The handler is only called for commands with output to insert into the text view, hence completionHandler is a misnomer.
2016-09-27 21:29:03 +02:00
Allan Odgaard
df0fbe8630 Preparation for removing document_ptr from DocumentWindowController 2016-09-24 09:00:25 +02:00
Allan Odgaard
e133be01b7 Rename documents property to cppDocuments
This is just to make migration easier.
2016-09-24 08:59:31 +02:00
Allan Odgaard
2f9e1d8a69 Remove unnecessary import statements 2016-09-24 08:55:18 +02:00
Allan Odgaard
ffca47a262 More code ported to OakDocument 2016-09-24 08:55:06 +02:00
Allan Odgaard
14110e938c Let ODB Editor Suite support use OakDocumentController API 2016-09-24 08:33:33 +02:00
Allan Odgaard
774b390b51 Rename ODBEditorSuite.cc to ODBEditorSuite.mm 2016-09-24 08:33:33 +02:00
Allan Odgaard
9e7aa55ac2 Let RMateServer use OakDocumentController API 2016-09-24 08:33:33 +02:00
Allan Odgaard
a07a1746f3 Don’t attempt to install items opened via Open Recent Project 2016-09-24 08:33:32 +02:00
Allan Odgaard
ad01eb1ac6 Use stringArrayForKey: where appropriate 2016-09-21 20:39:41 +02:00
Allan Odgaard
1087a68f44 Add “File Browser Items” as find dialog search target 2016-09-20 20:04:19 +02:00
Allan Odgaard
27c34c8991 Add missing key bindings for Back and Forward items in File Browser menu
This broke when we changed the menu name from Go to File Browser.
2016-09-20 18:13:46 +02:00
Allan Odgaard
7cc017f343 Harmonize all implementations of sharedInstance 2016-09-19 12:54:19 +02:00
Allan Odgaard
ddefdec649 Change document’s isOpen property to isLoaded
Since we do not load documents before the user selects them, e.g. after session restore or when opening multiple documents, it makes sense to have both an isOpen and isLoaded property, the former means “is shown somewhere in the UI” and would make it appear (e.g. in file browser) with close button etc., whereas the latter means that data has been loaded from disk, and we can safely access the buffer.
2016-09-18 10:29:21 +02:00
Allan Odgaard
bdfdef2dde Rename file DocumentController.{mm,h} to DocumentWindowController.{mm,h} 2016-09-13 07:37:16 +02:00
Allan Odgaard
0efd6c750d Rename DocumentController to DocumentWindowController
This should ensure we do not confuse it with OakDocumentController (a class that only tracks document instances w/o any UI).
2016-09-13 07:37:16 +02:00
Allan Odgaard
553e89ceb6 Update include statements and link declarations 2016-09-11 12:47:39 +02:00
Jacob Bandes-Storch
7c325ff90b Add “Check for Updates” to the app menu
Another common practice among Mac apps.
2016-09-10 02:11:35 -07:00
Allan Odgaard
eba19a8fe2 Let the bundle item chooser handle “option return to edit”
Previously using option return would only work for editing bundle items, not key binding files.
2016-09-09 05:32:19 +02:00
Allan Odgaard
b4b7994d0a Use the table view as Open Recent Project’s initial first responder
If the user starts typing the focus is moved to the search field, so the only potential disadvantage is the discoverability.

The advantage is that with the table view as initial first responder we can support forward and backward delete to remove items, where previously we required ⌘⌫, which would work when editing text, and thus could cause data loss for a user expecting this key to instead delete to the beginning of the line (text field).
2016-09-08 20:14:08 +02:00
Allan Odgaard
e1cc2ef6f6 Don’t allow first responder for remove button in table view
The table view (currently) refuse first responder, but this will change, hence why it is important that our remove button refuses (for proper key view loop).
2016-09-08 20:14:07 +02:00
Allan Odgaard
cf76d2269e Let removeItemsAtIndexes: return count of items removed 2016-09-08 20:14:07 +02:00
Allan Odgaard
3e2ed6ca40 NSWindowController will set isReleasedWhenClosed to NO 2016-09-08 11:41:34 +02:00
Allan Odgaard
4c8308b520 Use perror instead of fprintf + strerror 2016-08-28 17:24:14 +02:00
Allan Odgaard
29033c60d8 Use OakCommand in file browser and application delegate 2016-08-28 13:32:48 +02:00
Allan Odgaard
96d322c298 Use close(open(path, O_CREAT)) to “touch” path 2016-08-28 09:16:10 +02:00
Allan Odgaard
232461fb47 Miniaturized windows would not show when clicking TextMate’s app icon
This was only if the user had disabled creating untitled documents on re-activation in Preferences.
2016-08-22 22:37:18 +02:00
Ronald Wampler
fa9ceead09 Refactor ODBEditorSuite to avoid FSRef API (10.8) 2016-07-14 12:21:28 +02:00
Allan Odgaard
4b19e40440 Show error message when trying to install blacklisted plug-in 2016-07-12 11:00:11 +02:00
Allan Odgaard
81d2586ffc Introduce plug-in blacklist which defaults to io.emmet.EmmetTextmate
We have been detecting plug-in crashes for about two years, and we offer the user to remove crashing plug-ins, nonetheless we are still getting a significant number of crash reports from loading the Emmet plug-in.
2016-07-12 11:00:11 +02:00
Allan Odgaard
a1c8e0317e Change title of Recent Projects chooser to Open Recent Project 2016-07-07 09:34:08 +02:00
Allan Odgaard
cc7ff6e631 Always store release notes digest in user defaults
Commit 8c19532531 broke it so that a digest would only be stored if one was already there, meaning that new users (since November 2015) would not see release notes after update.
2016-06-30 17:21:05 +02:00
Allan Odgaard
ab6c91b1c4 Let BundlesManager observe user defaults for disabling update checks 2016-06-29 23:24:17 +02:00
Allan Odgaard
adef9fbbbc Use new BundlesManager API to obtain release notes
This removes the last dependency on the updater framework.
2016-06-29 14:21:55 +02:00
Allan Odgaard
469fd74a7b Rely on ARC to manage GCD types (10.8) 2016-06-22 20:43:28 +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