Commit Graph

194 Commits

Author SHA1 Message Date
Jacob Bandes-Storch
b533df1a40 Bar button positioning tweaks 2013-07-21 13:42:43 +02:00
Allan Odgaard
3a359ca52d Limit resources copied to target bundle
Without the ‘.png’ extension we would match the ‘Header Icons’ folder, and (recursively) copy that to our target, so the contents of the folder would exist in two places in the target (with and without the folder).
2013-07-21 13:25:29 +02:00
Allan Odgaard
491fc8a3e3 Add missing semi-colons after assertion 2013-07-21 13:25:28 +02:00
Allan Odgaard
f88454b6ae Fix issue with remembering expanded file browser items
Previously each file browser would have its own array of expanded items, read from user defaults, and written back during application termination.

This meant that the last file browser to write its array, would eclipse the other file browsers.

Now we have all but the first file browser append its list of expanded items. Additionally each file browser will only append items which are actually visible.

Fixes #873.
2013-06-28 23:32:20 +02:00
Allan Odgaard
48339e306b Remove outdated “upgrade” code
We used to store selected URLs in the user defaults and added this code to remove potentially items.
2013-06-28 23:32:20 +02:00
Allan Odgaard
ce4ae62547 Change ‘variables_for_path’ API
We now accept the a directory in addition to the path. If a directory is provided, the path is only used to filter variables rooted at the directory.
2013-05-12 11:09:18 +07:00
Allan Odgaard
8b3f05485d Change argument ordering for ‘scope_variables’
Generally we should always provide a base environment, since the scoped variables are format strings. The filtering scope selector is however optional, and we do not have one when executing commands outside an fi;e/editor context.
2013-05-12 11:09:17 +07:00
Allan Odgaard
5eaa0a9d94 Remove “PWD API” for setting command working directory
Only the file browser and the ‘path_variables’ function (used for filters) made use of this method to set the working directory. Previously drop commands also used it, which is probably the only time we really need to set a working directory, as we provide the command with a relative file path.
2013-05-12 11:09:17 +07:00
Allan Odgaard
10e3536a80 Change method signature
We return a variables map instead of updating a map passed in by reference. The previous API was mainly done because we couldn’t previously return non-POD from Objective-C methods. Returning a map with variables makes the API more exact, e.g. how to handle existing entries is no longer an issue (that is, the caller will have to chose the appropriate duplicate strategy).
2013-05-12 11:09:17 +07:00
Allan Odgaard
985a3c1d92 Explicit variable setup for file browser commands 2013-05-12 11:09:17 +07:00
Allan Odgaard
5fd188531a Change naming of functions for obtaining variables
These are now all prefixed with what they are obtaining variables for (scope, document, bundle, …) which makes it easier to analyze/refactor the code.

Also change document_t’s settings function to document_settings.
2013-05-09 15:16:32 +07:00
Allan Odgaard
d7e54f88ea Use trackSwipeEventWithOptions:… for swipe gestures 2013-04-26 20:45:52 +07:00
Allan Odgaard
93a1c37e47 Restore field editor’s value after reloading file browser
If user was creating a new file or folder and immediately started to type in the field editor, his changes were lost during reload (which would likely happen when updating SCM badge for the newly created item).
2013-04-23 14:38:18 +07:00
Allan Odgaard
97c9a20f6e Use localizedStandardCompare:
This is instead of our custom displayNameCompare: which has now been removed.
2013-04-21 12:20:07 +07:00
Allan Odgaard
0e290fd599 Use NSHost to obtain computer’s name 2013-04-21 12:20:07 +07:00
Allan Odgaard
253ba83ed2 Don’t suppress file browser updates when showing field editor
Reload was suppressed because there is no good way to reload a table view when the field editor contains uncommitted changes. I decided it’s probably better to lose these changes than show stale content, as for example the change might remove the item being edited, as would be the case when undoing New Document or New Folder.

Closes #886.
2013-04-10 10:13:01 +07:00
Allan Odgaard
0bf02dbeff Move divider line functions to OakUIConstructionFunctions.h 2013-04-02 04:11:32 +07:00
Allan Odgaard
d72baacff4 Move divider image creation to OakUIConstructionFunctions.h 2013-04-02 04:11:32 +07:00
Allan Odgaard
a76e1f19fb Rename local OakCreatePopUpButton functions
This is to avoid clashing with the public helper function.
2013-04-02 03:59:28 +07:00
Boris Dušek
65ae6a22b4 Improve accessibility of file browser items
Make available to accessibility the following information that file
browser displays visual indication for:

* file type (whether the file is a file, folder etc.)
* SCM status (whether the file is modified etc.)
* close button (whether the file is open)

Also, while we are at it,  make available to accessibility the
tooltip, filename and URL.
2013-04-01 13:22:41 +07:00
Allan Odgaard
da117b4b8d Disable custom icons for links to folders
For example a symbolic link like ~/.config (pointing to a folder) would previously get the custom icon for config files. Now it gets a folder icon (with a link badge).
2013-03-21 22:45:25 +01:00
Jacob Bandes-Storch
c6cf087115 Use divider image from status bars for file browser header 2013-03-21 05:00:53 -05:00
Jacob Bandes-Storch
98a7cd1e08 Add an etched effect to the status/action bar dividers 2013-03-21 04:59:14 -05:00
Allan Odgaard
3ceefce2e4 Improve renaming files with hidden extension
We now clear the “hidden extension” flag if the user manually adds it.

