Commit Graph

819 Commits

Author SHA1 Message Date
Allan Odgaard
0fdd04b6d3 Add SCM API for disabling updates
This is to be used when the application is in the background. Rather than completely disable updates, it might perhaps be better simply to increase the delay used to throttle updates.
2013-02-03 10:48:39 +01:00
Allan Odgaard
e599bb7379 Introduce scm::ng::root_for_path
Also change SCM implementation so that it doesn’t use objects with automatic storage, as the objects may be accessed from threads, which may run after objects with automatic storage has been destroyed.
2013-02-03 10:48:38 +01:00
Allan Odgaard
ef8e1a7597 Only set TM_SCM_BRANCH when there is a branch 2013-02-03 10:48:37 +01:00
Allan Odgaard
521dd59f14 Don’t use automatic storage in threaded code 2013-02-03 10:48:35 +01:00
Allan Odgaard
151c800239 File icon images now default to ‘existing’ 2013-02-03 10:48:34 +01:00
Allan Odgaard
044cd72c10 Use system icons for Open With menu
Previously we used our own icon image class which support SCM status, custom images for known file types, and more. This is however is unnecessary, as we know the Open With menu contains only applications, and each should use their standard icon.

This should also fix issue #510, although the issue was never diagnosed beyond git stalling while trying to get SCM status for the application icons in this menu.
2013-02-03 10:48:33 +01:00
Allan Odgaard
638e0bc601 Show source in file chooser title 2013-02-03 10:48:32 +01:00
Allan Odgaard
eaf5f78681 Closing file chooser disposes its documents
Previously it would hold onto the documents shown, which is not only wasteful, but could mean that it would retain a no longer used untitled document (and thus occupying an untitled document counter).
2013-02-03 10:48:31 +01:00
Allan Odgaard
bfa3db1d79 Disallow selecting group cells in file browser
Group cells are presently only used for the SCM status data source.
2013-02-03 10:48:29 +01:00
Allan Odgaard
7e527bd861 When a file is selected, save folder defaults to its parent
This is only when saving untitled documents.

Closes #748.
2013-02-03 10:48:28 +01:00
Allan Odgaard
837bdf537b Reset mouse hover state when leaving view
The close buttons in the file browser could be stuck on their “hover” state if quickly moving mouse outside the bounds of the outline view.
2013-02-03 10:48:27 +01:00
Allan Odgaard
b51ed151d6 Auto-enable Back / Forward menu items 2013-02-03 10:48:26 +01:00
Allan Odgaard
78c5114ac6 Remove hardcoded shortcuts from keyDown:
These keys are also in the menu so no need to special-case them (unlike the other keys handled).
2013-02-03 10:47:24 +01:00
Allan Odgaard
8c43974265 Add (async) scope attribute collecting to DocumentController
This is for attr.project.XXX and attr.scm.XXX, although the latter is also provided by scm::info_t.

With this commit, the file::path_attributes function no longer collect this information.
2013-02-02 11:14:35 +01:00
Allan Odgaard
0d187e6694 Remove SCM variables from file::variables 2013-02-02 11:14:35 +01:00
Allan Odgaard
540bf5daf1 Remove SCM variables from document_t 2013-02-02 11:14:35 +01:00
Allan Odgaard
c4d6c624e8 Limit disk access done by DocumentController 2013-02-02 11:14:34 +01:00
Allan Odgaard
d29337a754 SCM API: Update SCM data source 2013-02-02 10:51:59 +01:00
Allan Odgaard
a470ee8ba8 SCM API: Update file chooser 2013-02-02 10:51:59 +01:00
Allan Odgaard
f1ff38f929 Add new SCM API
This won’t perform any disk access on main thread. The previous API would check for the SCM-metadata directories on the main thread and also obtain the initial status and branch during creation.
2013-02-02 10:51:59 +01:00
Allan Odgaard
4138c2a3d5 Use data source’s root item’s title in file browser header
This is instead of simply asking for the root URL’s display name, as the data source can provide a more specialized display name.
2013-02-02 10:34:23 +01:00
Allan Odgaard
57f4589dbb Broadcast “is on disk” after first save 2013-02-02 10:32:53 +01:00
Allan Odgaard
89dccee126 Fix wrong behavior when selecting to end of line
This also affected a few other selection actions.

Fixes #738.
2013-02-02 08:52:13 +01:00
Allan Odgaard
e6c6fc74aa Decouple fs-events code from info_t 2013-02-02 08:52:12 +01:00
Allan Odgaard
97eb13f4c9 Move fs-events code to own file 2013-02-02 08:52:12 +01:00
Allan Odgaard
32fcb52c68 Workaround for clang linker warning
Using instances with static storage in Objective-C files result in the following warning (starting with clang 425.0.24):

ld: warning: direct access in […] to global weak symbol […] means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
2013-02-02 08:52:12 +01:00
Allan Odgaard
b54f28af95 Improve encapsulation 2013-02-02 08:50:35 +01:00
Bob Rockefeller
0f41c946f0 Bind the grid icon to .less files
Added .less files to the OakAppKit .plist bindings file as another grid icon, to go along with the existing .css, .sass and .scss definitions.

Signed-off-by: Bob Rockefeller <bob@bobrockefeller.com>
2013-02-02 08:49:15 +01:00
michael starke
e5d2d43e61 Fixed wrong color in red file labels 2013-01-31 01:26:31 +01:00
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