Commit Graph

152 Commits

Author SHA1 Message Date
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
019c911e9a Use tree structure icon for ragel, protobuf, and cap’n proto 2013-08-18 17:29:29 +02:00
Allan Odgaard
281f5075e1 Update OakAppKit tests for new conventions 2013-08-01 19:05:39 +02:00
Allan Odgaard
0afa234ee6 Add new file types
This includes a new “braces” icon for use in the file browser, presently only used by ‘.go’ files.
2013-07-21 13:25:27 +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
8313dcb407 Remove status bar graphics
This is no longer used since the OakStatusBar class has already been deleted.
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
Adam Strzelecki
6ed3c93872 Lighter tab bar background for better readibility 2013-03-04 10:22:54 +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
Michael Sheets
a9d80f5a0d Increase tab bar size one pixel
This is to match the minimum allowed size for the sidebar header when the tabs above document is enabled, also matches the height of the forthcoming tab redesign.
2013-02-09 16:34:24 +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
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
67af1bc7fe Make divider lines opaque
Without this, it is possible to move the window when clicking directly on the line (since none of the parent views are opaque).
2013-02-06 16:43:40 +01:00
Allan Odgaard
22465873ac Handle case changes on insensitive file systems
NSFileManager only provide a move function which fails with “file exists” if we make case changes on a case-insensitive file system, therefor we now explicitly test for that error and use <x-man-page://2/rename> if the source and destination refer to the same file, but the path differ.

Fixes #769.
2013-02-06 14:50:05 +01:00
Allan Odgaard
63c0300ed8 Post “directory did change” notifications
This is both to speedup file browser updates (as there is a bit of lag waiting for fs-events) and to work with file systems that doesn’t support fs-events (issue #745).
2013-02-06 14:50:04 +01:00
Allan Odgaard
37f130fe42 Don’t set gradient view as opaque
This is so that a potential NSTextField will correctly render itself as inactive when using NSBackgroundStyleRaised.
2013-02-06 14:50:04 +01:00
Michael Sheets
a6f0b75d4c Use correct syntax for including local headers 2013-02-05 08:36:04 +01:00