We also ensure the hidden extension is not ignored by comparing base name with display name. The flag is ignored under certain circumstances.

Comparing base name with display name alone may give a false positive for localized file names.
2013-03-20 11:30:41 +01:00
Allan Odgaard
bd34c84253 Remove support for disabling file browser status updating
This preference was introduced as a workaround for poor performance when displaying large folders, this however should no longer be an issue.
2013-03-19 15:02:32 +01:00
Allan Odgaard
281bccd969 Remove outdated TODO 2013-03-19 14:56:23 +01:00
Allan Odgaard
15c27135fd Change folder pop-up to pull-down
The menu contains two (non-selectable) “actions”. If we use a pop-up, we have to change the selection after the user select one of these actions, which isn’t the case with a pull-down menu.
2013-03-16 17:49:49 +01:00
Allan Odgaard
b0a0df831a Add ability to set project folder via file browser
For now it is done via a new menu item in the top folder pop-up. It might be useful to also show this menu item in the general action menu.
2013-03-16 17:49:49 +01:00
Allan Odgaard
b1e9476cce Add Select None to file browser’s action menu
This makes it easier for the user to discover that ⇧⌘A can be used to deselect all (useful e.g. prior to running a SCM command).
2013-03-12 10:25:04 +01:00
Allan Odgaard
5013620a89 Fix exception when renaming to empty string
Fixes #887.
2013-03-11 22:24:55 +01:00
Allan Odgaard
48923b9eee Remove unnecessary include 2013-03-10 16:11:25 +01:00
Allan Odgaard
2f05d5aec5 Improve VO for folder pop-up button 2013-03-03 15:53:05 +01:00
Boris Dušek
5391d1d7b4 Present the file browser area as a group to VoiceOver/accessibility 2013-03-03 15:53:05 +01:00
Boris Dušek
c3f57b0235 Add AXDescription to image buttons 2013-03-03 15:40:39 +01:00
Allan Odgaard
c4323efbb7 Use path::is_child instead of custom code 2013-02-25 15:25:17 +01:00
Allan Odgaard
7c8ad2df66 Show key equivalents in file browser action menu
Also change New Document → New File. Such title makes more sense when shown in the main menu.
2013-02-21 22:36:23 +01:00
Allan Odgaard
5e24b8554c Remove ‘InSelectedFolder’ suffix from action method
This makes it more suitable as action for a menu item in the File menu.
2013-02-21 22:00:15 +01:00
Allan Odgaard
cbb0a7864d Drop ‘ng’ namespace for scm 2013-02-21 17:39:55 +01:00
Michael Sheets
40f728ff8f Correct height of header when tabs above document is enabled
Previously this appeared correct because once you clicked the minimum height of the pop-up menu set it to the correct height. Corrects an issue noted by @fatiotus in #728.
2013-02-18 20:46:55 -06:00
Allan Odgaard
0277e82b5c Ensure proper ‘isDirectory’ flag for NSURL objects
This is important when we wish to select or edit the URL (in the file browser) as URLs with different values for this flag will not compare as equal, and URL objects created before there is a file on disk will always have this flag set to NO.
2013-02-18 15:38:25 +01:00
Allan Odgaard
61577ff582 Fix SCM callback crash
Since we retained the SCM info in an asynchronous block, we would potentially extend the lifetime of the SCM info and thus the associated callback, so the callback could be invoked after its owner had been disposed.
2013-02-16 10:43:55 +01:00
Allan Odgaard
c031557df2 Add ‘New Document’ to file browser
This create a new file on disk and brings up the “rename” text field.

You can control the type/extension either in Preferences → New document type or by setting it in .tm_properties, e.g.:

    [ attr.untitled ]
    fileType = 'source.objc++'

New Document can be undone, but it is handled by deleting the file on disk and losing potential edits you have made since creating it.

Closes #161.
2013-02-15 15:27:57 +01:00
Allan Odgaard
88cc5021a9 Add API for starting edit of item in file browser 2013-02-15 15:27:56 +01:00
Allan Odgaard
f507c75c0e Add directoryForNewItems property to file browser 2013-02-15 15:27:55 +01:00
Allan Odgaard
84b71c7640 Add swiping gesture support for 10.8
I am not sure what Apple’s thinking is here. We have swipeWithEvent: which worked on 10.7 but seems to no longer work, yet there is a global preference for configuring a swipe gesture and Safari supports that config option, but it appears other apps have to role their own implementation.
2013-02-15 15:27:55 +01:00
Allan Odgaard
a4dc3bf977 OakFileManagerDirectoryKey → OakFileManagerPathKey
This allows us to use the same key for more than just directories. The notification name itself should indicate if the ‘path’ refers only to directories or files.
2013-02-15 15:27:54 +01:00
Allan Odgaard
deffe08d1b Fix new selected item after delete 2013-02-15 15:27:54 +01:00
Allan Odgaard
58feb5dd43 Remove “crash guard”
This should no longer be possible now that the callback won’t be called after the scm info has been destroyed.

This reverts fce82f0759.
2013-02-15 15:27:54 +01:00
Allan Odgaard
b66912d8e8 Fix exception
This would happen if root url in file browser was not a file url and the user selected “Go to Folder…”.
2013-02-14 11:31:22 +01:00
Allan Odgaard
60a4b9520a Make internal functions private again 2013-02-14 11:31:21 +01:00