Commit Graph

1415 Commits

Author SHA1 Message Date
Allan Odgaard
cabd099830 Checkin release notes v2.0-alpha.9397 2013-03-17 16:46:43 +01:00
Allan Odgaard
f0fd87bf66 Only use cache file if at version 1
Since it’s not unlikely that a user will downgrade from a nightly build, we should be prepared to see cache files using a newer (incompatible) file format.
2013-03-17 16:03:11 +01:00
Allan Odgaard
062f78118a Don’t (re)scan when creating fs::node_t
Also make it optional to provide a map pointer (for collecting changes) when rescanning.
2013-03-17 16:03:11 +01:00
Allan Odgaard
04142cbf69 Bundle loading no longer done by static member function 2013-03-17 16:03:11 +01:00
Allan Odgaard
7d6763eee7 Avoid member data access when constructing bundles::item_t 2013-03-17 16:03:11 +01:00
Allan Odgaard
594bfcb29d No longer support deleted items in bundle’s info.plist
Recording that an item is deleted in the bundle’s info.plist is necessary for TextMate 1.x because it merges all installed bundles, so if the user has a local version, he will still see items from the default version, unless these are indicated to be deleted in the local version.

With 2.0 only delta bundles get merged with a less-local bundle, and when deleting a default item, a delta item is written with the ‘isDeleted’ key set to true.
2013-03-17 16:03:10 +01:00
Allan Odgaard
f888376e05 Move bundle loading to own file 2013-03-17 16:02:30 +01:00
Allan Odgaard
0f9b15b916 Show error when property list fails to parse 2013-03-17 15:44:07 +01:00
Allan Odgaard
c6375e2ed9 Add success/failure to plist::parse_ascii API 2013-03-17 15:44:07 +01:00
Allan Odgaard
5dcbbde817 Let user know if saving in bundle editor fails 2013-03-17 15:44:07 +01:00
Allan Odgaard
0d2af1fbfa Don’t use posix_spawnattr_setpgroup
This appears to fail in rare circumstances and there is no reason why the io::exec code sets up a process group, so easier to just remove this.
2013-03-17 15:44:07 +01:00
Allan Odgaard
dfee671b6a Don’t use POSIX_SPAWN_CLOEXEC_DEFAULT on 10.7
Using this flag on 10.7.5 seems to cause a kernel panic.

Fixes #896.
2013-03-17 15:44:06 +01:00
Allan Odgaard
398e55cdbe Add helper functions to get OS version
We need this in a few places and while calling Gestalt() isn’t that much code, that function is deprecated in 10.8 and the alternative is a lot more code, so we don’t want to repeat that once we update the code.
2013-03-17 15:44:06 +01:00
Allan Odgaard
45dc49eb29 Retire compiler workaround
Previously we could get a compiler error when using std::map<std::string, std::string>() as a default argument.
2013-03-16 17:49:49 +01:00
Allan Odgaard
15c27135fd Change folder pop-up to pull-down
The menu contains two (non-selectable) “actions”. If we use a pop-up, we have to change the selection after the user select one of these actions, which isn’t the case with a pull-down menu.
2013-03-16 17:49:49 +01:00
Allan Odgaard
b0a0df831a Add ability to set project folder via file browser
For now it is done via a new menu item in the top folder pop-up. It might be useful to also show this menu item in the general action menu.
2013-03-16 17:49:49 +01:00
Allan Odgaard
315908e2d8 Update menu item titles in Text menu
These now reflect whether or not the action works on the selection.
2013-03-16 17:49:48 +01:00
Allan Odgaard
3a75199e9d Use menu validation to update bundle menu item titles
This means we don’t need to know if there is a selection when creating the menu items and long-term it’ll be easier to introduce more complex updating, e.g. make the title a format string to allow referencing TM_DISPLAYNAME or disable the menu item if its requirements cannot be met.
2013-03-16 17:49:48 +01:00
Allan Odgaard
5caca35fc7 Use menu validation in OakShowMenuForBundleItems 2013-03-16 17:49:48 +01:00
Allan Odgaard
04e8eb44a2 Introduce updateTitle: for NSMenuItem
Since we create an attributed title when the menu item has a tab trigger or “inactive” key equivalent, we can’t later update the title via the title property.
2013-03-16 17:49:48 +01:00
Allan Odgaard
8313dcb407 Remove status bar graphics
This is no longer used since the OakStatusBar class has already been deleted.
2013-03-16 17:49:48 +01:00
Allan Odgaard
976dab5065 Only show bundle updates for this and last year
This makes the list appear noticeable faster. The dates are presently hardcoded to 2012 and 2013.
2013-03-16 17:49:48 +01:00
Allan Odgaard
29e0a2fec5 Make the rmate listen port a string instead of integer
When using an integer it got “pretty printed” by NSTextField (to have a thousand separator). If the user would “commit” this version, the version with the thousand separator would be stored in user defaults, which would make TextMate fail t listen to the desired port.
2013-03-16 17:49:47 +01:00
Allan Odgaard
2d4d4729d2 Remove ‘rmate’ submodule
With the script installable via rubygems there is no longer any reason to include it with TextMate.app and thus keep it as git submodule.
2013-03-16 17:47:19 +01:00
Allan Odgaard
38992fadef Simplify NSMenu subclass
Now that the bundle menu doesn’t register any key equivalents, there is no need to manually go through all but the bundle menu to avoid having the system trigger bundle menu items.
2013-03-14 10:14:46 +01:00
Allan Odgaard
6ac4aab910 Use custom menu item title for key equivalents
The rendering doesn’t mimic the system 100%, for example the key equivalents are not centered on the split between modifiers and the key, nor are F-keys rendered using a smaller font / menu glyph.

