119 Commits

Author SHA1 Message Date
Allan Odgaard
97caab644a Remove deployment target from all xib files
We pass --minimum-deployment-target to ibtool so having the deployment target in the xib is redundant.

Furthermore, it appears that when building on macOS 11, a directory will be created for xib files when they:

1. Are a custom view (as opposed to a window)
2. Contains a deployment target
3. Contains a table view

Therefore, to successfully build on macOS 11 we cannot set deployment target for xib files meeting the above 3 criteria, which is easier when we only set the target in one place, instead of every single xib.

Thanks to Kevin Sjöberg for helping track this down.
2021-05-26 09:45:39 +02:00
Allan Odgaard
866ae0f770 Add TMFileReference framework
The motivation is to have a universal type for a file that knows whether or not the file is open/modified, if it has SCM status, what icon to use for the file, and supporting bindings for the latter (incase icon is updated).

This does sound like a “document” but there are many places where we just want to show a file icon (with SCM and “modified” status) without instantiating a full document, for example folder pop-up menus.

We would also like a way to “close” the file, incase it is open, for example from file browser or “open quickly”, which is not really a document action per se, furthermore, we may delete the file from the file browser, which again, is more of a file than document action, but if the file is “open” somewhere, it should be notified about the delete operation.
2021-05-17 21:19:18 +02:00
Allan Odgaard
7f9fe4cd90 Change NSCompositingOperationSourceOver to NSCompositingOperationCopy
This is when we know the destination is “empty”, so we might as well pick the simpler copy operation.
2021-03-25 08:20:35 +01:00
Allan Odgaard
b2b4d12009 Add some left padding to icons in bundle editor 2021-03-07 13:44:43 +01:00
Allan Odgaard
20e3444d16 Clip NSBrowser border in bundle editor on macOS 10.15 and earlier 2021-03-07 13:44:43 +01:00
Allan Odgaard
eb2c26a88f Collapse the browser in the bundle editor when its height gets below 50 2021-03-07 12:14:34 +01:00
Allan Odgaard
8496e62f3a Use split view in bundle editor between properties and editor 2021-03-07 12:12:43 +01:00
Allan Odgaard
fed09bd6dc Add bundle editor views directly to the properties container view
There was no reason for the extra subview.
2021-03-07 11:47:58 +01:00
Allan Odgaard
ae34471c95 Set default split view position after restoring window frame size
We set the default position to a fraction of the split view height (rather than absolute value), so this is only if scaling is not done proportionally, and only when there is no saved split view size.
2021-03-07 11:42:26 +01:00
Allan Odgaard
f043952b4b Use “pane splitter divider” between bundle editor text view and browser 2021-03-07 11:39:57 +01:00
Allan Odgaard
9a416e5386 Ensure we do not mutate array while performing fast enumeration 2021-03-07 11:37:46 +01:00
Allan Odgaard
651db91d05 Update resizing mask for bundle editor nibs
They are now all set to have resizable width.
2021-03-07 10:01:47 +01:00
Allan Odgaard
94d3b9b670 Remove old build files 2021-02-15 16:01:50 +01:00
Allan Odgaard
f7d765ba0e Add build files (for new build system) 2021-02-15 16:01:50 +01:00
Allan Odgaard
a3a6b2ac88 No longer use drawer for properties in bundle editor
The drawer interface component is deprecated and does not fully support Dark Mode.
2021-02-09 11:15:51 +01:00
Allan Odgaard
0695ec5a5b Rename property from indent to labelWidth
The latter is a more appropriate description of the property.
2021-02-09 11:15:51 +01:00
Allan Odgaard
8d63cfb5c8 Create bundle editor window in code
When building on macOS 10.15, the split view will show the NSBrowser split as collapsed and not allow the user to resize it, though only when running the build on macOS 10.14 or earlier.
2021-02-09 11:15:51 +01:00
Allan Odgaard
8e6c60d013 build: Remove Info.plist files from frameworks
These were previously required when we built frameworks as dynamically linked, but the files are now explicitly ignored by our build system.
2021-01-24 10:37:22 +01:00
Allan Odgaard
c93030b385 Remove all debug output from custom log macros
This provided value during early development, but has been unused for years, and it would generate too much noise if converted to os_log.

