Commit Graph

790 Commits

Author SHA1 Message Date
Allan Odgaard
3752b0205f Add to list of actions that enable multiple carets
Selecting to begin/end of typing pairs or end of line/paragraph will now also break up a column selection into multiple carets.
2013-01-30 19:29:02 +01:00
Allan Odgaard
342152ea71 Remove light gray line above tabs 2013-01-30 18:55:30 +01:00
Allan Odgaard
da3a91a7bb Set root view to be opaque
The idea was that e.g. a status bar may wish to not be opaque and rely on the window’s border to shine through.

Unfortunately there is an issue where if the view is not opaque, the user can drag the entire window by clicking the scroll knobs (requires scrollbars to be configured to be visible and using a mouse, a trackpad doesn’t seem to cause the issue).
2013-01-30 16:55:33 +01:00
Allan Odgaard
71e884a6de Fix crash when pasting in file browser
This started after upgrading to clang-425.0.24. More info at https://github.com/sorbits/rdar/tree/master/for-in-with-ARC
2013-01-30 16:17:32 +01:00
Allan Odgaard
0413f35eeb Rework symbol chooser code
The symbol chooser is now owned by DocumentView instead of DocumentController.

The symbol chooser does not know about its owner and is not an observer of any notifications. Instead it has a property for “document” and one for “selectionString”. It is the owners job to update these properties (i.e. when switching document or changing the selection).
2013-01-30 16:17:32 +01:00
Steven Clukey
b9d9e9140a SymbolChooser live-updates its selections
This code is public domain.

Closes #166.
2013-01-30 16:00:04 +01:00
Steven Clukey
33751cadf1 SymbolChooser references OakDocumentView instead document
Since a document cannot send notifications, this will allow the
SymbolChooser to monitor and respond to notifications from the
DocumentView.
2013-01-30 13:26:44 +01:00
Adam Strzelecki
08d8d69f2e Fixed occasional “too light” title bar gradient
This would mainly happen when creating new windows with a file browser.

Described at:
http://stackoverflow.com/questions/5812593/nswindow-textured-gradient-fill-weirdness
http://stackoverflow.com/questions/7795505/nswindow-textured-background-with-nstextfield/11482772#11482772
2013-01-30 13:26:09 +01:00
Adam Strzelecki
5f69592a1f Fixed control/tab bar label shadows
NSShadowAttributeName has no effect when using CTFrame. Use
CGContextSetShadowWithColor instead.
2013-01-30 13:20:06 +01:00
Allan Odgaard
b1f19e93f2 Corrupt archive → extracting archive
This is a more correct error.

Also write exit code and potential error from tar to stderr.
2013-01-29 21:47:40 +01:00
Allan Odgaard
951fd53b30 Construct default theme from a dummy bundle item 2013-01-29 21:41:17 +01:00
Allan Odgaard
46a8445f76 Make encoding::type public 2013-01-29 21:40:52 +01:00
Allan Odgaard
0431cca971 Catch potential exception from address book
According to the documentation, sharedAddressBook should return nil when user hasn’t granted access, but one user is reporting random crashes related to this code.
2013-01-29 21:16:49 +01:00
Allan Odgaard
8e433ae3ba View → Show Invisibles now work for file browser
With focus in the file browser this menu item can now be used to toggle wether or not the include/exclude patterns should be ignored (causing everything to be shown, when ignored).
2013-01-29 15:31:11 +01:00
Allan Odgaard
99203d332d Proper refresh when dropping files on text view 2013-01-29 15:31:11 +01:00
Allan Odgaard
18998cba53 Drop snippets on undo
This isn’t ideal but better than a potential crash (following the next edit). A better solution will have to wait to a larger refactoring (which should also consider multiple editors working on the same buffer).

Closes #186.
2013-01-29 15:31:10 +01:00
Allan Odgaard
04b092afb1 Move static data out of headers
This is to satisfy clang (421.0.57).
2013-01-29 15:28:23 +01:00
Allan Odgaard
2d9eef5baa Fix variable name in debug output
This was broken during the update to ARC and synthesized properties.
2013-01-29 15:28:22 +01:00
Allan Odgaard
adb2ed7b64 Use sel_getName() instead of typecast 2013-01-29 15:28:22 +01:00
Allan Odgaard
901bf378c0 Fix build error (clang-421.0.57) 2013-01-28 22:08:17 +01:00
Allan Odgaard
6cd18bafb0 Allow property sections to match folders
We generally lookup include/exclude patterns for a folder rather than a file, and here it makes sense to allow the bracketed sections of the property files to target the folder.

Since the sections are not ranked based on how good a match they are, targeting a subfolder, and then a subfolder of this subfolder, does not have which settings take precedence defined.
2013-01-28 21:01:12 +01:00
Allan Odgaard
9273f28a87 File browser: Keep item selected after delete
The ideal behavior would account for “nesting”, i.e. we should prefer to select an item from the same folder which we deleted from. Though Finder uses a similarly “naive” selection preservation algorithm.

Closes #717.
2013-01-28 20:37:34 +01:00
Allan Odgaard
54fe77ebdb Fix coding style 2013-01-28 20:37:33 +01:00
Allan Odgaard
b62b9545aa Use subset matching for extension in file chooser’s filter string
This allows ‘.js’ to match ‘foo.js.erb’. Special care is taken so that ‘.m’ doesn’t match ‘.md’, etc.