On the plus side though, now all keys are rendered. Previously keys shared with other (non bundle) menu items would only be shown for one of the items sharing the key, and some keys would simply not be shown (e.g. ⌃#).

Also, bundle menu items no longer “eclipse” regular menu items, which could previously happen even when the bundle menu item wouldn’t fire (as it was scoped for something else than the current context).

Fixes #894.
2013-03-14 10:14:46 +01:00
Allan Odgaard
619c19e8ed Space can be used instead of slash in file chooser (⌘T)
This enables full path search.

Closes #893.
2013-03-14 10:14:45 +01:00
Allan Odgaard
17ef6ef5d0 Use path::is_absolute instead of custom code 2013-03-14 10:14:45 +01:00
Allan Odgaard
7a00c45448 Checkin release notes v2.0-alpha.9395 2013-03-13 14:17:05 +01:00
Allan Odgaard
34bf85d8d1 Remove whitespace when shifting text left
Previously shifting text left/right would ignore blank lines (as noted in issue #419).

When shifting left though it does make sense to delete whitespace, especially as the same code is used to re-indent when pasting.

Fixes #810.
2013-03-13 12:38:12 +01:00
Allan Odgaard
0075b46c82 Introduce zeroIndentPattern
This will give the matched lines zero indent but without affecting the following lines.

Probably the only use-case for this is C preprocessor directives.
2013-03-13 12:38:12 +01:00
Allan Odgaard
d16f3bcc1e Use per-line indent patterns when estimating indent
This solves the problem where we need to estimate the current line’s indent, but the lines above it is a multi-line block comment. Previously we would fetch indent patterns based on the current scope, then find the first line above caret, for which the patterns can be used to estimate the indent. The problem is that the commented lines without comment markers would be treated as code, and used for the indent.

With the new approach, we can set different patterns for ‘comment.block’ (the C bundle already does this), which basically ignore all the lines, which will cause TextMate to use the code above the comment to estimate indent.

This commit closes textmate/c.tmbundle#3 and also closes textmate/php.tmbundle#24.
2013-03-13 12:38:12 +01:00
Allan Odgaard
77a07aedc7 Let TM_MATE point to ‘mate’
This command is used by a lot of commands, so it makes sense to have a dedicated variable for its location.
2013-03-13 12:38:12 +01:00
Allan Odgaard
b5eb83d383 Refactor code 2013-03-13 12:38:12 +01:00
Allan Odgaard
d8cf1e3591 Gather UI construction code and harmonize fonts 2013-03-13 12:38:11 +01:00
Allan Odgaard
9f8b7bf27c Improve layout constraints for labels
The widest should now be exactly 20 pixels from the window’s left border, and the others are right-aligned with this label.
2013-03-13 12:37:23 +01:00
Allan Odgaard
b5136bcdc7 Set window’s defaultButtonCell
This is instead of setting the key equivalent to ‘\r’ for the button that should be default.
2013-03-13 12:37:22 +01:00
Allan Odgaard
c44e85f258 Avoid delayed window resize 2013-03-13 12:37:22 +01:00
Allan Odgaard
7acf168904 Keep title and enabled state of Replace All button updated 2013-03-13 12:37:22 +01:00
Allan Odgaard
f553f20cc7 Change criterion for focusing find string when dialog is open
We now move focus to the find string unless the window is visible, key, and focus is already in a text field (technically an NSTextView).
2013-03-13 12:37:22 +01:00
Allan Odgaard
db5df4a58c Update Find window API 2013-03-13 12:37:22 +01:00
Allan Odgaard
4b5db02a44 Remove Find in Selection menu item
This item had no key equivalent and the find dialog automatically uses “selection” if the current document has a multi-line selection, so I don’t see any need for this menu item.

Also removed the key equivalent for “Find in Folder…” — the key equivalent wasn’t memorable and I don’t see a big need for this item, since one can initiate searches from the file browser.
2013-03-13 12:37:22 +01:00
Allan Odgaard
d18b30f280 Remove oak::lock_t and oak::mutex_t 2013-03-13 12:37:21 +01:00
Allan Odgaard
c3e9fc1b0e Change oak::mutex_t → std::mutex (C++11) 2013-03-13 12:37:21 +01:00
Allan Odgaard
f0efe600e4 Remove Edit → Select → None
This can now instead be found in the file browser’s action menu, as it (by design) only works on the file browser, not the text view.

Closes #883.
2013-03-12 10:25:04 +01:00
Allan Odgaard
b1e9476cce Add Select None to file browser’s action menu
This makes it easier for the user to discover that ⇧⌘A can be used to deselect all (useful e.g. prior to running a SCM command).
2013-03-12 10:25:04 +01:00
Allan Odgaard
df512d98fa Remember height of find in folder results 2013-03-12 10:25:04 +01:00
Allan Odgaard
5013620a89 Fix exception when renaming to empty string
Fixes #887.
2013-03-11 22:24:55 +01:00
Allan Odgaard
fcbaacdfe9 Set default encoding to UTF-8
Although everything would still default to UTF-8, the initial title of the pop-up in Preferences would show a wrong value.

Fixes #889.
2013-03-11 22:18:18 +01:00
Allan Odgaard
c561d2447b Add UI setting for disabling auto-resize
The auto-resize is when toggling the file browser.
2013-03-11 17:48:20 +01:00