So better to just remove it all and add os_log statements as needed.
2020-06-05 21:22:50 +07:00
Allan Odgaard
4ec10c0923 Don’t annotate types and classes with PUBLIC
This was required when we linked each framework as its own thing, which we do not do anymore, and if we do go back to this system, we can simply have symbols public by default.
2020-06-05 21:22:50 +07:00
Allan Odgaard
caaa36161d Change most fprintf log statements to using os_log 2020-05-04 19:20:04 +07:00
Allan Odgaard
b514114ec7 Access most system singletons using dot syntax
These are identified by having a prefix of shared, default, or standard in the class method.
2020-04-23 12:25:11 +07:00
Allan Odgaard
814a3c78b4 Access sharedInstance using dot syntax 2020-04-23 12:25:11 +07:00
Allan Odgaard
715d023673 Declare “sharedInstance” as a class property 2020-04-23 12:25:11 +07:00
Allan Odgaard
8f3f3d9d16 Update deployment version for xibs to 10.12
This was done using search and replace. Presumably it should be done in Xcode so that it can adjust the xib for the new deployment target, otherwise what is the point of storing deployment version in the xib and provide it as a command line argument to the xib compiler as well (only to get a warning if the versions do not match)?
2019-07-07 18:03:30 +02:00
Allan Odgaard
1ef78b3af7 Rename symbols to what’s expected by the 10.14 SDK 2019-06-29 20:14:15 +02:00
Allan Odgaard
5aa58e5543 Do not include $APP_NAME in framework’s bundle identifier
Since we have multiple application targets, it doesn’t make sense with a global APP_NAME variable.

Though if building the frameworks as standalone bundles and embedding them in different applications, we may need some sort of unique component in the bundle identifier, but we currently do not do this (they are all statically linked, so the Info.plist is currently unused).
2019-06-26 23:32:54 +02:00
Allan Odgaard
432d6ba604 Use tertiaryLabelColor for disabled bundle items in bundle editor 2018-11-20 22:21:50 +07:00
Allan Odgaard
82de01589f Update deployment target of all xib files to 10.10 2018-10-30 13:46:34 +07:00
Allan Odgaard
f6fa273912 Update coding style for where to place colon after dictionary keys
This follows the Swift style and also makes it possible to align dictionary values using TextMate’s Align Assignments command.
2018-10-07 09:54:45 +02:00
Allan Odgaard
e9bf48fbc0 Use controlTextColor (instead of blackColor) in a few places 2018-10-06 10:46:53 +02:00
Allan Odgaard
4d86258e47 Use new alert style enumeration names (10.12) 2017-05-31 21:58:31 +02:00
Ronald Wampler
038acacca9 Avoid use of NSRunAlertPanel (10.9)
Although this is actually deprecated in 10.10, new APIs are available in 10.9 and it will make addressing deprecation warnings when upgrading to 10.10 easier.
2017-05-31 21:58:31 +02:00
Ronald Wampler
42654ff283 Use appropriate enum case for NSSavePanel and NSOpenPanel result (10.9) 2017-05-31 10:03:41 +02:00
Ronald Wampler
30891b1a62 Remove OakShowAlertForWindow wrapper (10.9) 2017-05-31 10:03:41 +02:00
Ronald Wampler
dfc9db4413 Use our NSAlert category method for creating NSAlert objects 2017-05-31 10:03:41 +02:00
Ronald Wampler
9fae8a3192 Update deployment target to 10.9 for all xib files 2017-05-31 10:03:41 +02:00
Allan Odgaard
9d980a07df Remove NSPrincipalClass from framework bundles’s Info.plist
This is not something which is used anywhere and a few of the frameworks does not have a principal class.
2016-10-31 17:30:30 +07:00
Allan Odgaard
b5bbb46dfb Let bundle editor use OakDocumentController API 2016-09-24 08:33:33 +02:00
Allan Odgaard
7cc017f343 Harmonize all implementations of sharedInstance 2016-09-19 12:54:19 +02:00
Allan Odgaard
553e89ceb6 Update include statements and link declarations 2016-09-11 12:47:39 +02:00
Allan Odgaard
da5fdd78a8 Remove document_t from OakDocumentView
This also updates the commit window to only use OakDocument API.

The bundle editor and document controller still require updating.
2016-09-11 08:49:32 +02:00
Allan Odgaard
ab80413f21 Move bundle editor’s instance variables to implementation file 2016-09-11 08:47:37 +02:00
Allan Odgaard
ebf6ae9346 Rename document property to cppDocument as intermediate refactoring step 2016-09-11 08:43:46 +02:00
Jacob Bandes-Storch
52b43f17ed Add bundle editor menu item to copy item UUID 2016-09-04 20:57:18 +02:00
Jacob Bandes-Storch
1e440b3f99 Enable bundle editor window’s document icon 2016-09-04 20:17:42 +02:00
Allan Odgaard
0e70b95dbb Commands run from bundle editor lacked variables from the OakTextView 2016-08-29 21:41:34 +02:00
Allan Odgaard
a8fa7383b5 Calling revealBundleItem: without an item is now a no-op 2016-08-22 16:14:36 +02:00
Allan Odgaard
78b528f299 Update LINK dependencies in target files 2016-06-29 11:37:27 +02:00
Allan Odgaard
990f972a04 Remove use of @synthesize in bundle editor code 2016-06-22 20:44:41 +02:00