Commit Graph

347 Commits

Author SHA1 Message Date
Allan Odgaard
24bd3eee1d Let ProjectLayoutView setup height of file browser header 2014-09-29 13:03:45 +02:00
Allan Odgaard
b9ed2ac8ee Let ProjectLayoutView know about the file browser header view 2014-09-29 13:02:15 +02:00
Allan Odgaard
89d2450c88 Reload tabs before changing selected tab index
This worked previously because selected tab was stored using an index and we were only changing it (before reload) when closing tabs, so the new index would be valid both before and after reload.

With the new OakTabBarView the index of selected tab is instantly converted into a reference to a tab item.
2014-09-26 23:10:24 +02:00
Allan Odgaard
1f06ac9ff4 Add identifier to OakTabBarViewDataSource 2014-09-25 19:33:16 +02:00
Allan Odgaard
ee3f90366d Remember Filter Through Command output choice in user defaults 2014-09-15 17:08:22 +02:00
Allan Odgaard
7920c930c3 Use Objective-C boxing instead of stringWithUTF8String: 2014-09-13 17:09:22 +02:00
Allan Odgaard
b4956ac4fa Make ‘untitledSavePath’ a public (readonly) property 2014-09-06 14:12:31 +02:00
Allan Odgaard
542158c9f0 Inherit project folder when moving document to new window
This only happens if the document being moved is a child of the project folder.
2014-08-27 12:48:40 +02:00
Allan Odgaard
87f2c07fbc With no file browser or project folder we try document’s folder
This is for the “untitled save path” which is normally used for new untitled files, so we wouldn’t actually have a folder, however, the property is also used as a fallback for a “project folder” when that property is unset (which it generally shouldn’t be).
2014-08-22 15:54:30 +02:00
Allan Odgaard
881b83cb50 Setup project folder after saving single untitled document 2014-08-22 15:38:21 +02:00
Allan Odgaard
920777e2d6 Skip setting (complex) window title when we have no document name
Incase there is no window title settings key then we will set the window title to nil, which throws an exception.
2014-08-18 23:30:20 +02:00
Allan Odgaard
91f138c1ae Do not show non-existing locations as having been searched 2014-08-18 18:12:21 +02:00
Allan Odgaard
ffa628f328 Opening folder after session restore would not see it as open
When opening a folder we test against the ‘projectPath’ property (on already open window controllers), but this is not setup until we have an open document, and documents are opened using a background queue, so code running in the same event loop cycle as the session restore, will not get the proper value for this property.

The problem this fixes is: open /path/to/foo and quit TextMate. Now drag /path/to/foo to TextMate’s app icon. TextMate would first restore session (which includes /path/to/foo) and then open /path/to/foo (not seeing the restored folder as being /path/to/foo due to the uninitialized ‘projectPath’ property).
2014-08-15 22:37:38 +02:00
Allan Odgaard
d39ae2a7df Our grow calculation would fail to grow when given a size of one 2014-08-14 20:37:38 +02:00
Allan Odgaard
e3ca295150 Set ‘attr.test.rspec’ for projects with an ‘.rspec’ folder
This scope can be used for the Re-Run mentioned in rspec/rspec-tmbundle#90.
2014-08-08 19:42:30 +02:00
Jeremy Whitlock
f3b6c07bfb Make ⌘F default to 'Selection' for multi-line selection
Previously using ⌘F with a multiline selection would automatically set the “in”
pop-up to “Document”. This is no longer the case, but can be brought back by
running: `defaults write alwaysFindInDocument -bool YES`
2014-07-27 22:55:39 -06:00
Ronald Wampler
2dbd0d601f OakTabBarView datasource now sends the unabbreviated path 2014-06-28 17:42:22 +02:00
Allan Odgaard
b45ad48c00 Add attr.project.vagrant and attr.project.jekyll scopes
The latter is added when we detect a ‘_config.yml’ file in the project. This might cause false positives, but I am not aware of a better way to detect jekyll projects.
2014-05-17 13:21:53 +07:00
Allan Odgaard
49f746e795 Update saved per-window project state when terminating TextMate 2014-05-17 13:21:53 +07:00
Allan Odgaard
42888110fb Add ‘saveOnBlur’ as a .tm_properties option
This makes it easier to enable auto-saving when TextMate loses focus and unlike using a command for this, files that cannot be saved will be silently skipped (as the user is leaving TextMate, so we should not throw up dialogs).
2014-05-16 22:11:28 +07:00
Allan Odgaard
8919ad3461 Remove duplicate code 2014-05-16 22:11:28 +07:00
Ronald Wampler
3ed4722a80 Remove duplication of find_tags enumeration 2014-04-30 12:09:46 +07:00
Allan Odgaard
978ec97ecf Revert "Do not abort application shutdown when we need to save documents"
This reverts commit 73f82c6c5c.

