Commit Graph

65 Commits

Author SHA1 Message Date
Allan Odgaard
ea85d37dff Use literal ‘⇥’ instead of ‘\u21E5’ 2012-09-27 17:52:41 +02:00
Allan Odgaard
e969b4cade Hide OakControl implementation 2012-09-25 16:18:08 +02:00
Allan Odgaard
a9412d7920 Minor change to tab bar view properties
We now set the isExpanded property during initialize and use a property to reflect the current user preference for wether or not to collapse when there is just one tab.
2012-09-25 16:18:08 +02:00
Allan Odgaard
695ee00b3b Remove binding support from OakTabBarView
Initially this was used but I found that a data source approach worked better, as it made things more explicit (and this easier to follow).
2012-09-25 16:18:08 +02:00
Allan Odgaard
2edf3bb56e Add comments translating code points 2012-09-25 16:18:08 +02:00
Allan Odgaard
a0c4af64bd Remove trailing whitespace
Only removed from non-empty lines.
2012-09-25 14:16:50 +02:00
Allan Odgaard
983bce86aa Use @autoreleasepool blocks 2012-09-25 12:30:12 +02:00
Allan Odgaard
c3de1a09f5 Move code out of header 2012-09-24 20:58:43 +02:00
Allan Odgaard
ebab500ba3 Use std::map/set instead of C arrays
These types come with a find() method and avoids having to use helper functions to get the begin/end of the array (for linear search).
2012-09-20 12:22:20 +02:00
Allan Odgaard
39f0ea518b Use tuple instead of lexicographical_compare 2012-09-20 12:22:20 +02:00
Allan Odgaard
45c87c47f8 Rename CocoaSTL.h → objc_ptr.h 2012-09-20 12:22:20 +02:00
Allan Odgaard
8fd7b82cbd Remove CocoaSTL.h include 2012-09-20 12:22:20 +02:00
Allan Odgaard
4532099359 Use Objective-C for…in instead of macro
This avoids having to use C++ iterators and we want to get rid of some of this Objective-C/C++ mixing for ARC and other reasons.
2012-09-20 12:22:19 +02:00
Allan Odgaard
45763d4afc Don’t require file to get SCM info
We didn’t actually use the file itself, only its parent directory, and there are several places we want SCM info for an untitled file’s project directory, so removing the need for a file simplifies things.
2012-09-18 17:33:02 +02:00
Allan Odgaard
effa1577ac Don’t call setBottomCornerRounded:NO
This is private API and no longer seems necessary.
2012-09-17 16:42:42 +02:00
Allan Odgaard
1fafbecd54 Remove Chinese translation
It’s not feasible to maintain the old-style xib translations while we work on the UI. We’ll soon move fully to constraint-based layout which should allow translations to be purely string-based.
2012-09-16 11:41:23 +02:00
Allan Odgaard
2d2e329cd8 Remove legacy code 2012-09-15 15:12:58 +02:00
Allan Odgaard
926dfeb2a5 Auto-layout: Encapsulate tab bar expansion
With auto-layout the tab bar view can simply invalidate its intrinsic size when it should expand/collapse. This is also done if the global user setting for disabling tab bar collapsing is changed.
2012-09-15 15:12:57 +02:00
Allan Odgaard
4d95db8f66 Auto-layout: Implement intrinsicContentSize 2012-09-14 17:14:55 +02:00
Allan Odgaard
2e3af12381 Rename property: layout → layers
This is to avoid a clash with the layout method introduced in 10.7 (and used during auto layout).
2012-09-14 17:14:55 +02:00
Allan Odgaard
20c6a9640d Remove unused helper function
This was from before requiring Lion.
2012-09-10 22:47:58 +02:00
Allan Odgaard
41ab738d19 Change colorWithCGColor: → tmColorWithCGColor:
On Mountain Lion the OS provides a colorWithCGColor: which tmColorWithCGColor: now wraps for (when available).

