Commit Graph

147 Commits

Author SHA1 Message Date
Allan Odgaard
5d08404136 Update OakPasteboard to use “new” Objective-C run-time features 2014-02-10 14:41:37 +07:00
Allan Odgaard
7a7107d69a Factor out OakScopeBarView 2014-02-06 20:20:55 +07:00
Adam Strzelecki
875a470cc1 Fix file browser height for tabs above document
This fixes regression caused by 1de5d90475 that
divider height and default compression priority disallowed expected height.
2014-01-09 14:34:30 +07:00
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
1f61b628b3 Use new safeObjectAtIndex method
Also removed the static SafeObjectAtIndex mehtod in OakTabBarView
2013-12-22 23:30:29 -05:00
Adam Strzelecki
2a6b37c1a3 Remember window zoom state and regular window frame
This fixed problem when closing TM2 with zoomed window, then unzooming window
after restart caused invalid window placement.
2013-12-03 09:50:39 +07:00
Allan Odgaard
6a0ab432cb Show warning if undo will delete non-empty document
Closes #1197
2013-11-15 13:53:04 +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
03c91f5ab7 Add assertion 2013-10-31 17:27:15 +01:00
Allan Odgaard
81006920c2 Simplify binding setup for encoding pop-up button 2013-10-06 23:09:12 +02:00
Allan Odgaard
a2131a6472 Add two-way binding support to OakEncodingPopUpButton
Previously binding to the view’s encoding property would not update the bound object when the view changed its value.
2013-10-04 16:53:50 +02:00
Allan Odgaard
72791ce406 Update last effective tab when number of tabs change
Closes #1120
2013-09-15 21:32:15 +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
aa24f237c6 Make last effective (proxy) tab sticky
When the tab bar overflows and the selected tab would normally be rendered outside the visible area, we use the last visible tab as a proxy. With this commit, the last visible tab keeps showing the document if switching to another (visible) tab.
2013-09-05 17:26:48 +02:00
Allan Odgaard
e4e80a946c Use std::make_shared 2013-09-03 12:27:20 +02:00
Ronald Wampler
e631068c56 Show a chevron menu button when tab bar overflows
The behavior is based on Safari where last visible tab is swapped with the selected tab, if selected tab itself would not be visible.

Commit edited by Allan Odgaard, original version used document icons in overflow menu and would make the effective last tab sticky.

Closes #1060
2013-09-03 10:37:43 +02:00
Allan Odgaard
61bb49ad6e File browser icon bindings were semi-case-sensitive
We compared the lowercased extension or file name with the case-preserved entry in the bindings.plist file, meaning e.g. ‘Makefile’ never got the intended icon.
2013-07-21 13:25:26 +02:00
Allan Odgaard
b8b00b5fe8 Make OakCreateCheckBox a public function 2013-06-27 23:26:46 +02:00
Allan Odgaard
9638e4b70c Allow setting arbitrary activation strings for menu items
The implementation is presently geared toward only setting various activation strings, as unsetting e.g. a key equivalent won’t restore a potential (previously set) tab trigger etc.
2013-06-23 11:23:42 +07:00
Allan Odgaard
44ce84f79c Support setting menu item’s modified state to NO 2013-06-23 11:23:42 +07:00
Allan Odgaard
6c6aadc38b Make labels right-aligned by default 2013-06-17 12:36:27 +07:00
Allan Odgaard
8fc7567e2e Use new focus ring API (10.7) 2013-04-21 18:27:25 +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
Boris Dušek
95ce9d5197 Post AXValueChanged when changing selected tab
If this is on, then VoiceOver reads the name of the new tab being
switched to, enabling easier navigation between open tabs.
2013-04-01 13:22:41 +07:00
Allan Odgaard
d54bf55dc0 Don’t show “pop-out” animation for empty rects
Fixes #833.
2013-03-26 17:54:59 +01:00
Allan Odgaard
4937b51d02 Show warning when undo deletes non-empty folder
Closes issue #782.
2013-03-26 17:41:51 +01:00
Michael Sheets
9da5b345d3 Use the systemFontSize for labels, add function for small controls
Before labelFontSize was used for all controls, as the label size should match the control size we need to have different functions for each control size.
2013-03-22 12:31:36 +01:00
Jacob Bandes-Storch
fa4d14732b Improve tooltip positioning for multiple screens 2013-03-21 11:41:31 +01:00
Allan Odgaard
04e8eb44a2 Introduce updateTitle: for NSMenuItem
Since we create an attributed title when the menu item has a tab trigger or “inactive” key equivalent, we can’t later update the title via the title property.
2013-03-16 17:49:48 +01:00
Allan Odgaard
6ac4aab910 Use custom menu item title for key equivalents
The rendering doesn’t mimic the system 100%, for example the key equivalents are not centered on the split between modifiers and the key, nor are F-keys rendered using a smaller font / menu glyph.