Conflicts:
	Frameworks/DocumentWindow/src/DocumentController.mm
2014-04-29 06:59:39 +07:00
Allan Odgaard
7fb02603b5 Revert "Disable threaded saving as a workaround for stall during quit"
This reverts commit 0b41947412.
2014-04-29 06:59:39 +07:00
Allan Odgaard
0b41947412 Disable threaded saving as a workaround for stall during quit
The problem is that during quit the OS will run a local event loop until we reply to the terminate event. In this local event loop we cannot use performSelector:withObject:afterDelay: but that is required to not block the main dispatch queue.
2014-04-28 21:45:59 +07:00
Allan Odgaard
17b5928d76 Remove backup files for documents with a path during quit
Previously if we selected “Don’t Save” the discarded changes would still be there after relaunch.
2014-04-28 18:23:51 +07:00
Allan Odgaard
b8c1085b9e Let NSURL extract the host from REST_API
The custom code in network::can_reach_host only dealt with the scheme, not port number or user/password.
2014-04-28 18:23:50 +07:00
Allan Odgaard
397fdb52d4 Make REST_API a global define and make it a C string 2014-04-28 18:23:50 +07:00
Allan Odgaard
7c31761e21 Use NSWindow’s stringWithSavedFrame instead of window.frame
This includes the screen dimension so that restoring the frame on a different screen can scale the window accordingly.
2014-04-25 16:55:31 +07:00
Allan Odgaard
fcae942927 Fix comparison of document path with candidate name
This check is so that we always include the current document, even if the exclude/binary globs are setup to exclude it.
2014-04-18 06:39:28 +07:00
Allan Odgaard
7c6594012e Use initializer list to create std::set (C++11) 2014-04-18 06:39:28 +07:00
Allan Odgaard
39b94e6ac3 Harmonize whitespace and add trailing newline 2014-04-14 14:26:52 +07:00
Allan Odgaard
5e96775fa3 Break out of current block before continuing document saving 2014-04-12 20:33:30 +07:00
Allan Odgaard
09d9cf9bd2 fixup! Add setting to disable tab re-ordering 2014-04-11 10:57:10 +07:00
Allan Odgaard
b06474fbac Introduce ‘hideStatusBar’ user defaults key 2014-04-10 17:46:31 +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
b0864281ed Add “New Document” as output option for Filter Through Command 2014-04-08 15:43:19 +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
575c31b66f Fix error message for command requirements with no variable 2014-04-05 14:13:39 +07:00
Ronald Wampler
960b41297b Export TM_SCM_NAME and TM_SCM_BRANCH
This will be used by OakCommitWindow.

Also removed extraneous whitespaces.
2014-04-03 15:44:39 +07:00
Allan Odgaard
04cd55303a Ensure we have a document in tab drop action method
Some crash reports indicate that we do not have a document, although I can’t think of why such situation would arise.
2014-03-31 08:27:18 +07:00
Allan Odgaard
1377e34bb5 Fix deadlock related to aborting command with HTML output
This would happen for a command that is set to re-use previous output window (when busy). We would kill the running command and wait (in the main dispatch queue) for it to stop, but since the runner is (now) using GCD as well, and updating the “did exit” status in the main queue, we would wait forever.
2014-03-31 08:27:17 +07:00
Allan Odgaard
d985a83845 Use runner_t::wait_for_command instead of runner_t::wait(true)
The latter API has been removed.
2014-03-29 09:57:09 +07:00
Allan Odgaard
5f69ef31c7 Don’t use NS prefix for custom functions 2014-03-28 19:31:14 +07:00
Allan Odgaard
c758c9296f Remove unnecessary check in menu item validation
Since the HTML output window responds to toggleHTMLOutput: we would never be called when that window is key.
2014-03-28 10:19:05 +07:00
Allan Odgaard
080dd3da18 Add showWindow:/close methods for HTML output window controller
These must be used for proper management of the “retainedSelf” property.
2014-03-28 10:19:05 +07:00
Allan Odgaard
6535546c87 Use view’s undo manager rather than the window’s 2014-03-26 15:30:36 +07:00