Closes #722.
2013-01-28 17:39:30 +01:00
Allan Odgaard
904348d489 Add OakGradientView
This simply draws a gradient background but supports alternate colors for when the window is inactive.
2013-01-28 15:44:28 +01:00
Allan Odgaard
269a6ae3c2 Use “standard” divider above incremental search 2013-01-28 15:44:27 +01:00
Allan Odgaard
4e76b6f41e Use last string when bringing up incremental search
Closes #631.
2013-01-28 15:44:27 +01:00
Allan Odgaard
036a53582c Replace live search xib with code 2013-01-28 15:44:27 +01:00
Allan Odgaard
456209730d Improve autoscroll when drag-selecting outside viewport
When user drag-selects and moves mouse outside the viewport, we do not want to use ‘ensureSelectionIsInVisibleArea:’ because that method looks only on the selection, particularly the non-anchored end-point (and works differently for unanchored selections). Instead we want to scroll the point corresponding to the mouse position inside the viewport.

Fixes #475.
2013-01-28 12:42:28 +01:00
Allan Odgaard
7831a40b23 fixup! Improve scroll when selecting units 2013-01-28 12:42:28 +01:00
Allan Odgaard
c684dd03d2 Add bug tracking ID annotation 2013-01-28 12:42:28 +01:00
Allan Odgaard
d68be42546 Initial divider colors were wrong for inactive windows 2013-01-28 12:42:28 +01:00
Adam Strzelecki
60965ce6c3 Tab bar above document option
This change adds new option for showing tab bar only above document, so the
file browser header lines up with tab bar.

File browser header height reduced by 1 pixel to match tab bar height. It also
draws optional top divider when in same line as tab bar
2013-01-28 12:42:28 +01:00
Allan Odgaard
a883854145 Use divider lines in root view
Previously we placed the views with a one point gap between them and had the superview fill the background. This works fine, but has the somewhat theoretical disadvantage that the superview then needs to implement drawRect: and for performance reasons declare that it is “opaque” which means subviews can’t use the (true) window background, should they want to.

Also add a preferences key for “tabs above document” (issue issue #214), but not hooked up in this commit.
2013-01-28 12:42:28 +01:00
Allan Odgaard
a9e0b3583f Fix missing open / modified status in file chooser
This only worked for untitled files since we no longer keep document UUIDs for documents with a path.
2013-01-28 12:42:28 +01:00
Allan Odgaard
80b27f0b28 Add method for searching file browser folder 2013-01-28 12:42:27 +01:00
Allan Odgaard
25cfc61f9f Fix “Go to Favorites” (wrong URL used)
The URL constant for the favorites location was setup using oak::application_support() but done before the app support folder was initialized (due to the setup function being marked as a constructor).
2013-01-28 12:42:27 +01:00
Allan Odgaard
4dccc12945 Add method to move focus to document or file browser 2013-01-28 12:42:27 +01:00
Allan Odgaard
164aef5323 Use horizontal/vertical line creators 2013-01-28 12:42:27 +01:00
Allan Odgaard
a1a2e23ca9 Add helpers to create lines
With this we can create either a horizontal or vertical line, and don’t need to manually set a constraint for its width/height.
2013-01-28 12:42:27 +01:00
Allan Odgaard
61fd5d04df Position file chooser relative to text view
This is instead of placing it relative to the entire window. The main motivation is that with the file browser on the right, I want the file chooser closer to the left edge of the window.
2013-01-25 17:44:17 +01:00
Allan Odgaard
ece57c79b8 Tab bar collapsing now disabled by default 2013-01-25 17:44:17 +01:00
Allan Odgaard
7a5294936c QuickLook preview panel now zooms in/out 2013-01-25 17:44:17 +01:00
Allan Odgaard
a935aff340 Going to SCM status has the groups expanded
Previously these would not initially be expanded but the expansion state remembered. Now that we regularly clear cache of expanded URLs, it’s more tedious regularly having to expand these two groups.

It also introduce new API for having data sources return what items should be initially expanded, which probably makes sense for some data sources.
2013-01-25 13:49:16 +01:00
Allan Odgaard
5c1eb0ae3e Use command name as title for output windows
The command can set a custom title so this is only for commands that doesn’t do that.
2013-01-25 13:15:36 +01:00
Allan Odgaard
694b6defd8 Handle untitled documents when filtering on path
These would previously be prefixed with the project folder path. Now they get no prefix (and disappear when the path-part of the filter string is non-empty).
2013-01-25 13:15:35 +01:00
Allan Odgaard
5adc29189e Drop other expanded folders when revealing item
We probably should only drop expanded folders which descend from the current root, but that’s more code and the implemented behavior could be seen as “garbage collection” (keeping the memory of expanded folders low).
2013-01-25 13:15:16 +01:00
Steven Clukey
c7035ded44 Added force open in TextMate and fixed confusion when opening an alias.
Any file should be able to be opened within TextMate, so
Option-DblClick will always do that. I first noticed this with .xib
files.
Because of the order of the if statements, opening an alias to a
package or binary file (or .xib) would not have the previous if
statements applied to it.
2013-01-25 13:15:16 +01:00
Michael Sheets
a7564b924c Add inactive state coloring for dividers. 2013-01-25 06:00:09 -06:00
Michael Sheets
7e472b5162 Enable focus ring when 'Full Keyboard Access' is enabled.
For aesthetic reasons the focus ring is disabled as there is no other control that can be active, however this is not the case with full keyboard access enabled as you can tab through the scope bar as well.
2013-01-25 04:18:11 -06:00