Commit Graph

1434 Commits

Author SHA1 Message Date
Allan Odgaard
42cd2f93df Make fs::tree_t member data private 2013-03-20 11:30:41 +01:00
Allan Odgaard
3ceefce2e4 Improve renaming files with hidden extension
We now clear the “hidden extension” flag if the user manually adds it.

We also ensure the hidden extension is not ignored by comparing base name with display name. The flag is ignored under certain circumstances.

Comparing base name with display name alone may give a false positive for localized file names.
2013-03-20 11:30:41 +01:00
Allan Odgaard
149d335335 Setup exception handler around editor_t::perform
The implementation of kPaste seems to generate an exception for some users, but I don’t know exactly why, so this should provide some better diagnostics info.
2013-03-20 11:30:41 +01:00
Allan Odgaard
2c85ef9ac2 Move crash reporter info to utility.h 2013-03-20 11:30:40 +01:00
Allan Odgaard
e1e0e5a8a5 Re-use download window if already visible
This is useful if a new update arrives after TextMate has downloaded the previous update but before the user relaunched TextMate.

Fixes #909.
2013-03-19 16:24:56 +01:00
Allan Odgaard
74f22623e9 Don’t disable NSQuitAlwaysKeepsWindows
This was disabled in an attempt of avoiding the “do you want to open saved documents from last session?” which appear after a crash.

It doesn’t seem to have any effect though, so just noise in the code.
2013-03-19 15:51:08 +01:00
Allan Odgaard
769831f629 Use Objective-C literals 2013-03-19 15:49:18 +01:00
Allan Odgaard
bd34c84253 Remove support for disabling file browser status updating
This preference was introduced as a workaround for poor performance when displaying large folders, this however should no longer be an issue.
2013-03-19 15:02:32 +01:00
Allan Odgaard
d68e6a0499 Dragging last tab from window w/o file browser will close window
Closes #904.
2013-03-19 14:56:23 +01:00
Allan Odgaard
281bccd969 Remove outdated TODO 2013-03-19 14:56:23 +01:00
Allan Odgaard
957d6d018d Don’t treat directories as executables
Related to issue #907.
2013-03-19 14:56:22 +01:00
Allan Odgaard
beb5348e32 Don’t abort when failing to run subcommand
Fixes #907.
2013-03-19 14:56:22 +01:00
Allan Odgaard
b3c9276f9c Find dsym archive using new naming convention
We gracefully fallback on the old naming convention.
2013-03-19 14:56:22 +01:00
Allan Odgaard
dad6c4e629 Checkin release notes v2.0-alpha.9399 2013-03-18 14:38:32 +01:00
Allan Odgaard
21bf41b0c6 fixup! No longer support deleted items in bundle’s info.plist
We still need to cache the ‘deleted’ key since delta items use this to indicate keys deleted in the local version.
2013-03-18 14:34:08 +01:00
Allan Odgaard
916725b0d2 Use constant for version of property cache format 2013-03-18 14:34:08 +01:00
Allan Odgaard
b96a4975e6 Use array for cached settings names
We previously used a dictionary so that initializing a bundle item object wouldn’t need to know the difference between a full property list and a cached subset. Technically though the previous code had an implicit assertion on the bundle item not being able to rely on the settings values being useful, which is now gone.

The main advantage though is a smaller and more correct cache format.
2013-03-18 14:34:07 +01:00
Allan Odgaard
12e5693361 Delete cached bundle items when changed on disk
Effectively it doesn’t change much as cached items are fetched with a file date, but in theory it should now be possible to omit that date (if we can trust that fs-events has always notified us about disk changes).
2013-03-18 14:34:07 +01:00
Allan Odgaard
f4f0e073d3 Use ‘alpha’ prefix instead of ‘r’ 2013-03-17 17:08:54 +01:00
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