Commit Graph

213 Commits

Author SHA1 Message Date
Allan Odgaard
5edd3479ba Implement accessibilityIsAttributeSettable: for all attributes
Previously if using the Accessibility Inspector exceptions could be thrown.
2013-12-26 15:19:28 +07:00
Ronald Wampler
54de23f940 Ensure FSItem name property is not nil when setting menu title
We use to pass nil to NSMenuItem initWithTitle: when clicking the SCMFolders in
SCM Status (see commit e5841fe); however, we will *probably* never encounter
this now. But it might be useful, if custom data sources are implemented for the
file browser in the future.
2013-12-24 15:11:54 +07:00
Allan Odgaard
9f07942e09 Use dynamic menu titles for most toggle items
Closes #935
2013-12-12 13:36:16 +07:00
Allan Odgaard
3c99a69398 Only enable “file” services for file browser context menu
The services support in the file browser was mainly added to allow Quicksilver to grab the selection, I do not recall if this is why the selection was (also) made available as a regular string (in addition to the “file names pasteboard type”).
2013-11-28 13:48:03 +07:00
Ronald Wampler
e5841fe34f Add query component to scm URL
Previously when constructing a scm URL from a path, if scm was not enabled
we returned a file URL. This could result in some unexpected behavior.
For instance, when a directory was selected in the file browser,
activating "SCM Status" would just open the untracked directory.
This patch, insteads, adds a query to the scm URL that can be parsed to
determine how to handle the scm status request later on.
2013-11-28 13:48:03 +07:00
Allan Odgaard
1de5d90475 Set hugging priority for horizontal dividers
In the HTML output window’s status bar, the divider was taking up too much space (on 10.9).
2013-11-04 01:12:04 +01:00
Allan Odgaard
908ca3f5ab Allow zooming icon animation to be disabled
To disable, run the following in a terminal: defaults write com.macromates.TextMate.preview fileBrowserOpenAnimationDisabled -bool YES

Closes #109
2013-10-30 21:50:07 +01:00
Allan Odgaard
f943a6367a Remove disableHighlight property from NSCell subclass
The desired rendering can be achieved without adding code to NSCell
2013-10-27 11:27:47 +01:00
Allan Odgaard
4c40d6b6b9 Allow opening files by single-clicking text (rather than icon)
This is enabled via: defaults write com.macromates.TextMate.preview fileBrowserSingleClickToOpen -bool true

Closes #187
2013-10-26 12:57:38 +02:00
Allan Odgaard
44cdbc57c6 Move “click to open” logic to cell
This will make it easier to change the logic, since 3 different parts of the file browser depend on it: accepting first responder, selecting items, and single-clicking items.
2013-10-25 23:14:01 +02:00
Allan Odgaard
1d37649c10 Remove instance variables from interface 2013-10-24 21:10:20 +02:00
Ronald Wampler
08b0b5ba0b Let OakFinderLabelChooser draw and manage it's own title
This removes the need to create and manage a separate menu item
as a placeholder for the title of the color swatch in the file
browser action menu.
2013-09-12 23:13:57 +02:00
Allan Odgaard
1c308c810d Use map::emplace instead of inserting std::pair (C++11) 2013-09-05 20:59:11 +02:00
Allan Odgaard
e4e80a946c Use std::make_shared 2013-09-03 12:27:20 +02:00
Allan Odgaard
211770893e When in Favorites folder, change Add → Remove From Favorites
In practice it is possible to be in a parent of the Favorites folder and expand items so that the symbolic links in favorites can be selected, this commit does not handle that case, as we would then also need to handle the case where items both inside and outside the Favorites folder were selected (at the same time).

Users who do these things are probably aware of how symbolic links work, and can use “Move to Trash”.

Closes #1089
2013-08-26 11:48:41 +02:00
Allan Odgaard
21d68ce336 Fix file browser menu item validation 2013-08-09 23:21:21 +02:00
Allan Odgaard
00c5f8531e Make outlineView:shouldExpandItem: a no-op for expanded items
Fixes #160.
2013-08-09 21:54:12 +02:00
Jacob Carlborg
7c6d5680af Add source list style setting for the file browser
When this setting is enabled it will render the file browser with the source list style, that is, the same style as the sidebar in Finder.

To enable run: defaults write com.macromates.TextMate.preview fileBrowserStyle SourceList
2013-07-25 11:23:43 +02:00
David Howden
274f73b7de Fix file browser layout issue
Shrinking the file browser width so that the folder drop-down
text is compressed would cause the layout to break if the width
was then increased.
2013-07-23 21:36:04 +10:00
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