Commit Graph

2532 Commits

Author SHA1 Message Date
Allan Odgaard
5e96775fa3 Break out of current block before continuing document saving v2.0-alpha.9537 2014-04-12 20:33:30 +07:00
Allan Odgaard
86a5538992 Ensure server object is alive when client is destroyed 2014-04-12 20:33:30 +07:00
Allan Odgaard
cb5c6062cd Checkin release notes v2.0-alpha.9533 2014-04-12 14:21:37 +07:00
Allan Odgaard
09ea4b3e46 When document changes (on disk) ensure all selections are valid 2014-04-12 14:13:50 +07:00
Allan Odgaard
7c192f1e02 Let OakTextView handle cancelOperation: as complete:
This is only when caret is at a word, when not on a word, we do not respond to the cancelOperation: method. This way, pressing escape in a window where another responder implements cancel:/cancelOperation: (e.g. commit window) the key will be handled by the other responder (and presumably close the window).
2014-04-12 14:13:50 +07:00
Allan Odgaard
3f55166f15 Assign ⌘. to the commit window’s cancel button
While ⌘. already triggers any cancelOperation:/cancel: method found in the responder chain, making it explicit gives visual feedback when user press the key, and ensures that another control doesn’t get the key (by responding to cancelOperation:/cancel:).
2014-04-12 14:13:50 +07:00
Allan Odgaard
6e619ad14c Do not render full screen windows as inactive
The text view itself will still dim the selection, but document tabs, status, and tool bars no longer change colors.

This seems consistent with how Apple’s controls act and is necessary for the status bar since it draws a transparent gradient over the window background, so only its borders got the dimmed look.
2014-04-12 11:23:07 +07:00
Allan Odgaard
d1bce2ac4f Get rid of OakCreateViewWithColor 2014-04-12 11:23:07 +07:00
Allan Odgaard
2bfd8a8118 Give local function ‘static’ storage 2014-04-12 11:23:07 +07:00
Allan Odgaard
375893fc7f Add a ‘did change content’ notification to document_t
This is only meant for when the document reloads content because the file was changed on disk. Long-term though, I think reloading document because of disk changes should be handled at a higher level.
2014-04-12 11:23:07 +07:00
Allan Odgaard
f445f19287 Add assertion to check if index is within allowed range 2014-04-12 11:23:07 +07:00
Allan Odgaard
1452148a65 Run in default run-loop mode for document_t::sync_open 2014-04-12 11:22:53 +07:00
Allan Odgaard
d549bb7a84 Remove unused include (cf/callback.h) 2014-04-12 11:22:38 +07:00
Allan Odgaard
ec6d0b7e4e fixup! Add assertion about being called in the main dispatch queue 2014-04-11 20:54:13 +07:00
Allan Odgaard
eaa2faa18a Change to project folder when running commands from commit window 2014-04-11 13:12:48 +07:00
Ronald Wampler
196f37729f fixup! Allow user to clear previous commit messages 2014-04-11 13:12:48 +07:00
Ronald Wampler
b942455d8f Implement "--log" option for commit window
This fixes a regression. The previous commit window allowed a "--log" option to be specified that would pre-populate the text view with the given argument.
2014-04-11 13:12:48 +07:00
Allan Odgaard
65e9b45d8a Treat commit window action command names as format strings
Presently the ‘TM_DISPLAYNAME’ is conditionally available, allowing the name to contain the file name which it will work with.