This fixes a warning when building with the 10.8 SDK.
2012-09-06 23:10:55 +02:00
Allan Odgaard
2b555aef7b Move spelling dot to OakTextView
We now load the image via NSImage and creates a CGImageRef from that (based on the current graphics context). This ensures we get the @2px version when on a HiDPI display.
2012-09-04 23:53:37 +02:00
Zach Drayer
99fd86dab6 Fix warning for literal strings used with NSAlert
__attribute__((format(...))) was added to NSAlert's class-based initializer in 10.7, and due to using string objects instead of literals as informative text, Clang is unable to guarantee the safety of the formatter, and, as such, issues a warning.
2012-09-03 16:42:16 +02:00
Allan Odgaard
bea35eac35 Use regular font for key equivalent control
Previously we used the fixed width font, not really sure why.
2012-08-30 14:05:21 +02:00
Allan Odgaard
0e96a04d76 Remove compatibility checks
Since we now require 10.7 we don’t need all of this. Keeping it around is just noise that can lead to confusion about code paths.
2012-08-29 16:02:29 +02:00
Allan Odgaard
cbe91ff831 Assume compiler support for explicit keyword
Since we require a fairly recent clang for other features, there is no reason to test for this one.
2012-08-29 14:27:35 +02:00
Allan Odgaard
aa49e26fb7 Find dialog’s Find All for untitled file caused crash
Closes issue #318.
2012-08-28 23:27:05 +02:00
Jacob Bandes-Storch
d4ce498f60 Use 64-bit: numeric type fixes
Unfortunately a printf precision specifier (‘%.*s’) can not come with a width specifier so we have to cast to int. The width specifier ‘t’ is used for ptrdiff_t.
The int → NSInteger change fixed a bug with popup menu positioning, but there was no associated warning or error. It's possible there are more such bugs that we haven't found yet!
2012-08-28 21:32:47 +02:00
Jacob Bandes-Storch
dfdde3283f Use 64-bit: explicit visibility where required 2012-08-28 21:32:47 +02:00
Jacob Bandes-Storch
db73ca4c92 Use 64-bit: stop using Carbon
As we are no longer using Carbon functions to set menu key equivalents, this means that bundle menu items which have the same key equivalents as main menu items will unfortunately not display their key equivalents in the menu.
2012-08-28 21:32:46 +02:00
Jacob Bandes-Storch
9584afba16 Use 64-bit: replace SELNAME with sel_getName 2012-08-28 21:32:46 +02:00
Jacob Bandes-Storch
b675c78909 Use libc++: avoid incomplete types where needed 2012-08-28 20:17:29 +02:00
Jacob Bandes-Storch
e3aa997b06 Use libc++: replace std::tr1 with std 2012-08-28 13:30:20 +02:00
Allan Odgaard
d956e8d7c0 Rewrote OakFileIconImage
There are mainly two reasons for this:

  1. Unexplained crashes (see issue #73).
  2. We were using lockFocus when getting the symbolic link arrow (from IconRef, as there seems to be no “modern” API to get this arrow) which caused a rasterization of the image.

The new implementation is much simpler, as all work happens in the image representation which does not have any (weak) pointer to its parent image.
2012-08-27 19:29:50 +02:00
Allan Odgaard
d1de4a8854 Use encoding::type for save related API
There is also a new document_t::encoding_for_save_as_path which returns the encoding that would be used for the document, if saved at the given path. If the document was loaded from disk, it will return the encoding used during load, otherwise it will check tmProperties for which encoding should be used for the path provided. Save dialog for untitled documents will be pre-populated with the result of the above function.
2012-08-26 16:13:20 +02:00
Allan Odgaard
19f1909ff3 Add menuForTabBarView: to delegate protocol 2012-08-25 17:42:13 +02:00
Allan Odgaard
81eda77ee2 Add tagForLayerContainingPoint:
This is meant for subclasses which need to translate an NSPoint to a layer and cannot rely on the normal handling of this in the superclass.
2012-08-25 17:41:09 +02:00
Allan Odgaard
7d93ed0028 Move rightMouseDown: to subclass
The problem is that when we implement rightMouseDown: then we won’t receive menuForEvent:, but some OakControl subclasses (like OakTabBarView) may want to show a context menu.
2012-08-25 16:04:02 +02:00
Allan Odgaard
aa06fa8b7b Add encoding options to Chinese localization
This isn’t localized.
2012-08-23 00:44:24 +02:00
Paul Wilde
cd84a864d2 Added Retina icons for bottom bar and file browser
As all the icons have been remade some of them should look better on non-retina also.

This closes issue #42.
2012-08-22 14:34:25 +02:00
Allan Odgaard
4e9d9414f1 Add encoding options to save dialogs
A minor caveat is that if there are encoding or newline (folder specific) settings in effect for the chosen path, these trump what’s selected in the save dialog.

If we wish to solve this, the best would be to update the options (shown in the save panel) based on selected folder/filename (and the settings in effect for that).

This closes issue #163.
2012-08-21 23:45:45 +02:00
Allan Odgaard
4606e4bca5 Simplify creating an OakEncodingPopUpButton
We now do the (sort of required) sizeToFit in the initializer. Users can still bypass this by using initWithFrame:pullsDown: instead of init:.
2012-08-20 22:36:12 +02:00
Paul Wilde
d947ec2467 Retina tab assets 2012-08-19 21:13:25 +02:00
Allan Odgaard
9366a1ec50 Cache image resources
This was also done prior to commit 806cb44. I just assumed that now that we are back using the system’s named image stuff, we would benefit from their cache, but clearly we are not (especially file browser seemed sluggish because of (re)loading the file type images).
2012-08-19 14:44:57 +02:00
Allan Odgaard
6677a9ce0a Remove unused NSImage category method 2012-08-19 01:31:47 +02:00
Allan Odgaard
806cb44b4b Support loading @2x image assets
Untested, but we now use imageForResource: (10.7) instead of constructing an absolute file path, so the system should take care of finding @2x assets.
2012-08-19 01:31:02 +02:00
jtbandes
7a56a801b6 Fix bundle menu items' appearance in the Help menu 2012-08-18 21:28:55 +02:00
Allan Odgaard
a2a0c187d4 Replace SetItemMark() with Cocoa code
Use of the (undocumented) NSMenuItemBullet was suggested by an Apple engineer and the consequences, if it is unavailable, are harmless.
2012-08-18 15:30:24 +02:00
Allan Odgaard
7cca8f3f4a Use Objective-C literals
This brings it in line with the rest of the source, which have embraced these.
2012-08-18 15:30:23 +02:00