Skip to content

Commit

Permalink
Merge pull request MediaArea#479 from g-maxime/cocoa-fixes-2
Browse files Browse the repository at this point in the history
Cocoa GUI: Small fixes
  • Loading branch information
JeromeMartinez authored Oct 21, 2020
2 parents 8ae35d5 + 41cf0c8 commit 2549689
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Source/GUI/Cocoa/English.lproj/TreeView.xib
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@
<subviews>
<outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" multipleSelection="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" headerView="Ky1-rw-8tj" indentationPerLevel="16" autoresizesOutlineColumn="YES" outlineTableColumn="LRh-qX-GDO" id="45J-rW-6RQ">
<rect key="frame" x="0.0" y="0.0" width="478" height="246"/>
<autoresizingMask key="autoresizingMask"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn editable="NO" width="200" minWidth="40" maxWidth="1000" id="LRh-qX-GDO">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Field">
<font key="font" metaFont="smallSystem"/>
<font key="font" metaFont="controlContent" size="11"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="41r-Rp-xrS">
<textFieldCell key="dataCell" selectable="YES" editable="YES" title="Text Cell" id="41r-Rp-xrS">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -48,11 +48,11 @@
</tableColumn>
<tableColumn editable="NO" width="271" minWidth="40" maxWidth="10000" id="iAe-Hy-FZv">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Value">
<font key="font" metaFont="smallSystem"/>
<font key="font" metaFont="controlContent" size="11"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<textFieldCell key="dataCell" lineBreakMode="truncatingTail" selectable="YES" editable="YES" title="Text Cell" id="LqZ-Y9-Pg4">
<textFieldCell key="dataCell" selectable="YES" editable="YES" title="Text Cell" id="LqZ-Y9-Pg4">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand Down
2 changes: 1 addition & 1 deletion Source/GUI/Cocoa/MediaInfo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
025E200E236C705D0000571F /* ProgressDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = 025E200D236C705D0000571F /* ProgressDialog.m */; };
0265BEE02330202C00BC2891 /* ProgressDialog.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0265BEDD2330202C00BC2891 /* ProgressDialog.xib */; };
026C61CE22A86824000D5045 /* MacCompare.png in Resources */ = {isa = PBXBuildFile; fileRef = 026C61CD22A86823000D5045 /* MacCompare.png */; };
0291B616230EC397006920BA /* CloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0291B615230EC396006920BA /* CloudKit.framework */; };
0291B616230EC397006920BA /* CloudKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0291B615230EC396006920BA /* CloudKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
0299EC64227C966B00D937F6 /* CompareView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0299EC62227C966B00D937F6 /* CompareView.xib */; };
0299EC67227C971400D937F6 /* CompareView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0299EC66227C971400D937F6 /* CompareView.m */; };
0299EC70228E028E00D937F6 /* TreeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0299EC6E228E028E00D937F6 /* TreeView.xib */; };
Expand Down
4 changes: 3 additions & 1 deletion Source/GUI/Cocoa/MyWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ - (IBAction)openFile:(id)sender {
NSOpenPanel *openPanel = [NSOpenPanel openPanel];
[openPanel setCanChooseDirectories:YES];
[openPanel setAllowsMultipleSelection:YES];
[openPanel setCanDownloadUbiquitousContents:NO];
if (@available(macOS 10.10, *)) {
[openPanel setCanDownloadUbiquitousContents:NO];
}
[openPanel beginSheetModalForWindow:[self window] completionHandler:^(NSInteger result){
if(result == NSFileHandlingPanelOKButton) {
[self processFiles:[openPanel URLs]];
Expand Down
2 changes: 2 additions & 0 deletions Source/GUI/Cocoa/TreeView.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
*/

#import <Cocoa/Cocoa.h>
#import "TreeOutlineDelegate.h"
#import "oMediaInfoList.h"

NS_ASSUME_NONNULL_BEGIN

@interface TreeView : NSView <NSOutlineViewDataSource>{
NSMutableArray *fields;
TreeOutlineDelegate *delegate;
}
@property (strong) IBOutlet NSView *contentView;
@property (strong) IBOutlet NSOutlineView *outlineView;
Expand Down
9 changes: 9 additions & 0 deletions Source/GUI/Cocoa/TreeView.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ -(void)initialize {
_files = nil;
_index = -1;
[self loadNib];

delegate = [[TreeOutlineDelegate alloc] init];

[_outlineView setDataSource:self];
[_outlineView setDelegate:delegate];
}

-(void)dealloc {
[delegate release];
[super dealloc];
}

-(instancetype)initWithCoder:(NSCoder *)decoder {
Expand Down

0 comments on commit 2549689

Please sign in to comment.