Refactor the document window controller and the prefs controller. Some regression still in there.

This commit is contained in:
Damiano Galassi committed 2018-02-08 17:50:39 +01:00
1 parent cd27e2ce52
commit 94f5f85124
49 files changed
+2505 -2379

No files matched your search

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="13528" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14087.3" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="13528"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14087.3"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -19,7 +19,6 @@
<subviews>
<tabView controlSize="small" translatesAutoresizingMaskIntoConstraints="NO" id="5">
<rect key="frame" x="-11" y="-12" width="502" height="279"/>
<tabViewItems/>
</tabView>
</subviews>
<constraints>
@@ -7,7 +7,7 @@
import Cocoa
@objc(SBChapterViewController) class ChapterViewController : NSViewController, NSTableViewDataSource, NSTableViewDelegate {
class ChapterViewController : NSViewController, NSTableViewDataSource, NSTableViewDelegate {
var track: MP42ChapterTrack {
didSet {
@@ -22,7 +22,7 @@ import Cocoa
return NSNib.Name(rawValue: "ChapterView")
}
@objc init(track: MP42ChapterTrack) {
init(track: MP42ChapterTrack) {
self.track = track
super.init(nibName: nil, bundle: nil)
}
@@ -31,8 +31,8 @@ import Cocoa
fatalError("init(coder:) has not been implemented")
}
override func loadView() {
super.loadView()
override func viewDidLoad() {
super.viewDidLoad()
tableView.defaultEditingColumn = 1
tableView.doubleAction = #selector(doubleClickAction(_:))
}
@@ -9,11 +9,11 @@ import Cocoa
class MultiSelectViewController : NSViewController {
@objc var numberOfTracks: UInt = 0
var numberOfTracks: UInt = 0
@IBOutlet var label: NSTextField!
override func loadView() {
super.loadView()
override func viewDidLoad() {
super.viewDidLoad()
if numberOfTracks == 1 {
label.stringValue = NSLocalizedString("1 track selected", comment: "")
+2 -2
View File
@@ -70,9 +70,9 @@ static NSArray<NSArray *> *_mediaKinds;
}
}
- (void)loadView
- (void)viewDidLoad
{
[super loadView];
[super viewDidLoad];
_ratings = MP42Ratings.defaultManager.ratings;
+2 -2
View File
@@ -128,9 +128,9 @@ static NSString *getColorProfileName(uint16_t colorPrimaries,
return [NSString stringWithFormat:@"%d-%d-%d", colorPrimaries, transferCharacteristics, matrixCoefficients];
}
- (void)loadView
- (void)viewDidLoad
{
[super loadView];
[super viewDidLoad];
_mediaTagsController = [[SBMediaTagsController alloc] initWithTrack:track];
@@ -7,7 +7,7 @@
import Cocoa
@objc(SBSoundViewController) class SoundViewController : NSViewController {
class SoundViewController : NSViewController {
let track: MP42AudioTrack
let file: MP42File
@@ -24,7 +24,7 @@ import Cocoa
return NSNib.Name(rawValue: "SoundView")
}
@objc init(mp4: MP42File, track: MP42AudioTrack) {
init(mp4: MP42File, track: MP42AudioTrack) {
self.file = mp4
self.track = track
self.mediaTagsController = SBMediaTagsController(track: track)
@@ -36,8 +36,8 @@ import Cocoa
fatalError("init(coder:) has not been implemented")
}
override func loadView() {
super.loadView()
override func viewDidLoad() {
super.viewDidLoad()
// Media Tags controls
mediaTagsController.view.frame = mediaTagsView.bounds