Commit Graph

1110 Commits

Author SHA1 Message Date
Allan Odgaard
75adb03039 Checkin release notes v2.0-alpha.9371 2013-02-06 16:48:18 +01:00
Allan Odgaard
67af1bc7fe Make divider lines opaque
Without this, it is possible to move the window when clicking directly on the line (since none of the parent views are opaque).
2013-02-06 16:43:40 +01:00
Allan Odgaard
22465873ac Handle case changes on insensitive file systems
NSFileManager only provide a move function which fails with “file exists” if we make case changes on a case-insensitive file system, therefor we now explicitly test for that error and use <x-man-page://2/rename> if the source and destination refer to the same file, but the path differ.

Fixes #769.
2013-02-06 14:50:05 +01:00
Allan Odgaard
a55e485f56 Reference ‘self’ instead of asking for singleton
In theory we could be calling this method on the non-default file manager.
2013-02-06 14:50:05 +01:00
Allan Odgaard
a913a512e5 Let directory data source observe the “did change” notification
This means we instantly reload after performing a file system operation.
2013-02-06 14:50:05 +01:00
Allan Odgaard
63c0300ed8 Post “directory did change” notifications
This is both to speedup file browser updates (as there is a bit of lag waiting for fs-events) and to work with file systems that doesn’t support fs-events (issue #745).
2013-02-06 14:50:04 +01:00
Allan Odgaard
37f130fe42 Don’t set gradient view as opaque
This is so that a potential NSTextField will correctly render itself as inactive when using NSBackgroundStyleRaised.
2013-02-06 14:50:04 +01:00
Allan Odgaard
fbb2f972f9 Don’t mark parent views as opaque
The reason for this is that NSTextField will draw itself in the “faded” state (for non-key windows) unless some of its parent views are marked opaque.

The previous problem with not having the parent views opaque (see da3a91a7bb) seems to have been solved by setting the autohidesScrollers property to YES.
2013-02-06 14:50:04 +01:00
Allan Odgaard
642b009ec9 Add to existing content view instead of replacing it
The window border drawing seems to be done by the root content view so it’s best to keep it around (as it may also do other things that we are unaware of).
2013-02-06 14:50:04 +01:00
Allan Odgaard
ad750b0b76 Auto-hide the text view’s scroll bars
This is for users who have set “show scroll bars” to “always” (or auto and am using a mouse).

Closes #527.
2013-02-06 14:50:04 +01:00
Allan Odgaard
0507bf4bed Remove all but the default bundle index
The other bundle sources have been merged into the default index.
2013-02-06 14:50:03 +01:00
Allan Odgaard
3c0e1de557 Ensure ‘self’ is kept retained
This shouldn’t be necessary, as we have a ‘retainedSelf’ instance variable that isn’t cleared until ‘[self.window close]’ (the last line of the accept: method), nonetheless I am seeing (rare) crashes from this method, and it appears to be reading the ‘self.window’ property in the last line, so adding this extra safety and will monitor crash reports.
2013-02-06 14:50:03 +01:00
Allan Odgaard
6950ebee9a Ensure all methods can handle a missing document
This fixes a crash bug when menu validation is invoked before the controller has set up a document. Hardening the other methods is just a precaution (as we generally shouldn’t make assumptions about the state of public properties.
2013-02-06 14:50:03 +01:00
Allan Odgaard
ebdb8c9364 Directly read a few instance variables
This is instead of going through ‘self’ and was done to harmonize the code. Since two of the three variables are C++ types we cannot use dot syntax (self.property) when we wish to call a member function on the result, but using [self property] is ugly and would require us to then also use [self setProperty:value] (for consistency), hence why I went with direct access.

Since the selectedTabIndex property is closely related to documents and selectedDocument, I applied the same changes to this property.
2013-02-06 14:50:03 +01:00
Allan Odgaard
c351b89324 Checkin release notes v2.0-alpha.9367 2013-02-05 21:06:15 +01:00
Allan Odgaard
41ea4b1888 Move instance data to implementation file 2013-02-05 20:59:54 +01:00
Allan Odgaard
446f219c7a Reload updated folders on reactivation
This is done by stat’ing all visible folders and is a fallback for when fs-events is not working (e.g. network file systems).
2013-02-05 20:59:54 +01:00
Allan Odgaard
e46be6b2a2 Add memory address to FSItem description
Since table views use the memory address, and these items are for use in table views, it’s useful to see the address when printing an item.
2013-02-05 20:59:54 +01:00
Allan Odgaard
c951e00a06 File browser: Dispose all children on collapse
Previously we kept the children which had been expanded, as these had an associated record for tracking file system changes and SCM info.

However, when expanding we weren’t actually re-using the item from the cached record, so not only was this wasteful, but it caused a problem because we effectively created a new item but used the old record with the old item, and while the two items would compare is equal when using isEqualTo:, they didn’t have the same memory address, so the outline view would not consider them equal, and would thus not react on reload requests when using the older item.
2013-02-05 20:59:54 +01:00
Allan Odgaard
032cb19320 Use proper cursor image for output view right of text
Fixes #763.
2013-02-05 20:59:53 +01:00
Allan Odgaard
1fb7d8a6d3 Fix infinite loop for documents outside project folder
Fixes issue #557 (part two).
2013-02-05 15:26:31 +01:00
Allan Odgaard
759e4d9720 Introduce path::is_child(child, parent)
This also returns true when ‘child == parent’ so perhaps a better name should be chosen for this function.
2013-02-05 15:25:45 +01:00
Allan Odgaard
b2ae4196c3 Update database of contributor email hashes 2013-02-05 15:05:26 +01:00
Allan Odgaard
c182d08c5d Only access SCM info when available
Fixes #756.
v2.0-alpha.9365
2013-02-05 09:45:11 +01:00
Allan Odgaard
3ec573931d Checkin release notes v2.0-alpha.9363 2013-02-05 09:02:04 +01:00
Allan Odgaard
674b171a90 Only check for bundle updates every 4th hour
This should decrease my AWS bill with $4-5/month :)
2013-02-05 08:51:59 +01:00
Allan Odgaard
20641c50c3 Disable SCM badges for non-local paths
Also disable it for user’s home folder and root of file system — having to monitor these folders is too expensive.
2013-02-05 08:51:59 +01:00
Michael Sheets
a6f0b75d4c Use correct syntax for including local headers 2013-02-05 08:36:04 +01:00
Allan Odgaard
ae5a7738f6 Retain shared info during async SCM update
Fixes #752.
2013-02-05 08:36:04 +01:00
Joachim Mårtensson
8de62bbc85 Don't mutate shared themes 2013-02-04 20:44:21 +01:00
Allan Odgaard
606a0e484e Checkin release notes v2.0-alpha.9361 2013-02-04 19:38:32 +01:00
Allan Odgaard
f99ca2408d Show non-existing paths with SCM status
This means deleted files which haven’t yet been committed show up in the file browser.
2013-02-04 19:38:32 +01:00
Allan Odgaard
6f076e0895 Remove public initializer
This is only to ensure everyone goes through the class method, which is easier to search for (constructing an FSItem from a URL is a little expensive so we wish to get rid of it where possible).
2013-02-04 19:38:32 +01:00
Allan Odgaard
e42d84fa4c Missing files still get SCM badge 2013-02-04 19:38:32 +01:00
Allan Odgaard
748558c5d3 SCM API: Update OakFileIconImage
Since the created image is a “dumb” object that can’t provoke redrawing itself, we require that SCM info is already cached for the repository containing the file for which we are creating an image. If not, there will be no SCM badge, so most users of this API should setup their own SCM info and recreate the image when SCM status changes.
2013-02-04 19:38:32 +01:00
Allan Odgaard
6d022be813 Rework file browser directory source
We now use the new SCM callback and in general things are much simpler, cleaner, and probably faster.
2013-02-04 19:38:31 +01:00
Allan Odgaard
a7a4699643 Improve caching of SCM shared info
When requesting SCM info for a path, we now always return the cached info for the first parent of the path, but if the first parent of the path is not the direct parent, we do a more thorough search (which involve disk access) in a background thread.

The latter is required because we may have nested repositories. E.g. asking for SCM info for /path/to/project/submodule/file will initially return the root project’s cached SCM info (if the submodule info hasn’t yet been added to the cache) but will then later invoke the callback with the submodule’s SCM info.
2013-02-04 19:38:31 +01:00
Allan Odgaard
dae91b7159 Move instance data to implementation 2013-02-04 19:38:31 +01:00
Allan Odgaard
4712515e8b Allow passing a window to OakSetupApplicationWithView
Should rename the function to reflect this new flexibility.
2013-02-04 19:38:31 +01:00
Allan Odgaard
8265a469d8 Improve locating Find framework resources
The FFWindowController class is an implementation detail where the Find class is the public class, so depending on the latter should make the code safe against potential rewrites.
2013-02-04 19:38:31 +01:00
Allan Odgaard
cef6a74df2 Make code safe against ‘nil’ clipboard entries
Should never happen in practice though.
2013-02-04 19:38:30 +01:00
Allan Odgaard
f57b06fa2c Move instance variables to implementation 2013-02-04 19:38:00 +01:00
Allan Odgaard
b6ba88cda5 Rework about window
We now perform the content hash (to see if release notes have changed) on a background thread.
2013-02-03 10:48:46 +01:00
Allan Odgaard
af67a1a6f6 Check version of installed mate in background 2013-02-03 10:48:45 +01:00
Allan Odgaard
216bcb61ac mate: don’t disable untitled document when called w/o files 2013-02-03 10:48:44 +01:00
Allan Odgaard
84587dccc9 mate: disable untitled document via user defaults
This is instead of setting an environment variable. Since there already is a user defaults setting for whether or not we want an untitled document created at startup, it seems nicer to have mate set that, instead of effectively introducing an alias for the setting.
2013-02-03 10:48:43 +01:00
Allan Odgaard
d5b3b07f32 Disable SCM status when app is inactive 2013-02-03 10:48:41 +01:00
Allan Odgaard
2bfe82fae4 Remove the AppStartup delegate
This temporary delegate was primarily used to ensure no message “slipped through” back when a license key was mandatory to run the alpha.
2013-02-03 10:48:40 +01:00
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