Commit Graph

481 Commits

Author SHA1 Message Date
Allan Odgaard
5f24a91d44 Auto-layout: Update OakDocumentView
The gutter will invalidate its intrinsic size when its width changes which will cause the Cocoa layout engine to update the layout, so no more explicit code to deal with adjusting the gutter’s width.

Likewise, the height of the gutter (not the gutter scroll view) has been setup to match the height of the text view (again, not the containing scroll view). This avoids observing the text view frame and manually updating gutter height to match it.
2012-09-14 17:14:56 +02:00
Allan Odgaard
6bb23c1765 Gracefully handle missing gutter view delegate 2012-09-14 17:14:56 +02:00
Allan Odgaard
339c582f8c Auto-layout: Update incremental search (xib) 2012-09-14 17:14:55 +02:00
Allan Odgaard
2b9c27263d Auto-layout: Update file browser and HTML output 2012-09-14 17:14:55 +02:00
Allan Odgaard
4d95db8f66 Auto-layout: Implement intrinsicContentSize 2012-09-14 17:14:55 +02:00
Allan Odgaard
a621a23924 Update project properties
Mainly just rely on default SCM window title.
2012-09-14 17:14:55 +02:00
Allan Odgaard
539f16008e Include SCM info in default window title
Ideally I also wanted to include project directory, but since the user’s properties are read after the default ones, and those contain the setup of projectDirectory, this isn’t possible with the current semantics.
2012-09-14 17:14:55 +02:00
Allan Odgaard
170785dd52 Fix typo 2012-09-14 17:14:55 +02:00
Allan Odgaard
2e3af12381 Rename property: layout → layers
This is to avoid a clash with the layout method introduced in 10.7 (and used during auto layout).
2012-09-14 17:14:55 +02:00
Allan Odgaard
144ee3762d Use NSBox to draw gutter divider
There’s a few subtle advantages of going with a view, mostly theoretical (about minimizing refresh rectangles) but switching to constrained based layout should provide minor code simplifications, since our ancestor view won’t have to deal with the gutter divider rectangle.
2012-09-14 17:14:54 +02:00
Allan Odgaard
2b2b0b016d Make all second level headings article 2012-09-14 17:14:54 +02:00
Allan Odgaard
3d3e44e1a4 Add TM_CURRENT_THEME_PATH
There’s a few commands which want to read settings from the current theme. So far these have been reading the theme UUID from TextMate’s settings and scanned the disk to find the corresponding property list.

This is pretty bad because theme UUID can be set in different ways, themes can be in arbitrary bundles, and the property lists can be in delta format.

The latter is not solved, though we ensure the variable point to the base theme, incase a delta exist. TextMate could simply write a non-delta version of the theme to TMPDIR and let the variable point to that, so we’re not really limiting ourself by adding this variable.
2012-09-12 18:30:37 +02:00
Allan Odgaard
ba28b9e1ae Set TM_APP_IDENTIFIER
This is for bundles that need to read TextMate’s preferences file (should only be those using a nib with user defaults bindings for their preferences dialog).
2012-09-12 18:30:37 +02:00
Allan Odgaard
04272337ae Let cf::to_s(NULL) return NULL_STR
This was previously undefined. We also return NULL_STR when converting the CFString fails.
2012-09-12 18:30:37 +02:00
Allan Odgaard
065f5552bb Enable implicit @synthesize
I haven’t removed the current use of @synthesize since that results in a build that throws exceptions and crashes.
2012-09-12 18:30:37 +02:00
Allan Odgaard
4b76514eeb Implement getter/setter for const& property 2012-09-12 18:30:37 +02:00
Allan Odgaard
2e2b91144d Change property to read-only
Since it uses a const reference we can’t synthesize a setter for this.
2012-09-12 18:30:37 +02:00
Allan Odgaard
cb46ba11e5 Change set-only property → method 2012-09-12 18:30:37 +02:00
Allan Odgaard
a14a13feff Update search and file chooser to new glob list 2012-09-12 18:30:36 +02:00
Allan Odgaard
4fc00f55e7 Update file scanner API to use glob_list_t 2012-09-12 18:30:36 +02:00
Allan Odgaard
4f017345fc Add file/folder exclude keys for search and file chooser
This is just for completeness.
2012-09-12 18:30:36 +02:00
Allan Odgaard
6521ff2529 Use glob_list_t in file browser
This changes the way the include/exclude keys work: A path now *must* be matched by an include key to actually be shown.

