Commit Graph

270 Commits

Author SHA1 Message Date
Allan Odgaard
40879d5683 Replace sizeofA macro with range-based for loop or std::begin/end 2015-03-05 16:38:09 +07:00
Adam Strzelecki
f2d8598b06 Fix dull file browser labels on Yosemite
Using NSTextFieldCell instead default NSCell together with
NSTableViewSelectionHighlightStyleSourceList on Yosemite causes cells get light
gray color, making the whole list dull and unreadable. Workaround that setting
cell's `textColor` to `[NSColor textColor]`.
2015-03-05 16:38:09 +07:00
Adam Strzelecki
6136e1d607 Remove browser header shadow & bold on Yosemite
This applies to tabs above document case.
2015-03-05 16:38:09 +07:00
Ronald Wampler
2c3ce33cbe Let user know if scm is disabled
Currently, if the scm disable, we would show it as "Unversion". For clarity let's status that it's disabled.
2014-12-17 15:42:25 -05:00
Allan Odgaard
bf4cbd33fa Remove NSString* typecast when using to_s helper
This has a small run-time cost but source looks better and theoretically safer code.
2014-11-29 09:53:40 +07:00
Allan Odgaard
79eb970b9b Use NSIsEmptyRect instead of comparing with NSZeroRect 2014-11-17 00:04:34 +01:00
Allan Odgaard
5b39bdc98b Remove double semi-colons at end of line 2014-11-14 10:21:34 +01:00
Ronald Wampler
c0a0b2e2fd Remove unnecessary instance variable
As far as I can tell we only add objects to `_project`, but we never actually use it.
2014-11-10 09:28:06 -05:00
Ronald Wampler
f0c7a2f564 Remove unused includes 2014-11-10 09:28:06 -05:00
Ronald Wampler
9a898fe852 Code style fixes 2014-11-10 09:28:06 -05:00
Ronald Wampler
ecd3280a4a Remove NSString isDirectory category method 2014-11-10 09:28:06 -05:00
Ronald Wampler
d3f295b15b Avoid use of the NSString existsAtPath category method
We have removed the use of this category method from the rest of the code base. Refactor `FSXcodeProjectDataSource` so that we can delete it entirely.
2014-11-10 09:27:57 -05:00
Allan Odgaard
7aea556533 Remove custom NSArray category
We only use the firstObject method which has existed since OS 10.6 (though wasn’t mentioned until the 10.9 FoundationKit release notes).
2014-11-05 10:58:29 +01:00
Allan Odgaard
b581e20ad9 Add wrapper for adding views with auto layout enabled 2014-11-05 00:09:37 +01:00
Allan Odgaard
f2ab4bfa91 Ensure we draw close button image on rounded pixel position 2014-11-03 11:28:30 +01:00
Allan Odgaard
6f1641cb0c Change the close file image to a monochrome template images 2014-11-03 11:27:03 +01:00
Allan Odgaard
0f90cbcc9a Handle template image drawing in OFBPathInfoCell
If the close button image is a template image we draw it using the appropriate color.
2014-11-03 10:40:43 +01:00
Allan Odgaard
10c135e803 Swap “New File” and “New Folder” key equivalents to match Finder 2014-10-29 21:47:37 +01:00
Allan Odgaard
3588f26395 Remove unused include 2014-10-29 12:40:58 +01:00
Allan Odgaard
4b34608636 Don’t specify bezel style for borderless image buttons
Also skip setting the template image property, since all the images have the ‘Template’ extension.
2014-10-13 23:20:24 +02:00
Allan Odgaard
c5640a8d66 Rename (template) images to have a ‘Template’ suffix 2014-10-13 23:20:24 +02:00
Adam Strzelecki
b137014777 Tabs above document file browser header in tab bar
Integrate visually file manager header in tab bar when tabs above document
option in on. If tabs above document are off then use default gradient L&F.

