Commit Graph

281 Commits

Author SHA1 Message Date
Allan Odgaard
e3e1e5da25 Add preliminary bundle install support. v2.0-alpha.9291 2012-08-27 20:19:44 +02:00
Allan Odgaard
09573d7e2a Checkin release notes 2012-08-27 20:19:05 +02:00
Allan Odgaard
a58f424a14 Fix issue with recording macros
The recordSelector: might receive a ‘nil’ argument. Previously this was handled gracefully by using ‘dictionaryWithObjectsAndKeys:’ but not so when using the new Objective-C literal array syntax. So reverting to the old syntax.

This closes issue #38.
2012-08-27 20:19:05 +02:00
Allan Odgaard
dae55ddf95 Fix crash from file chooser
When a project was outside user’s home folder with a symbolic link to somewhere below the user’s home folder, we would calculate a wrong prefix length when user searched using full path (i.e. entering ‘/’) as the display string had the link tilde-abbreviated though the match was against the full absolute path.
2012-08-27 19:29:50 +02:00
Allan Odgaard
d956e8d7c0 Rewrote OakFileIconImage
There are mainly two reasons for this:

  1. Unexplained crashes (see issue #73).
  2. We were using lockFocus when getting the symbolic link arrow (from IconRef, as there seems to be no “modern” API to get this arrow) which caused a rasterization of the image.

The new implementation is much simpler, as all work happens in the image representation which does not have any (weak) pointer to its parent image.
2012-08-27 19:29:50 +02:00
Allan Odgaard
4cf204d0a0 Handle tilde in mate’s install path
Older versions of TextMate stored the install path with the tilde so we always need to (potentially) expand that when fetching the install location.

The lack of doing this was likely the cause of issue #302.
2012-08-27 19:29:50 +02:00
Allan Odgaard
dc807119a4 Add preliminary CSS styles for key equivalents 2012-08-27 19:29:50 +02:00
Allan Odgaard
2ef6253f25 Fix release notes to work with key equivalent script 2012-08-27 19:29:50 +02:00
Allan Odgaard
7e186a8283 Documentation: Wrap keys in a keyEquivalent class 2012-08-27 19:29:50 +02:00
Allan Odgaard
15bfe9fc9c Let build rules depend on their tool 2012-08-27 01:03:17 +02:00
Jacob Bandes-Storch
6aeb27f02f Use Cocoa instead of Carbon for popup menus 2012-08-27 01:03:16 +02:00
Jacob Bandes-Storch
64bb4b46cf Rename bundles::menu.cc to menu.mm 2012-08-27 01:03:16 +02:00
Jacob Bandes-Storch
9057d22e06 fixup! ⌘+click a file browser icon to show in Finder
Only attempt to show the item in Finder if it is a file
2012-08-27 01:03:16 +02:00
Jacob Bandes-Storch
40db25c712 Title case tab context menu items 2012-08-27 01:03:16 +02:00
Jacob Bandes-Storch
1aec57762c Bring back the dock menu 2012-08-27 01:03:16 +02:00
Allan Odgaard
1482c87f0c Remove executable flag from PDF files 2012-08-26 20:37:32 +02:00
Allan Odgaard
9c89911576 Checkin release notes 2012-08-26 20:32:22 +02:00
Allan Odgaard
fc13d2021d Tweak gutter colors
Use the text foreground color for icons when the theme doesn’t provide a color and introduce ‘gutterSelectionIcons’ for the color of selected icons (defaults to selected foreground color).

Also changed the gutter selection border color to match the divider color (when it isn’t specified by the theme).
2012-08-26 18:52:25 +02:00
Dennis Vennink
5a80fcea95 Replace PNGs with resizable PDF template images 2012-08-26 18:26:34 +02:00
Dennis Vennink
6e02f55fff Add gutterSelectionBorder and gutterIcons theme keys 2012-08-26 18:26:34 +02:00
Lukasz Czekaj
19457ad2e8 Fixed negative height bug in htmlOutputView
After dragging the HTML Output window down below the bottom of the main
window it cannot be dragged back and negative height of HTML Output is
saved to file.
2012-08-26 17:48:47 +02:00
Allan Odgaard
c7678e9f67 If file is not on disk, use tmProperties for encoding
This happens e.g. if we do ‘ls|mate’ — here we do have content which got a charset and newline mode assigned during “load”, but from the user’s POV he is saving a new file (if he saves the buffer) so should get his configured encoding.
2012-08-26 17:33:26 +02:00
Allan Odgaard
6f45ee4a9c Use encoding::type for open related API 2012-08-26 17:06:38 +02:00
Allan Odgaard
d1de4a8854 Use encoding::type for save related API
There is also a new document_t::encoding_for_save_as_path which returns the encoding that would be used for the document, if saved at the given path. If the document was loaded from disk, it will return the encoding used during load, otherwise it will check tmProperties for which encoding should be used for the path provided. Save dialog for untitled documents will be pre-populated with the result of the above function.
2012-08-26 16:13:20 +02:00
Allan Odgaard
b0250f94b4 Introduce encoding::type
This wraps charset, byte order mark, and newline character(s).
2012-08-26 14:44:35 +02:00
Allan Odgaard
b0c2b69a3d Don’t consult tmProperties in file::save
The main reason to avoid this is to give a more predictable API. Encoding should be read (from tmProperties) prior to calling file::save and then given as argument.
2012-08-26 14:04:26 +02:00
Allan Odgaard
5e3d973c9b Use global tmProperties for file bindings
This includes a minor improvement to handling of virtual paths (i.e. files opened via rmate).

It also slightly changes the logic related to finding file type. It now prefers an explicit user binding (only when there is a path) falling back on content match, then path match via grammar, then user binding for untitled files, and finally user binding for unrecognized files.
2012-08-26 12:18:09 +02:00
Allan Odgaard
15ba1374ca Add settings_t saving tests 2012-08-26 01:26:16 +02:00
Allan Odgaard
92b3c9e2c5 Remove hardcoded paths from settings_t
Mainly this is because when we run tests, we do not want global or default settings from TextMate, so now TextMate.app explicitly sets the path to the default and global settings (unlike when running tests).
2012-08-26 01:26:16 +02:00
Adam Strzelecki
9f72b75827 Use gutter divider color for selection rectangle 2012-08-25 23:48:41 +02:00
Allan Odgaard
7ecc0a8731 Add new settings to project page
This includes the previously hidden initial file browser location, whether or not to permanently show the tab bar, placement of file browser and command output.
2012-08-25 23:26:11 +02:00
Allan Odgaard
0ca407b72c Move user defaults keys to Keys.{mm,h} 2012-08-25 23:14:15 +02:00
Allan Odgaard
b55a0cefff Fix typo 2012-08-25 21:09:37 +02:00
Allan Odgaard
846357c52f Code aesthetics 2012-08-25 21:04:22 +02:00
Allan Odgaard
8e1aa09d17 Colors are now transparent against background
Previously if the color for X (where X is e.g. foreground or invisibles) had an alpha value other than 1.0 (fully opaque) it would be blended against the less specifically scoped color for X rather than the background.

There was no real logic behind the previous design other than to treat all color blending the same and it would cause a problem for 1.x themes using transparency for selection or invisible characters.

Closes issue #285.
2012-08-25 20:56:36 +02:00
Allan Odgaard
d259c07bd5 Change default font size to 12 2012-08-25 20:29:22 +02:00
Allan Odgaard
360f7a33bd Add context menu to tab bar
This can be used to close current, other, and tabs on the right. Additionally to create a new tab (to the right of the tab showing the menu) or open the tab in a new window.

Closes issue #191.
2012-08-25 17:54:24 +02:00
Allan Odgaard
19f1909ff3 Add menuForTabBarView: to delegate protocol 2012-08-25 17:42:13 +02:00
Allan Odgaard
81eda77ee2 Add tagForLayerContainingPoint:
This is meant for subclasses which need to translate an NSPoint to a layer and cannot rely on the normal handling of this in the superclass.
2012-08-25 17:41:09 +02:00
Allan Odgaard
1c9640f00b fixup! File Browser will now remember it's width
Since the framework doesn’t depend on itself, it cannot include its exported headers.

This closes issue #282.
2012-08-25 16:10:27 +02:00
Allan Odgaard
7d93ed0028 Move rightMouseDown: to subclass
The problem is that when we implement rightMouseDown: then we won’t receive menuForEvent:, but some OakControl subclasses (like OakTabBarView) may want to show a context menu.
2012-08-25 16:04:02 +02:00
Allan Odgaard
8d13174001 Gracefully handle ‘svn info’ failure
This command would e.g. fail if the repository format is of a newer date (in which case the code expecting a result would do “out of bounds” access).

Rather than split on newline, split third element on colon, and then take second element of that result, we now parse the output into a map and look for the ‘URL’ key.
2012-08-25 15:15:00 +02:00
Allan Odgaard
895dd9a1bd Use escape sequence for line endings
This is to make the tmProperties file more transparent (should the user wish to manually inspect it).

As the variable part in the settings is treated as a format string, we can use ‘\r’ and ‘\n’ for CR and LF respectively.
2012-08-25 14:54:47 +02:00
Allan Odgaard
00ed4cab68 Improve flexibility in settings API
If we only provide key and value, we set the setting globally.

If we provide an additional file type, we set it for that file type and parent file types (i.e. “text” is parent of “text.plain”) plus globally. An exception is when we give an “attr” scope as file type (then we do not cascade upward).

If we provide a path / glob, we set it for that path / glob and, as file type we can provide NULL_STR to limit it to just that path / glob, the empty string ("") to also set it globally, or a file type (which is treated as above).
2012-08-25 14:54:47 +02:00
Allan Odgaard
629630c648 Proper escaping in section headers (tmProperties) 2012-08-25 14:54:46 +02:00
Allan Odgaard
cbbebd879a Also save spelling language in settings
Missed this one in a previous commit.
2012-08-25 14:54:46 +02:00
Allan Odgaard
23576923fd fixup! Extend gutter theming to selection foreground
Previous solution didn’t handle soft wrapped lines.

This solution also scales better, as we no longer need to break up ranges and create an entry per selected line.
2012-08-25 14:54:46 +02:00
Jeremy Whitlock
ed534778a7 New svn executable based Subversion scm driver
* Rewrote the Subversion SCM driver to use the svn executable
* Badges work just like Mercurial
* TM_SCM_BRANCH is set to the full repository URL for the working copy

See issue #273.
2012-08-25 02:06:22 +02:00
Allan Odgaard
91993822a1 Disable soft tabs for the project
Incase the user has it “globally” enabled.
2012-08-25 02:06:22 +02:00
Allan Odgaard
c0de81d943 Label the build.ninja target
This is to prettify the build output (for the cases where build.ninja needs to be regenerated).
2012-08-25 02:06:22 +02:00