Commit Graph

1168 Commits

Author SHA1 Message Date
Allan Odgaard
cbd6d8eebe Checkin release notes v2.0-alpha.9377 2013-02-11 15:18:35 +01:00
Allan Odgaard
4a812117e7 Fix memory leak 2013-02-11 15:17:30 +01:00
Allan Odgaard
7c1c253c86 Make “Go to Favorites” a toggle 2013-02-11 14:21:24 +01:00
Allan Odgaard
a9e59f5308 Set spelling language for current folder when changed via UI
Previously we would set it for the current file (via path) and the current scope plus parent scopes.

The latter wasn’t useful, as the file type is not indicative of the language used, and as scoped settings presently have higher priority than path-based settings, it could lead to the wrong language being used, even when language was explicitly set for a folder.

Now, when changing language via Edit → Spelling menu, we set the language globally (so default for all new documents without more specific settings), all files in the current document’s folder, and the document itself.
2013-02-11 14:21:23 +01:00
Allan Odgaard
bdadf0f17f Let text view reset cut/copy menu item titles
This is necessary since opening the Edit menu with focus in file browser may update the titles to reflect files that would be cut or copied.
2013-02-11 14:21:23 +01:00
Allan Odgaard
059a8a0b75 Improve Quick Look menu item title
This now also shows what it’ll display and switches to “Close Quick Look” when the panel is already showing.
2013-02-11 14:21:23 +01:00
Allan Odgaard
2c996b6b7a Improve file browser menu titles
We now write what the actions will apply to. This isn’t done for all actions, which is somewhat consistent with Finder, though I don’t know why Finder doesn’t include such description for all items, perhaps it’s seen as redundant to state for every action (and just adds noise), so only items where user could be “confused” should explicitly state what they work on.
2013-02-11 14:21:23 +01:00
Allan Odgaard
7b017d695d Rework file browser action menu 2013-02-11 14:21:23 +01:00
Allan Odgaard
e71fd192c5 Let SIGUSR1 relaunch TextMate
This is mainly to allow a way to test the relaunch code, as it is otherwise only used for s/w updating and installing plug-ins.
2013-02-11 14:21:22 +01:00
Allan Odgaard
38dffa9dd1 Remove legacy code 2013-02-11 14:21:22 +01:00
Allan Odgaard
2f146e235f Discontinue support for OAK_ACTIVATE variable
This isn’t used by anything current.
2013-02-11 14:21:22 +01:00
Allan Odgaard
ad03811df0 Ensure session restore when relaunching
The user can manually disable session restore, which is undesired when relaunching due to a software update or installing a plug-in, so we now override the user’s choice for the new instance launched.
2013-02-11 14:21:22 +01:00
Allan Odgaard
af37d2e30a Skip group cells when selecting item after delete (file browser)
Presently this is only relevant for the SCM Status view, as no other data source use group cells.
2013-02-11 14:21:22 +01:00
Allan Odgaard
df8465e607 Align close button (×) with file labels
Closes #391.
2013-02-11 14:21:21 +01:00
Allan Odgaard
099fbdf042 Accept NULL_STR in path::info 2013-02-11 14:21:21 +01:00
Allan Odgaard
f5541b2a1c Don’t try to toggle caret with no layout 2013-02-11 14:21:21 +01:00
Allan Odgaard
8fb95309c1 Reset undo/redo menu item titles
The undo manager will change the titles (e.g. “Undo Rename”) when it’s first responder, so we need to change them back, when the text view is first responder.
2013-02-11 14:21:21 +01:00
Allan Odgaard
2acecd66f3 Show icon in Go to Tab sub menu 2013-02-11 14:21:21 +01:00
Allan Odgaard
129784816c Don’t show SCM badges for untracked items
All of these will always have the same badge, so there’s no reason to show it (and it covers the alias badge, so there is some usability benefits beyond just the visuals).
2013-02-11 14:21:21 +01:00
Allan Odgaard
507dac1908 Let FSItem use OakFileIconImage. 2013-02-11 14:21:20 +01:00
Allan Odgaard
8987a7528f Use generic file/folder icon when OakFileIconImage.path == nil 2013-02-11 14:21:20 +01:00
Allan Odgaard
b8ddc41bd0 Don’t show tool tips with only whitespace 2013-02-11 14:21:20 +01:00
Allan Odgaard
e047d458fd Fix crash in bundle editor
I have added a check to ensure we have the bundle item content (in addition to the bundle item) which fixes #774 although it is unclear to me how the bundle editor would end up in a state where it has a bundle item but no content for that item. There is a window in the setBundleItem: method where the bundle item content hasn’t yet been setup, but commitEditing is not called during that window.
2013-02-11 14:21:20 +01:00
Allan Odgaard
f980573d8b Ensure document is open during save
Saving is done asynchronously so the document might be closed while being saved. This in itself is not an issue, but the “post save” function will assume it has an open document for “marking as pristine” and executing potential “document did-save” callbacks on.
2013-02-11 14:21:20 +01:00
Allan Odgaard
6cd7d86215 Script to create default bundles would always exit successfully
We shouldn’t do anything after the essential line of the script, as we want that line’s status code to be the script’s exit status.
2013-02-11 14:21:19 +01:00
Michael Sheets
7fa0e34a5e Restyle and add graphics to file browser action bar 2013-02-09 16:34:24 +01:00
Allan Odgaard
ae02db9baa WIP: Add action bar to file browser 2013-02-09 16:34:24 +01:00
Michael Sheets
034dd8f06b Shrink height when tabs above document is enabled 2013-02-09 16:34:24 +01:00
Michael Sheets
a9d80f5a0d Increase tab bar size one pixel
This is to match the minimum allowed size for the sidebar header when the tabs above document is enabled, also matches the height of the forthcoming tab redesign.
2013-02-09 16:34:24 +01:00
Michael Sheets
2200df74fd Simplify constraints and set a height for file browser header 2013-02-09 16:34:23 +01:00
Allan Odgaard
43e15b3792 Let file browser header inherit from OakGradientView 2013-02-09 16:34:23 +01:00
Allan Odgaard
9c994af1e0 Tweak OakGradientView
- Accept two NSGradient objects instead of four colors.
- Call designated initializer on super instead of self since subclass is likely calling us from its designated initializer
- Make class public
2013-02-09 16:34:23 +01:00
Michael Sheets
9a26e0df5e Move file browser divider into parent view 2013-02-09 16:34:11 +01:00
Allan Odgaard
ddc85708f8 Allow disabling auto-indent for snippets
Snippets are normally inserted with indent matching that of the caret. This isn’t always desired, which is why TM 1.x allowed this feature to be disabled. This is now also supported for 2.0.