The default value of the global include key has been changed to include “*” but if users have edited the value, they will see few or no files in the file browser.
2012-09-12 18:30:36 +02:00
Allan Odgaard
6f2e6bb3e5 Don’t restore “search hidden folders” setting
This is only because of upcoming code changes. Wether or not to search hidden folders can be expressed using the glob list, so a dedicated setting is redundant.
2012-09-12 18:30:36 +02:00
Allan Odgaard
015d6a2a23 Add glob_list_t type
This can be used to manage a list of accept/reject globs.
2012-09-12 18:30:36 +02:00
Allan Odgaard
e8837fcf9f Improve glob matching
1. The * and ** operators will now match a dot if not at the beginning of a path component. E.g. ‘main*’ will match ‘main.cc’.
2. When negating a glob, the * and ** operators will include dot files. E.g. ‘!cache/**’ will match (reject) ‘cache/.DS_Store’.
3. The ** operator no longer needs a trailing slash. E.g. ‘src/**.cc’ will match ‘src/main.cc’ and ‘src/sys/util.cc’.
2012-09-12 18:30:35 +02:00
Allan Odgaard
d3c455d9e5 Checkin release notes 2012-09-11 00:05:05 +02:00
Allan Odgaard
28f80a791d Use project’s window title settings for untitled documents
This includes setting up SCM variables and closes issue #298.
2012-09-11 00:05:05 +02:00
Allan Odgaard
b2fa6ff377 Remove UUID from settings API
Don’t recall what the intent was with this.
2012-09-11 00:05:05 +02:00
Allan Odgaard
2333b23fe7 When file is renamed, check if a new file takes its place
Xcode does some weird stuff while saving, it renames the existing file (twice), having it end up in some staging area with a UUID as filename, and then disappear.

Previously TextMate would track these renames, now it waits up to one second for a new file to appear using the old file’s path.
2012-09-10 23:17:32 +02:00
Allan Odgaard
77360e4a6b Proper undo management for external changes
This fixes issue #50.
2012-09-10 22:47:58 +02:00
Allan Odgaard
5dea94da01 Disable undo/redo menu items when appropriate 2012-09-10 22:47:58 +02:00
Allan Odgaard
cf5b5965da Don’t send theme bundle items to OakTextView
Since the text view delegates theme switching to its parent document view, we just send the theme (bundle item) directly to the document view.
2012-09-10 22:47:58 +02:00
Allan Odgaard
b49e35ab6a Harmonize “perform bundle item” method naming
We now have:

 - performBundleItem:
 - performBundleItemWithUUIDString:
 - performBundleItemWithUUIDStringFrom:

I’m leaning toward changing the prefix, as ‘perform’ is mainly action methods invoked as a direct response to some user action (with that action part of the name), but haven’t found a better prefix yet.
2012-09-10 22:47:58 +02:00
Allan Odgaard
20c6a9640d Remove unused helper function
This was from before requiring Lion.
2012-09-10 22:47:58 +02:00
Allan Odgaard
80a0efb563 Update themed UI colors from OakDocumentView
This is an ongoing effort to refactor and simplify OakTextView. The goal is to move decisions up the hierarchy and instead have properties on the objects lower in the hierarchy (making the components more flexible and allowing for better decision making at the higher level).
2012-09-10 22:47:57 +02:00
Allan Odgaard
d442a49e1e Add ibeamCursor property to OakTextView
We now require this to be set when changing theme, rather than have the IBeamCursor getter return a cursor appropriate for the current theme.

When switching themes we need to update several UI elements (scrollview background and knob style, gutter view, and possibly more in the future) so we might as well move the logic that picks the proper cursor color to this setup code.
2012-09-10 22:47:57 +02:00
Allan Odgaard
5ce947541c Use new theme_t API 2012-09-10 22:47:57 +02:00
Allan Odgaard
fe5d47272e Only fill with “clear color” for transparent themes 2012-09-10 22:47:57 +02:00
Allan Odgaard
b88ba4ff23 Extend theme_t’s public API 2012-09-10 22:47:57 +02:00
Allan Odgaard
d8264d2f29 Checkin release notes 2012-09-10 22:47:56 +02:00
Allan Odgaard
12f305f82a Spelling dot was drawn flipped 2012-09-10 14:24:05 +02:00
Allan Odgaard
87d780d9f6 Fix image sizes on retina Macs
We were using the point size for the bitmap mask causing the images to be doubled in pixels.
2012-09-10 14:24:05 +02:00
Allan Odgaard
111c1acd11 Refactor: Remove code duplication 2012-09-10 14:24:05 +02:00
Allan Odgaard
b475bdfdef Refactoring 2012-09-10 14:24:04 +02:00
Allan Odgaard
45b00164c4 Move document::is_binary to where it is used 2012-09-10 14:24:04 +02:00
Allan Odgaard
45f6677e34 Checkin release notes 2012-09-10 10:56:26 +02:00
Allan Odgaard
9dd1585abe fixup! Redo spell checking after changing options 2012-09-10 10:27:42 +02:00
Allan Odgaard
d93e5c75f6 Checkin release notes 2012-09-09 23:06:17 +02:00
Allan Odgaard
400be883b9 URL-escape PAC string
Since the PAC URL is user supplied it’s unknown what state it actually is in, so we try to create a CFURL object from the raw string and if that fails, we URL-escape it (though not escaping slashes and colons).

Should fix issue #228.
2012-09-09 22:49:55 +02:00
Allan Odgaard
8207f14e47 Default host for rmate is now ‘auto’ (when using ssh) 2012-09-09 22:49:55 +02:00