From 52e896b136e6c3a06503487fb68751ad87fc6cb4 Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Sun, 12 Apr 2020 21:31:39 +0300 Subject: [PATCH 01/14] kit: core live repository file pattern has been added. --- GitUpKit/Core/GCLiveRepository.h | 2 ++ GitUpKit/Core/GCLiveRepository.m | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/GitUpKit/Core/GCLiveRepository.h b/GitUpKit/Core/GCLiveRepository.h index fa9bef96..2cafdcc0 100644 --- a/GitUpKit/Core/GCLiveRepository.h +++ b/GitUpKit/Core/GCLiveRepository.h @@ -99,6 +99,8 @@ extern NSString* const GCLiveRepositoryAmendOperationReason; @property(nonatomic, readonly) GCDiff* workingDirectoryStatus; // Nil on error @property(nonatomic, readonly) GCDiff* indexStatus; // Nil on error @property(nonatomic, readonly) NSDictionary* indexConflicts; // Nil on error +@property(nonatomic, copy) NSString *filePattern; +- (void)updateFilePattern:(NSString *)filePattern; @property(nonatomic, getter=areStashesEnabled) BOOL stashesEnabled; // Default is NO - Should be enabled *after* setting delegate so any error can be received @property(nonatomic, readonly) NSArray* stashes; // Nil on error diff --git a/GitUpKit/Core/GCLiveRepository.m b/GitUpKit/Core/GCLiveRepository.m index 5c39c340..9b61d465 100644 --- a/GitUpKit/Core/GCLiveRepository.m +++ b/GitUpKit/Core/GCLiveRepository.m @@ -629,7 +629,7 @@ - (void)_updateStatus:(BOOL)notify { CFAbsoluteTime time = CFAbsoluteTimeGetCurrent(); if (_statusMode == kGCLiveRepositoryStatusMode_Unified) { - unifiedDiff = [self diffWorkingDirectoryWithHEAD:nil + unifiedDiff = [self diffWorkingDirectoryWithHEAD:self.filePattern options:(self.diffBaseOptions | kGCDiffOption_IncludeUntracked | kGCDiffOption_FindRenames) maxInterHunkLines:_diffMaxInterHunkLines maxContextLines:_diffMaxContextLines @@ -639,13 +639,13 @@ - (void)_updateStatus:(BOOL)notify { } } else { XLOG_DEBUG_CHECK(_statusMode == kGCLiveRepositoryStatusMode_Normal); - indexDiff = [self diffRepositoryIndexWithHEAD:nil + indexDiff = [self diffRepositoryIndexWithHEAD:self.filePattern options:(self.diffBaseOptions | kGCDiffOption_FindRenames) maxInterHunkLines:_diffMaxInterHunkLines maxContextLines:_diffMaxContextLines error:&error]; if (indexDiff) { - workdirDiff = [self diffWorkingDirectoryWithRepositoryIndex:nil + workdirDiff = [self diffWorkingDirectoryWithRepositoryIndex:self.filePattern options:(self.diffBaseOptions | kGCDiffOption_IncludeUntracked) maxInterHunkLines:_diffMaxInterHunkLines maxContextLines:_diffMaxContextLines @@ -725,6 +725,15 @@ - (void)_updateStashes:(BOOL)notify { } } +#pragma mark - FilePattern +- (void)updateFilePattern:(NSString *)filePattern { + if ([self.filePattern isEqualToString:filePattern]) { + return; + } + self.filePattern = filePattern == nil ? nil : [NSString stringWithFormat:@"*%@*", filePattern]; + [self _updateStatus:YES]; +} + #pragma mark - Operations - (void)setUndoManager:(NSUndoManager*)undoManager { From 1506148a21cfbda7925812765bd9037530a832ad Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Wed, 2 Dec 2020 00:05:24 +0300 Subject: [PATCH 02/14] kit: advanced commit view controller search text field has been added. --- .../Views/GIAdvancedCommitViewController.m | 37 +++++++++++++++---- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/GitUpKit/Views/GIAdvancedCommitViewController.m b/GitUpKit/Views/GIAdvancedCommitViewController.m index f9afaa20..0ee98431 100644 --- a/GitUpKit/Views/GIAdvancedCommitViewController.m +++ b/GitUpKit/Views/GIAdvancedCommitViewController.m @@ -27,7 +27,7 @@ #import "GIWindowController.h" #import "XLFacilityMacros.h" -@interface GIAdvancedCommitViewController () +@interface GIAdvancedCommitViewController () @property(nonatomic, weak) IBOutlet GIColorView* workdirHeaderView; @property(nonatomic, weak) IBOutlet NSView* workdirFilesView; @property(nonatomic, weak) IBOutlet GIColorView* indexHeaderView; @@ -37,6 +37,7 @@ @interface GIAdvancedCommitViewController () Date: Wed, 15 Apr 2020 14:06:05 +0300 Subject: [PATCH 03/14] kit: advanced commit view controller reset search has been added. --- .../Views/GIAdvancedCommitViewController.m | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/GitUpKit/Views/GIAdvancedCommitViewController.m b/GitUpKit/Views/GIAdvancedCommitViewController.m index 0ee98431..8cf645c7 100644 --- a/GitUpKit/Views/GIAdvancedCommitViewController.m +++ b/GitUpKit/Views/GIAdvancedCommitViewController.m @@ -56,8 +56,16 @@ - (void)setupSearch { [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(textDidChange:) name:NSTextDidChangeNotification object:nil]; } +- (void)resetSearch { + [self.searchTextField setStringValue:@""]; + [self.repository updateFilePattern:nil]; +} + +- (void)unsetSearch { + [NSNotificationCenter.defaultCenter removeObserver:self]; +} + - (void)textDidChange:(NSNotification *)notification { - NSLog(@"NewValue: %@", self.searchTextField.stringValue); NSString *text = self.searchTextField.stringValue; if ([@"" isEqualToString:text]) { [self.repository updateFilePattern:nil]; @@ -123,6 +131,15 @@ - (void)viewDidDisappear { self.repository.statusMode = kGCLiveRepositoryStatusMode_Disabled; } +- (void)viewWillDisappear { + [super viewWillDisappear]; + [self resetSearch]; +} + +- (void)dealloc { + [self unsetSearch]; +} + #pragma mark - Repository Handling - (void)repositoryStatusDidUpdate { [super repositoryStatusDidUpdate]; From 234062fd8b8eb13266ee29bb54e60e5c0420d395 Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Wed, 2 Dec 2020 00:08:49 +0300 Subject: [PATCH 04/14] kit: advanced commit view controller search field has been moved to bottom left corner. --- GitUpKit/Views/GIAdvancedCommitViewController.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GitUpKit/Views/GIAdvancedCommitViewController.m b/GitUpKit/Views/GIAdvancedCommitViewController.m index 8cf645c7..54196d51 100644 --- a/GitUpKit/Views/GIAdvancedCommitViewController.m +++ b/GitUpKit/Views/GIAdvancedCommitViewController.m @@ -59,6 +59,8 @@ - (void)setupSearch { - (void)resetSearch { [self.searchTextField setStringValue:@""]; [self.repository updateFilePattern:nil]; + self.searchTextField.nextKeyView = self.messageTextView; + self.searchTextField.nextResponder = self.messageTextView; } - (void)unsetSearch { From d3fa64b0f35147b466c0dd56d1a1dce61d58f5ba Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Wed, 2 Dec 2020 00:10:47 +0300 Subject: [PATCH 05/14] kit: advanced commit view controller search field bugs have been fixed. --- .../Views/GIAdvancedCommitViewController.m | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/GitUpKit/Views/GIAdvancedCommitViewController.m b/GitUpKit/Views/GIAdvancedCommitViewController.m index 54196d51..7156ae9b 100644 --- a/GitUpKit/Views/GIAdvancedCommitViewController.m +++ b/GitUpKit/Views/GIAdvancedCommitViewController.m @@ -53,7 +53,7 @@ @implementation GIAdvancedCommitViewController { #pragma mark - Search - (void)setupSearch { - [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(textDidChange:) name:NSTextDidChangeNotification object:nil]; + self.searchTextField.delegate = self; } - (void)resetSearch { @@ -63,17 +63,16 @@ - (void)resetSearch { self.searchTextField.nextResponder = self.messageTextView; } -- (void)unsetSearch { - [NSNotificationCenter.defaultCenter removeObserver:self]; -} - -- (void)textDidChange:(NSNotification *)notification { - NSString *text = self.searchTextField.stringValue; - if ([@"" isEqualToString:text]) { - [self.repository updateFilePattern:nil]; - } - else { - [self.repository updateFilePattern:text]; +#pragma mark - NSControlTextEditingDelegate +- (void)controlTextDidChange:(NSNotification *)obj { + if (obj.object == self.searchTextField) { + NSString *text = self.searchTextField.stringValue; + if ([@"" isEqualToString:text]) { + [self.repository updateFilePattern:nil]; + } + else { + [self.repository updateFilePattern:text]; + } } } @@ -138,10 +137,6 @@ - (void)viewWillDisappear { [self resetSearch]; } -- (void)dealloc { - [self unsetSearch]; -} - #pragma mark - Repository Handling - (void)repositoryStatusDidUpdate { [super repositoryStatusDidUpdate]; From b994c248393cd6d26f1ecde0e47cef1b4cbcc5b4 Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Wed, 2 Dec 2020 00:13:24 +0300 Subject: [PATCH 06/14] kit: advanced commit view controller commit button has been disable during search. Tooltip has been added. --- .../Views/GIAdvancedCommitViewController.m | 44 ++++++++++++++----- 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/GitUpKit/Views/GIAdvancedCommitViewController.m b/GitUpKit/Views/GIAdvancedCommitViewController.m index 7156ae9b..4df401c7 100644 --- a/GitUpKit/Views/GIAdvancedCommitViewController.m +++ b/GitUpKit/Views/GIAdvancedCommitViewController.m @@ -57,22 +57,31 @@ - (void)setupSearch { } - (void)resetSearch { - [self.searchTextField setStringValue:@""]; - [self.repository updateFilePattern:nil]; - self.searchTextField.nextKeyView = self.messageTextView; - self.searchTextField.nextResponder = self.messageTextView; + self.searchTextField.stringValue = @""; + [self onSearchTextDidChange:self.searchTextField.stringValue]; +} + +- (void)onSearchTextDidChange:(NSString *)text { + BOOL isSearchDisabled = [@"" isEqualToString:text]; + if (isSearchDisabled) { + [self.repository updateFilePattern:nil]; + self.commitButton.toolTip = nil; + } + else { + [self.repository updateFilePattern:text]; + self.commitButton.toolTip = NSLocalizedString(@"Search in progress", nil); + } + [self _updateCommitButton]; +} + +- (BOOL)searchInProgress { + return self.repository.filePattern != nil; } #pragma mark - NSControlTextEditingDelegate - (void)controlTextDidChange:(NSNotification *)obj { if (obj.object == self.searchTextField) { - NSString *text = self.searchTextField.stringValue; - if ([@"" isEqualToString:text]) { - [self.repository updateFilePattern:nil]; - } - else { - [self.repository updateFilePattern:text]; - } + [self onSearchTextDidChange:self.searchTextField.stringValue]; } } @@ -147,7 +156,18 @@ - (void)repositoryStatusDidUpdate { } - (void)_updateCommitButton { - _commitButton.enabled = _indexStatus.modified || (self.repository.state == kGCRepositoryState_Merge) || self.amendButton.state; // Creating an empty commit is OK for a merge or when amending + _commitButton.enabled = + _indexStatus.modified + || (self.repository.state == kGCRepositoryState_Merge) + || self.amendButton.state; // Creating an empty commit is OK for a merge or when amending + _commitButton.enabled = _commitButton.enabled && !self.searchInProgress; + + if (self.searchInProgress) { + _commitButton.toolTip = NSLocalizedString(@"Search in progress", @""); + } + else { + _commitButton.toolTip = nil; + } } - (void)_reloadContents { From 68dd5da4f49bba28587d65d27b7b7d64e51344cc Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Wed, 2 Dec 2020 00:14:23 +0300 Subject: [PATCH 07/14] kit: advanced commit view controller commit button tooltip update has been removed from file pattern handler. --- GitUpKit/Views/GIAdvancedCommitViewController.m | 2 -- 1 file changed, 2 deletions(-) diff --git a/GitUpKit/Views/GIAdvancedCommitViewController.m b/GitUpKit/Views/GIAdvancedCommitViewController.m index 4df401c7..65f729d6 100644 --- a/GitUpKit/Views/GIAdvancedCommitViewController.m +++ b/GitUpKit/Views/GIAdvancedCommitViewController.m @@ -65,11 +65,9 @@ - (void)onSearchTextDidChange:(NSString *)text { BOOL isSearchDisabled = [@"" isEqualToString:text]; if (isSearchDisabled) { [self.repository updateFilePattern:nil]; - self.commitButton.toolTip = nil; } else { [self.repository updateFilePattern:text]; - self.commitButton.toolTip = NSLocalizedString(@"Search in progress", nil); } [self _updateCommitButton]; } From 5afa765755aabcae6016191401695ecdff1d7d55 Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Wed, 2 Dec 2020 00:46:37 +0300 Subject: [PATCH 08/14] kit: advanced commit view controller search text field placeholder has been added. --- GitUpKit/Views/GIAdvancedCommitViewController.m | 1 + 1 file changed, 1 insertion(+) diff --git a/GitUpKit/Views/GIAdvancedCommitViewController.m b/GitUpKit/Views/GIAdvancedCommitViewController.m index 65f729d6..7a286d00 100644 --- a/GitUpKit/Views/GIAdvancedCommitViewController.m +++ b/GitUpKit/Views/GIAdvancedCommitViewController.m @@ -54,6 +54,7 @@ @implementation GIAdvancedCommitViewController { #pragma mark - Search - (void)setupSearch { self.searchTextField.delegate = self; + self.searchTextField.placeholderString = NSLocalizedString(@"Filter files", nil); } - (void)resetSearch { From 3eaab1c0a1a0e11bf91fe36417bcc0d6296bbca5 Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Wed, 2 Dec 2020 00:46:55 +0300 Subject: [PATCH 09/14] kit: advanced commit view controller xib search text field has been added. --- .../GIAdvancedCommitViewController.xib | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/GitUpKit/Views/Base.lproj/GIAdvancedCommitViewController.xib b/GitUpKit/Views/Base.lproj/GIAdvancedCommitViewController.xib index eeeb1ec7..32fa1ec5 100644 --- a/GitUpKit/Views/Base.lproj/GIAdvancedCommitViewController.xib +++ b/GitUpKit/Views/Base.lproj/GIAdvancedCommitViewController.xib @@ -16,6 +16,7 @@ + @@ -123,9 +124,29 @@ - + + + + + + + + + + + + + + + + + + + + + From 200cfe3f14fc68f892110318af71e975e688a974 Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Wed, 2 Dec 2020 22:50:43 +0300 Subject: [PATCH 10/14] kit: preferences window controller xib commits enable filter in commit view option has been added. --- .../PreferencesWindowController.xib | 141 +++++++++++------- 1 file changed, 91 insertions(+), 50 deletions(-) diff --git a/GitUp/Application/Base.lproj/PreferencesWindowController.xib b/GitUp/Application/Base.lproj/PreferencesWindowController.xib index d6f7bc99..04f0a448 100644 --- a/GitUp/Application/Base.lproj/PreferencesWindowController.xib +++ b/GitUp/Application/Base.lproj/PreferencesWindowController.xib @@ -1,8 +1,8 @@ - + - + @@ -22,22 +22,22 @@ - + - - + + - + - + - + @@ -45,7 +45,7 @@ - + @@ -69,9 +69,9 @@ - + - + @@ -104,7 +104,7 @@ - + @@ -112,9 +112,9 @@ - + - + @@ -147,7 +147,7 @@ - + @@ -155,7 +155,7 @@ - + In "Simple" commit mode, GitUp unifies the working directory and index i.e. there is no staging area. @@ -181,7 +181,7 @@ You must close and reopen any opened repositories in GitUp after changing this s - + @@ -189,10 +189,10 @@ You must close and reopen any opened repositories in GitUp after changing this s - + + - + @@ -348,6 +365,7 @@ You must close and reopen any opened repositories in GitUp after changing this s + @@ -360,6 +378,7 @@ You must close and reopen any opened repositories in GitUp after changing this s + @@ -370,10 +389,10 @@ You must close and reopen any opened repositories in GitUp after changing this s - + - + @@ -381,10 +400,10 @@ You must close and reopen any opened repositories in GitUp after changing this s - + - + @@ -408,7 +427,7 @@ You must close and reopen any opened repositories in GitUp after changing this s - + @@ -416,10 +435,10 @@ You must close and reopen any opened repositories in GitUp after changing this s - + - + @@ -451,10 +470,10 @@ You must close and reopen any opened repositories in GitUp after changing this s - + - + @@ -477,7 +496,7 @@ You must close and reopen any opened repositories in GitUp after changing this s - + @@ -485,7 +504,7 @@ You must close and reopen any opened repositories in GitUp after changing this s - + @@ -493,10 +512,10 @@ You must close and reopen any opened repositories in GitUp after changing this s - + - + @@ -517,7 +536,7 @@ You must close and reopen any opened repositories in GitUp after changing this s - + @@ -535,7 +554,7 @@ You must close and reopen any opened repositories in GitUp after changing this s - + @@ -543,10 +562,10 @@ You must close and reopen any opened repositories in GitUp after changing this s - + - + @@ -627,11 +646,15 @@ You must close and reopen any opened repositories in GitUp after changing this s + + + + @@ -642,10 +665,28 @@ You must close and reopen any opened repositories in GitUp after changing this s - + + From 57df7793379ecdcade249723b865263fca93408f Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Wed, 2 Dec 2020 22:51:08 +0300 Subject: [PATCH 11/14] kit: advanced commit view controller xib commits enable filter in commit view option has been added. --- .../GIAdvancedCommitViewController.xib | 107 +++++++++++------- 1 file changed, 69 insertions(+), 38 deletions(-) diff --git a/GitUpKit/Views/Base.lproj/GIAdvancedCommitViewController.xib b/GitUpKit/Views/Base.lproj/GIAdvancedCommitViewController.xib index 32fa1ec5..faa5e4eb 100644 --- a/GitUpKit/Views/Base.lproj/GIAdvancedCommitViewController.xib +++ b/GitUpKit/Views/Base.lproj/GIAdvancedCommitViewController.xib @@ -104,50 +104,80 @@ - + - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NSNegateBoolean + + + + - - - - - - - + + + + + + + + + + + + + + + + + @@ -292,5 +322,6 @@ DQ + From 9e342cb4f302fc348d56b596636228dbd433dab1 Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Thu, 3 Dec 2020 13:09:07 +0300 Subject: [PATCH 12/14] kit: extensions view embedding has been added. --- GitUpKit/Extensions/NSView+Embedding.h | 16 +++++++++++ GitUpKit/Extensions/NSView+Embedding.m | 37 ++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 GitUpKit/Extensions/NSView+Embedding.h create mode 100644 GitUpKit/Extensions/NSView+Embedding.m diff --git a/GitUpKit/Extensions/NSView+Embedding.h b/GitUpKit/Extensions/NSView+Embedding.h new file mode 100644 index 00000000..6b2a76de --- /dev/null +++ b/GitUpKit/Extensions/NSView+Embedding.h @@ -0,0 +1,16 @@ +// +// NSView+Embedding.h +// GitUpKit (OSX) +// +// Created by Dmitry Lobanov on 06.04.2020. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NSView (Embedding) +- (void)embedView:(NSView *)view; +@end + +NS_ASSUME_NONNULL_END diff --git a/GitUpKit/Extensions/NSView+Embedding.m b/GitUpKit/Extensions/NSView+Embedding.m new file mode 100644 index 00000000..95cbbece --- /dev/null +++ b/GitUpKit/Extensions/NSView+Embedding.m @@ -0,0 +1,37 @@ +// +// NSView+Embedding.m +// GitUpKit (OSX) +// +// Created by Dmitry Lobanov on 06.04.2020. +// + +#import "NSView+Embedding.h" + +@implementation NSView (Embedding) +- (void)embedView:(NSView *)view { + [self.class embedView:view inView:self]; +} + ++ (void)embedView:(NSView *)view inView:(NSView *)superview { + [superview addSubview:view]; + view.translatesAutoresizingMaskIntoConstraints = NO; + + if (superview != nil && view != nil) { + if (@available(macOS 10.11, *)) { + NSArray *constraints = @[ + [view.leftAnchor constraintEqualToAnchor:superview.leftAnchor], + [view.topAnchor constraintEqualToAnchor:superview.topAnchor], + [view.bottomAnchor constraintEqualToAnchor:superview.bottomAnchor], + [view.rightAnchor constraintEqualToAnchor:superview.rightAnchor] + ]; + [NSLayoutConstraint activateConstraints:constraints]; + } else { + // Fallback on earlier versions + NSArray *verticalConstraints = [NSLayoutConstraint constraintsWithVisualFormat:@"V:|[view]|" options:0 metrics:nil views:@{@"view": view}]; + NSArray *horizontalConstraints = [NSLayoutConstraint constraintsWithVisualFormat:@"H:|[view]|" options:0 metrics:nil views:@{@"view": view}]; + NSArray *constraints = [[NSArray arrayWithArray:verticalConstraints] arrayByAddingObjectsFromArray:horizontalConstraints]; + [NSLayoutConstraint activateConstraints:constraints]; + } + } +} +@end From 63e508273079b5bc68729bc3c506e4168f8bcbdf Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Thu, 3 Dec 2020 13:09:12 +0300 Subject: [PATCH 13/14] kit: project has been updated. --- GitUpKit/GitUpKit.xcodeproj/project.pbxproj | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/GitUpKit/GitUpKit.xcodeproj/project.pbxproj b/GitUpKit/GitUpKit.xcodeproj/project.pbxproj index 51d02971..779d5d2a 100644 --- a/GitUpKit/GitUpKit.xcodeproj/project.pbxproj +++ b/GitUpKit/GitUpKit.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 0A5BF6A62578EFB300B98F4F /* NSView+Embedding.h in Headers */ = {isa = PBXBuildFile; fileRef = 0A5BF6A42578EFB200B98F4F /* NSView+Embedding.h */; }; + 0A5BF6A72578EFB300B98F4F /* NSView+Embedding.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A5BF6A52578EFB300B98F4F /* NSView+Embedding.m */; }; 0AC8525923A122C400479160 /* GILaunchServicesLocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0AC8525723A122C400479160 /* GILaunchServicesLocator.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0AC8525A23A122C400479160 /* GILaunchServicesLocator.m in Sources */ = {isa = PBXBuildFile; fileRef = 0AC8525823A122C400479160 /* GILaunchServicesLocator.m */; }; 1DF371CD22F5262300EF7BD9 /* GCLiveRepository+Utilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 1DF371CB22F5262300EF7BD9 /* GCLiveRepository+Utilities.h */; }; @@ -427,6 +429,8 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 0A5BF6A42578EFB200B98F4F /* NSView+Embedding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSView+Embedding.h"; sourceTree = ""; }; + 0A5BF6A52578EFB300B98F4F /* NSView+Embedding.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSView+Embedding.m"; sourceTree = ""; }; 0AC8525723A122C400479160 /* GILaunchServicesLocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GILaunchServicesLocator.h; sourceTree = ""; }; 0AC8525823A122C400479160 /* GILaunchServicesLocator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GILaunchServicesLocator.m; sourceTree = ""; }; 1DF371CB22F5262300EF7BD9 /* GCLiveRepository+Utilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GCLiveRepository+Utilities.h"; sourceTree = ""; }; @@ -870,6 +874,8 @@ E2735B2119FF763300ED0CC4 /* Extensions */ = { isa = PBXGroup; children = ( + 0A5BF6A42578EFB200B98F4F /* NSView+Embedding.h */, + 0A5BF6A52578EFB300B98F4F /* NSView+Embedding.m */, E259C2D41A64FAA40079616B /* GCHistory+Rewrite-Tests.m */, E2D414891A02D68700B99634 /* GCHistory+Rewrite.h */, E2D4148A1A02D68700B99634 /* GCHistory+Rewrite.m */, @@ -1187,6 +1193,7 @@ E267E2281B84DBE700BAB377 /* GIWindowController.h in Headers */, E267E2361B84DC3900BAB377 /* GICommitListViewController.h in Headers */, E267E2371B84DC3900BAB377 /* GIDiffContentsViewController.h in Headers */, + 0A5BF6A62578EFB300B98F4F /* NSView+Embedding.h in Headers */, E267E2381B84DC3900BAB377 /* GIDiffFilesViewController.h in Headers */, E267E2391B84DC3900BAB377 /* GISnapshotListViewController.h in Headers */, 1DF371CD22F5262300EF7BD9 /* GCLiveRepository+Utilities.h in Headers */, @@ -1470,6 +1477,7 @@ E267E1D11B84D83100BAB377 /* GCBranch.m in Sources */, E267E1D21B84D83100BAB377 /* GCCommit.m in Sources */, E267E1D31B84D83100BAB377 /* GCCommitDatabase.m in Sources */, + 0A5BF6A72578EFB300B98F4F /* NSView+Embedding.m in Sources */, E267E1D41B84D83100BAB377 /* GCDiff.m in Sources */, E267E1D51B84D83100BAB377 /* GCFoundation.m in Sources */, E267E1D61B84D83100BAB377 /* GCFunctions.m in Sources */, From 61cec06bbd1d37e0e4c9f633d9173c18f1bc3f8c Mon Sep 17 00:00:00 2001 From: Dmitry Lobanov Date: Thu, 3 Dec 2020 13:10:47 +0300 Subject: [PATCH 14/14] kit: advanced commit view controller index files view controller layout has been fixed. --- GitUpKit/Views/GIAdvancedCommitViewController.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GitUpKit/Views/GIAdvancedCommitViewController.m b/GitUpKit/Views/GIAdvancedCommitViewController.m index 7a286d00..c6ece9cc 100644 --- a/GitUpKit/Views/GIAdvancedCommitViewController.m +++ b/GitUpKit/Views/GIAdvancedCommitViewController.m @@ -25,6 +25,9 @@ #import "GIColorView.h" #import "GIInterface.h" #import "GIWindowController.h" + +#import "NSView+Embedding.h" + #import "XLFacilityMacros.h" @interface GIAdvancedCommitViewController () @@ -102,7 +105,7 @@ - (void)loadView { _indexFilesViewController.delegate = self; _indexFilesViewController.allowsMultipleSelection = YES; _indexFilesViewController.emptyLabel = NSLocalizedString(@"No changes in index", nil); - [_indexFilesView replaceWithView:_indexFilesViewController.view]; + [_indexFilesView embedView:_indexFilesViewController.view]; _diffContentsViewController = [[GIDiffContentsViewController alloc] initWithRepository:self.repository]; _diffContentsViewController.delegate = self;