Closes #387.
2013-02-08 13:55:10 +01:00
Allan Odgaard
44b0da80b1 Look at entire line when auto-pairing characters
When inserting paired characters where the pair consists of the same two characters, we look if the line is already balanced, and if so, insert a pair, and if not, only insert a single character. Previously we only looked at what was left of the caret, though TextMate 1.x looked at the full line, which we now also do in 2.0.

Closes #508.
2013-02-08 13:55:10 +01:00
Allan Odgaard
9c42d1ae9f Moving focus to file browser now select first item
This is only when using the special Navigate → Move Focus to File Browser (⌥⌘⇥) command and is mainly because there is no other visual feedback (other than the text view being rendered in its inactive state).

I could see sometimes not wanting a selection in the file browser, this however seems like a general problem (i.e. the solution should likely be to introduce a way to “deselect all”).
2013-02-08 13:55:09 +01:00
Allan Odgaard
deac51c7a1 Expose outlineView property of file browser 2013-02-08 13:55:09 +01:00
Allan Odgaard
a36146235a Support disabling “keep bundles updated”
We still update the sources because the user may manually install bundles, and in this case he should install from a recent bundle index.
2013-02-08 12:01:21 +01:00
Allan Odgaard
8c9adfc198 Move some user defaults key to respective framework
Initially I wanted all keys in a single header file but to avoid circular dependencies then this header would need to be in a framework that doesn’t depend on anything else, and the main benefit was only to have a single place to look for which keys exist, but now that we consistently prefix settings keys with ‘kUserDefaults’ then it’s easy to extract all keys via search.
2013-02-08 12:01:20 +01:00
Allan Odgaard
2e0d93e5f1 A file suffix in file chooser would rank too high 2013-02-08 11:20:36 +01:00
Allan Odgaard
abf13e913a Show notification when posting crash reports (10.8)
This is both to remind the user that crash reports are automatically submitted and to make it easy for them to point us to a specific crash, as notification center will now work as a list of recent crashes; click on one of them to see the online version.
2013-02-08 11:20:36 +01:00
Allan Odgaard
609c332e0a Parse headers received in post_to_server 2013-02-08 11:20:35 +01:00
Allan Odgaard
b139ac5097 Change push_back → emplace_back (C++11)
This is mainly motivated by readability, so I only did a few select replacements.
2013-02-08 11:20:35 +01:00
Allan Odgaard
bcbd055137 Use exp2(x) instead of pow(2, x) 2013-02-08 11:20:35 +01:00
Allan Odgaard
fd60fd25c7 Change strtol → std::stol (C++11)
I initially wanted to do this change globally, but std::stoX will throw an exception if it fails to parse something and we use strtoX a few places where parsing nothing (and getting back zero) is fine.
2013-02-08 11:20:35 +01:00
Allan Odgaard
ebc4fa26af Use regexp::match_t::operator[]
Also bypass NSString/c_str() by using std::stod().
2013-02-08 11:20:35 +01:00
Allan Odgaard
9eb4044fdb Switch to simpler regexp::search 2013-02-08 11:20:35 +01:00
Allan Odgaard
8b8e02d6da Add minimal tests for regex::search 2013-02-08 11:20:35 +01:00
Allan Odgaard
a8f1c9ef06 Add convenience API for searching std::string 2013-02-08 11:20:34 +01:00
Allan Odgaard
0ee796d7a7 Implement regexp::match_t::operator[]
This can be used to access the n’th capture (as a std::string). If there is no capture, NULL_STR is returned.
2013-02-08 11:20:34 +01:00