On the plus side though, now all keys are rendered. Previously keys shared with other (non bundle) menu items would only be shown for one of the items sharing the key, and some keys would simply not be shown (e.g. ⌃#).

Also, bundle menu items no longer “eclipse” regular menu items, which could previously happen even when the bundle menu item wouldn’t fire (as it was scoped for something else than the current context).

Fixes #894.
2013-03-14 10:14:46 +01:00
Allan Odgaard
d8cf1e3591 Gather UI construction code and harmonize fonts 2013-03-13 12:38:11 +01:00
Allan Odgaard
46fc5430c7 Remove Objective-C smart pointer
Not necessary now that we have ARC.
2013-03-10 16:11:26 +01:00
Allan Odgaard
96784e9fee ARC: Update OakAppKit framework 2013-03-10 16:11:26 +01:00
Allan Odgaard
694b670413 Remove OakStatusBar 2013-03-10 16:11:26 +01:00
Allan Odgaard
2b0acf9677 Remove isDark NSColor category method 2013-03-10 16:11:25 +01:00
Allan Odgaard
13edc6d131 Use O_CLOEXEC when opening files
This avoids leaking file descriptors into child processes, which would otherwise happen if another thread forks while the file descriptor is open.
2013-03-10 16:07:10 +01:00
Allan Odgaard
d92a4ee286 Range check for ⌘1-n should include ⌘0 2013-03-10 16:07:09 +01:00
Allan Odgaard
8041b71d98 fixup! Exclude file browser width from new windows’ width 2013-02-22 15:51:03 +01:00
Allan Odgaard
cbb0a7864d Drop ‘ng’ namespace for scm 2013-02-21 17:39:55 +01:00
Allan Odgaard
0d8ccd17f0 Exclude file browser width from new windows’ width
Closes #679.
2013-02-19 22:08:13 +01:00
Allan Odgaard
63beedc6f4 Handle ⌥⌘⇠ / ⌥⌘⇢ in main menu subclass
This means they work (as alternatives for ⌘[ / ⌘]) in all windows with tabs.

We now also trigger menu-flashing for when pressing the keys.
2013-02-18 15:38:26 +01:00
Allan Odgaard
f0523c3b43 Only update Go To Tab on ⌘1-n
It’s expensive to update this menu since we use (uncached) file icons. Always updating it had a noticeable performance effect on caret movement.
2013-02-18 15:38:26 +01: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
52ba0cb5c2 Add file manager support for ‘new file’ 2013-02-15 15:27:57 +01:00
Allan Odgaard
72d0b9757b Post OakFileManagerWillDeleteItemAtPath 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
b37b56075a Call super in viewWillMoveToWindow: 2013-02-14 11:31:20 +01:00
Allan Odgaard
8987a7528f Use generic file/folder icon when OakFileIconImage.path == nil 2013-02-11 14:21:20 +01:00