Commit Graph

171 Commits

Author SHA1 Message Date
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
Allan Odgaard
967f08c9c0 Limit file browser header updating
This mainly relates to the folder pop-up. By delaying creation of this menu till the user actually opens it, we avoid/delay having to create potentially expensive icons (icons are “expensive” since creating one may cause TextMate to hit the disk).
2013-02-14 11:31:21 +01:00
Allan Odgaard
ad6a82bb1d Don’t explicitly update file browser header view
This is unnecessary as long as we always go via setUrl: or setHistoryIndex:
2013-02-14 11:31:21 +01:00
Allan Odgaard
43fa57ae22 Don’t draw status bar background on window border 2013-02-14 11:31:20 +01:00
Allan Odgaard
ba7b1b1be7 Fix coding style 2013-02-12 21:55:56 +01:00
Allan Odgaard
0a0d9a3d9b Assign key equivalents to Go → Back/Forward
We use ⌘[ and ⌘] which is also used for Text → Shift Left/Right so we only set these keys for when the main text view is not active.

The main advantage is that you can now use these keys to move back and forth in history of HTML views (it also works in file browser, but due to a custom keyDown: overload, it also worked prior to this commit).
2013-02-11 21:58:29 +01:00
Allan Odgaard
7c1c253c86 Make “Go to Favorites” a toggle 2013-02-11 14:21:24 +01:00
Allan Odgaard
059a8a0b75 Improve Quick Look menu item title
This now also shows what it’ll display and switches to “Close Quick Look” when the panel is already showing.
2013-02-11 14:21:23 +01:00
Allan Odgaard
2c996b6b7a Improve file browser menu titles
We now write what the actions will apply to. This isn’t done for all actions, which is somewhat consistent with Finder, though I don’t know why Finder doesn’t include such description for all items, perhaps it’s seen as redundant to state for every action (and just adds noise), so only items where user could be “confused” should explicitly state what they work on.
2013-02-11 14:21:23 +01:00
Allan Odgaard
7b017d695d Rework file browser action menu 2013-02-11 14:21:23 +01:00
Allan Odgaard
af37d2e30a Skip group cells when selecting item after delete (file browser)
Presently this is only relevant for the SCM Status view, as no other data source use group cells.
2013-02-11 14:21:22 +01:00
Allan Odgaard
df8465e607 Align close button (×) with file labels
Closes #391.
2013-02-11 14:21:21 +01:00
Allan Odgaard
129784816c Don’t show SCM badges for untracked items
All of these will always have the same badge, so there’s no reason to show it (and it covers the alias badge, so there is some usability benefits beyond just the visuals).
2013-02-11 14:21:21 +01:00
Allan Odgaard
507dac1908 Let FSItem use OakFileIconImage. 2013-02-11 14:21:20 +01:00
Michael Sheets
7fa0e34a5e Restyle and add graphics to file browser action bar 2013-02-09 16:34:24 +01:00
Allan Odgaard
ae02db9baa WIP: Add action bar to file browser 2013-02-09 16:34:24 +01:00
Michael Sheets
034dd8f06b Shrink height when tabs above document is enabled 2013-02-09 16:34:24 +01:00
Michael Sheets
2200df74fd Simplify constraints and set a height for file browser header 2013-02-09 16:34:23 +01:00
Allan Odgaard
43e15b3792 Let file browser header inherit from OakGradientView 2013-02-09 16:34:23 +01:00
Allan Odgaard
9c994af1e0 Tweak OakGradientView
- Accept two NSGradient objects instead of four colors.
- Call designated initializer on super instead of self since subclass is likely calling us from its designated initializer
- Make class public
2013-02-09 16:34:23 +01:00
Michael Sheets
9a26e0df5e Move file browser divider into parent view 2013-02-09 16:34:11 +01:00
Allan Odgaard
deac51c7a1 Expose outlineView property of file browser 2013-02-08 13:55:09 +01:00
Allan Odgaard
b139ac5097 Change push_back → emplace_back (C++11)
This is mainly motivated by readability, so I only did a few select replacements.
2013-02-08 11:20:35 +01:00
Allan Odgaard
fce82f0759 Fix potential crash
Even though the code is running on the main thread, it might still run after the owning (C++) object has been destroyed.
2013-02-06 18:25:01 +01:00