Also fix a potential “out of range” exception. The validateMenuItem: could be called for a cached menu item (e.g. when the system resolves key equivalents) where we had no selection (nor did click any item), so we would access the row at index -1.
2014-04-11 10:57:11 +07:00
Allan Odgaard
445468cbf5 Make list of items to be committed contain exactly 10 rows 2014-04-11 10:57:10 +07:00
Allan Odgaard
09d9cf9bd2 fixup! Add setting to disable tab re-ordering 2014-04-11 10:57:10 +07:00
Allan Odgaard
e379021492 Assert that we are not blocking the main queue 2014-04-11 10:57:09 +07:00
Allan Odgaard
1e419e6d31 Use Onigmo’s own multithread support 2014-04-10 17:46:31 +07:00
Allan Odgaard
d0bb0e7dc2 fixup! Full implementation of ‘labels’ property 2014-04-10 17:46:31 +07:00
Allan Odgaard
62f2debfc8 Store commit window frame in user defaults 2014-04-10 17:46:31 +07:00
Allan Odgaard
b06474fbac Introduce ‘hideStatusBar’ user defaults key 2014-04-10 17:46:31 +07:00
Allan Odgaard
bd74a16d96 Add API to hide status bar 2014-04-10 17:46:31 +07:00
Allan Odgaard
30edbc9118 Disable autoresize mask translation for divider line views 2014-04-10 17:46:30 +07:00
Allan Odgaard
ff94480298 Check that CoreFoundation functions succeed
Several crash reports indicate failure to create a CFString (in ct::line_t’s constructor). As we have an explicit UTF-8 check, I am not sure why it would fail, but at least now TextMate should not crash when it happens.
2014-04-10 17:46:30 +07:00
Allan Odgaard
74572309f1 Allow user to clear previous commit messages 2014-04-10 11:13:28 +07:00
Allan Odgaard
751d2c2924 Let commit window’s title match that of the main window
In practice we could source ‘.tm_properties’ with ‘TM_DISPLAYNAME’ set to “Commit” (and ‘TM_FILENAME/PATH’ unset) to use user’s ‘windowTitle’, though it could result in wrong titles for users who have configured window titles to include parent path components without proper fallback to ‘TM_DISPLAYNAME’.
2014-04-10 11:13:13 +07:00
Allan Odgaard
c7bfb36d25 Use variadic template function instead of varargs macros (C++11) 2014-04-10 11:13:13 +07:00
Allan Odgaard
4307d9eb91 Add ‘onDocumentSave’ HTML output auto refresh option 2014-04-10 11:13:13 +07:00
Allan Odgaard
7d1ca99421 Disable plug-ins for HTML output WebView
Also switch about window’s web preferences to be set via identifier instead of manipulating the standard preferences.
2014-04-09 15:15:36 +07:00
Allan Odgaard
ba87a43c66 Workaround for “did save” commands stalling TextMate
This became an issue after 10d9464.
2014-04-09 15:15:36 +07:00
Allan Odgaard
6d1da8ce97 Use bundle item’s effective name in error and cancel sheets
For example the bundle item “Execute Line / Selection” will (without a selection) show as “Execute Line” in the menu, and now also if the command causes the error sheet to appear or the user press ⌃C / ⌘. to prematurely kill it.
2014-04-09 15:15:36 +07:00
Allan Odgaard
38b91da708 Selecting “Save” during quit would lose untitled documents 2014-04-08 16:33:57 +07:00
Allan Odgaard
73f82c6c5c Do not abort application shutdown when we need to save documents
This was previously necessary because we do threaded saving and relied on our run-loop source to be notified when saving completed, but as application termination (presumably) causes TextMate to run in a special run loop mode, we would not receive this notification.

After switching to dispatch queues there no longer is a problem (at least on OS X 10.9.2).

Closes #1030
2014-04-08 16:33:57 +07:00
Allan Odgaard
aaabfd2e26 Use custom test system for testing the ‘document’ framework 2014-04-08 15:43:21 +07:00
Allan Odgaard
fb80ffd272 Use custom test system for testing the ‘file’ framework 2014-04-08 15:43:20 +07:00
Allan Odgaard
10d94644f7 Switch oak::server_t implementation from pthread → libdispatch
This makes the abstraction redundant and it should be removed. I am doing that as a multi-step process, since the previous implementation was blocking tests from being updated to the new (dispatch queue based) test system.
2014-04-08 15:43:20 +07:00
Allan Odgaard
e974582baa Allow specifying run-loop mode for document_t::sync_open 2014-04-08 15:43:20 +07:00
Allan Odgaard
7bb584c604 Add assertion about being called in the main dispatch queue 2014-04-08 15:43:19 +07:00
Allan Odgaard
b0864281ed Add “New Document” as output option for Filter Through Command 2014-04-08 15:43:19 +07:00
Allan Odgaard
184782a6ee Crash report info no longer eclipse info from higher up the stack 2014-04-08 15:43:18 +07:00
Allan Odgaard
3642ee2750 Save All from find window uses default run-loop mode for saving
When saving and the document needs to execute a command (e.g. callback.document.export) then we can no longer use our special run-loop mode, as command execution is now using queues, and queue dispatching is paused when running in a custom run-loop mode.
2014-04-07 17:29:49 +07:00
Allan Odgaard
6cc0108961 Rename document_t:{open,save} → document_t:sync_{open,save}
This makes it easier to search for code that use these functions.
2014-04-07 17:28:41 +07:00
Allan Odgaard
96de950ed1 Return initializer list instead of using std::make_pair (C++11) 2014-04-06 19:36:09 +07:00
Allan Odgaard
c7a211b2fd Let View → Wrap Column remember the last 5 values used 2014-04-06 19:36:09 +07:00
Allan Odgaard
75dc734a87 When tar fails, it does not remove the output file 2014-04-06 19:36:08 +07:00
Allan Odgaard
30b4d9322d Checkin release notes 2014-04-06 19:36:08 +07:00