Bottom divider for file browser header view is not integrated in header for
easier control if it is shown or not.
2014-10-02 11:03:41 +02:00
Allan Odgaard
a90acdcbe6 Use convenience methods to setup header/status bar backgrounds 2014-09-29 13:24:52 +02:00
Allan Odgaard
24bd3eee1d Let ProjectLayoutView setup height of file browser header 2014-09-29 13:03:45 +02:00
Allan Odgaard
6262e17159 Make file browser’s header view a public property
This allows users of the file browser to setup constraints involving the file browser header or change its (background) styling.
2014-09-29 13:02:15 +02:00
Allan Odgaard
72837ca7ac Use OakBackgroundFillView instead of OakGradientView 2014-09-29 13:02:15 +02:00
Allan Odgaard
cb463534b8 Make window key in actions that show file browser field editor
It is possible to bring up menus for inactive windows and e.g. select Rename or Duplicate.
2014-09-26 23:10:24 +02:00
Allan Odgaard
8224994f5d Convert dragged indexes to items when starting a drag operation
The indexes are not always valid when the drag ends because rows can have been expanded or (when dragging to another file browser) removed.
2014-09-15 12:42:02 +02:00
Allan Odgaard
c1d7484b7d Use typecast to ensure compiler finds the proper delegate method
Without it, it uses -[NSFileManager delegate] and complains that we are comparing id<NSFileManagerDelegate> with OFBOutlineView*.
2014-09-01 17:37:10 +02:00
Ronald Wampler
22cec6bb6b Do not use convertBaseToScreen: and convertScreenToBase:
These methods were deprecated in 10.7. Use `convertRectToScreen:` and `convertRectFromScreen:` instead. This is required for proper high resolution support.
2014-08-13 11:24:40 +02:00
Allan Odgaard
f370408910 File browser actions were disabled for broken symbolic links
This made it impossible to move a broken symbolic link to trash.
2014-07-05 21:33:29 +02:00
Allan Odgaard
e81286b0cd Remove unused include 2014-05-16 22:11:28 +07:00
Allan Odgaard
55b5b7a3dc Use path::escape when creating TM_SELECTED_FILES
In addition to being redundant, now that we have a global escape function, the custom shell escaping code had a bug when the path contained more than one apostrophe.
2014-04-30 12:09:47 +07:00
Ronald Wampler
fc5dcf4020 Prefer NULL to nop: in most cases
This change was prompted by the appearance of the `tabSizePopUp` button in the status bar. After dismissing the menu, the title would be disabled.

To ensure we do not have similar issues elsewhere, let's prefer the use of `NULL` to `nop:` when assigning the action for menu items unless we are sure that the menu item should always be disabled (e.g., the item is used as a label).
2014-04-30 12:09:47 +07:00
Allan Odgaard
6d77df7ac3 fixup! Remove trailing zeroes from numeric literals 2014-04-22 08:16:34 +07:00
Allan Odgaard
ae69d06c2c Use undo manager from file browser’s potential field editor
We override undo/redo for the file browser so that ⌘Z / ⇧⌘Z will only undo/redo file browser actions when it’s in the responder chain: b9fafd1495

This had the unfortunate side-effect of eclipsing the undo support of descendent views of the file browser, like the field editor used for renaming items.
2014-04-15 07:06:55 +07:00
Allan Odgaard
1f0e3db472 Remove trailing zeroes from numeric literals
I mainly dislike the trailing zeroes because CGFloat used to be a float but 1.0 is a double (1.0f would be a float). So better to under-specify and let the compiler figure out the proper type.
2014-04-14 14:26:52 +07:00
Allan Odgaard
39b94e6ac3 Harmonize whitespace and add trailing newline 2014-04-14 14:26:52 +07:00
Allan Odgaard
69c83e56df The ‘const’ keyword should be to the right of its type
The standard doesn’t care which side the keyword is placed on, but placing it on the right makes it easier to read types.

E.g. reading “int const* const” from right to left we get “const pointer to const integer”.
2014-03-31 08:27:19 +07:00
Allan Odgaard
5f69ef31c7 Don’t use NS prefix for custom functions 2014-03-28 19:31:14 +07:00
Allan Odgaard
619a2cfec7 Change a few instances of floorf/fabsf → floor/fabs 2014-03-28 19:31:14 +07:00
Allan Odgaard
b9fafd1495 Use local undo manager for file browser
This ensures that ⌘Z / ⇧⌘Z are only targeting the file browser when it has focus.

Previously these keys would act on the file browser undo stack when a view without it’s own undo/redo stack had focus, e.g. HTML output view.
2014-03-26 15:30:36 +07:00
Allan Odgaard
764a8407e9 Use undo manager’s menu item titles in file browser action menu 2014-03-26 15:30:36 +07:00
Allan Odgaard
6535546c87 Use view’s undo manager rather than the window’s 2014-03-26 15:30:36 +07:00
Allan Odgaard
1a20f3a42d Set accessibility description when creating action buttons 2014-03-26 15:30:36 +07:00
Allan Odgaard
9ae2630607 Delete unused code 2014-03-26 15:30:35 +07:00
Ronald Wampler
f45cb07d52 Moved OakCreateActionPopUpButton method to OakUIConstructionFunctions.h
While code reuse is an added benefit, the main motivation was to fix the appearance of the action popup button in the Find window. The first (placeholder) item in the Find window's action button was assigned a nop action so that when the button was clicked and it's menu validated, the "action" image would always appear as disabled.
2014-03-25 16:51:40 -04:00
Allan Odgaard
8ecf92e893 Disambiguate display names for SCM data source
For example if multiple files with same base name are modified or untracked, then previously it wasn’t possible to tell them apart (other than using the tool tip which show full path).
2014-03-14 22:54:27 +07:00
Allan Odgaard
7131e82102 Set cell value to display name when editing a file URL
This is incase the item’s display name is different than the file’s display name, for example if the display name contains part of the path’s parent (to disambiguate it).
2014-03-14 22:54:27 +07:00
Allan Odgaard
f36a0af13d Change FSItem’s name → displayName 2014-03-14 22:54:27 +07:00