Commit Graph

1206 Commits

Author SHA1 Message Date
Allan Odgaard
deffe08d1b Fix new selected item after delete 2013-02-15 15:27:54 +01:00
Allan Odgaard
c456d7e035 Handle linking to directories in HTML output
We now check for an ‘index.html’ when a file:-link points to a directory. If no such file exist then we show the “Not Found” error page.

This is to work with offline docs that doesn’t include the ‘index.html’ in the URL.
2013-02-15 15:27:54 +01:00
Allan Odgaard
58feb5dd43 Remove “crash guard”
This should no longer be possible now that the callback won’t be called after the scm info has been destroyed.

This reverts fce82f0759.
2013-02-15 15:27:54 +01:00
Allan Odgaard
d0e0835e82 Better hiding of scm::ng::info_t implementation 2013-02-15 15:27:54 +01:00
Allan Odgaard
e7ed62c305 Don’t unnecessarily retain scm::ng::info_ptr
This ensures that when an scm::ng::info_ptr object has been disposed by the user, the associated callback will not be called (as no-one else will keep it retained).
2013-02-15 15:27:53 +01:00
Michael Sheets
ecd666f24a Improve constraint widths for status bar.
- Set compression priorities to collapse fields in a desirable order.
- Increase default width of selection string to fit 8888:88
- Set grammar popup to the width of the active grammar and give is sensible minimum/maximum widths.
- Set a maximum width for the tab size menu.
2013-02-15 07:09:48 -06:00
Allan Odgaard
b66912d8e8 Fix exception
This would happen if root url in file browser was not a file url and the user selected “Go to Folder…”.
2013-02-14 11:31:22 +01:00
Allan Odgaard
60a4b9520a Make internal functions private again 2013-02-14 11:31:21 +01:00
Allan Odgaard
967f08c9c0 Limit file browser header updating
This mainly relates to the folder pop-up. By delaying creation of this menu till the user actually opens it, we avoid/delay having to create potentially expensive icons (icons are “expensive” since creating one may cause TextMate to hit the disk).
2013-02-14 11:31:21 +01:00
Allan Odgaard
ad6a82bb1d Don’t explicitly update file browser header view
This is unnecessary as long as we always go via setUrl: or setHistoryIndex:
2013-02-14 11:31:21 +01:00
Allan Odgaard
3669e671c7 Strip “offset” from selection string in status bar 2013-02-14 11:31:21 +01:00
Allan Odgaard
83505a47e2 Change status bar’s “caret” property
We now use a selection string so status bar doesn’t need to know about what it actually contains.
2013-02-14 11:31:21 +01:00
Allan Odgaard
94f0c803f7 Limit status bar redraw
The NSPopUpButton itself will not bypass redisplay even if it’s title is set to the current title.
2013-02-14 11:31:20 +01:00
Allan Odgaard
785182c1b2 Enable bottom border for bundle editor window 2013-02-14 11:31:20 +01:00
Allan Odgaard
43fa57ae22 Don’t draw status bar background on window border 2013-02-14 11:31:20 +01:00
Allan Odgaard
e96dc916ef Remove commented code 2013-02-14 11:31:20 +01:00
Allan Odgaard
9338109452 Fix NSTimer related crash
The timer might be the only thing keeping us retained, so we can’t release it until the very end of the method.
2013-02-14 11:31:20 +01:00
Allan Odgaard
b37b56075a Call super in viewWillMoveToWindow: 2013-02-14 11:31:20 +01:00
Michael Sheets
05af681717 Truncate the selection string when it grows too long. 2013-02-14 11:27:53 +01:00
Michael Sheets
75c7457ee9 Use solid colors for divider line.
This is required now that they are set as opaque.
2013-02-14 02:52:08 -06:00
Allan Odgaard
8f3e99bc79 Gutter height now accounts for horizontal scrollbar
Previously the gutter and the text view were set to have the same height (via constraints). Though when the horizontal scrollbar is visible then the gutter should technically be made a little taller to account for the extra bottom margin. Not adding this space was causing problems.

Fixes #773.
2013-02-13 10:51:07 +01:00
Allan Odgaard
3bc3db00aa ARC: Update OakTextView framework 2013-02-12 23:06:48 +01:00
Allan Odgaard
007dd2db00 Use ‘refuses first responder’ property
We still need the subclass for rendering the control as active, but the less we override the better.
2013-02-12 22:01:02 +01:00
Allan Odgaard
ba7b1b1be7 Fix coding style 2013-02-12 21:55:56 +01:00
Michael Sheets
2bd089ffe5 Match HTML divider color with the status bar divider 2013-02-12 21:55:56 +01:00
Allan Odgaard
f886b0cb13 Update text view status bar to use system controls 2013-02-12 21:55:56 +01:00
Allan Odgaard
402e1f79b1 Use one bundle menu delegate for all menus
This avoids the problem of keeping the delegate retained while the menu is up (the menu item exists).
2013-02-12 20:11:50 +01:00
Allan Odgaard
8ef92c29f9 Set bottom border for HTML window 2013-02-12 15:49:53 +01:00
Allan Odgaard
c46070f9ff Omit background fill if we have a border 2013-02-12 15:49:52 +01:00
Allan Odgaard
83d0df4b2c Don’t set HTML output views as opaque 2013-02-12 15:49:52 +01:00
Michael Sheets
9e56b73797 Restyle html view status bar to match others 2013-02-12 15:49:34 +01:00
Allan Odgaard
2588d57421 Change where we invalidate cursor rects
Maybe closes #783.
2013-02-12 11:09:24 +01:00
Allan Odgaard
50a7c17dbd Use initializer list with path::join 2013-02-12 11:09:24 +01:00
Allan Odgaard
f05c76a882 Implement path::join for initializer lists
This allows passing multiple path components to path::join
2013-02-12 11:09:24 +01:00
Allan Odgaard
6acafbe190 Ensure we have valid SCM status 2013-02-12 11:09:24 +01:00
Allan Odgaard
c6f228fbdf Redirect stderr when LOG_PATH is set
You need to set this variable for launchd, so that it is inherited by TextMate. Unfortunately launchd only reads /etc/launchd.conf so unless you want to set this variable globally then you need to run something like the following before starting TextMate:

    launchctl setenv LOG_PATH "$HOME/Library/Logs"
2013-02-12 11:04:55 +01:00
Allan Odgaard
26fe4a95e9 Add Edit → Select → None (⇧⌘A)
This can be used to deselect all in the file browser.

Closes #779.
2013-02-11 22:05:44 +01:00
Allan Odgaard
0a0d9a3d9b Assign key equivalents to Go → Back/Forward
We use ⌘[ and ⌘] which is also used for Text → Shift Left/Right so we only set these keys for when the main text view is not active.

The main advantage is that you can now use these keys to move back and forth in history of HTML views (it also works in file browser, but due to a custom keyDown: overload, it also worked prior to this commit).
2013-02-11 21:58:29 +01:00
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