Revision: 14021
http://sourceforge.net/p/skim-app/code/14021
Author: hofman
Date: 2024-01-28 23:02:42 +0000 (Sun, 28 Jan 2024)
Log Message:
-----------
bind find field dirrectly to controller, no need anymore for object controller
Modified Paths:
--------------
trunk/Base.lproj/FindBar.xib
trunk/SKFindController.h
trunk/SKFindController.m
trunk/SKMainWindowController.m
Modified: trunk/Base.lproj/FindBar.xib
===================================================================
--- trunk/Base.lproj/FindBar.xib 2024-01-26 10:22:57 UTC (rev 14020)
+++ trunk/Base.lproj/FindBar.xib 2024-01-28 23:02:42 UTC (rev 14021)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0"
toolsVersion="19162" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"
useAutolayout="YES">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0"
toolsVersion="19529" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"
useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin"
version="19162"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin"
version="19529"/>
<capability name="documents saved in the Xcode 8 format"
minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -12,7 +12,6 @@
<outlet property="findField" destination="3" id="11"/>
<outlet property="messageField" destination="31" id="33"/>
<outlet property="navigationButton" destination="5" id="34"/>
- <outlet property="ownerController" destination="18" id="23"/>
<outlet property="view" destination="1" id="2"/>
</connections>
</customObject>
@@ -34,9 +33,9 @@
</searchFieldCell>
<connections>
<action selector="find:" target="-2" id="30"/>
- <binding destination="18" name="value"
keyPath="selection.findString" id="35">
+ <binding destination="-2" name="value"
keyPath="findString" id="5kD-h6-Ny3">
<dictionary key="options">
- <integer key="NSContinuouslyUpdatesValue"
value="1"/>
+ <bool key="NSContinuouslyUpdatesValue"
value="YES"/>
</dictionary>
</binding>
<outlet property="delegate" destination="-2" id="36"/>
@@ -91,14 +90,6 @@
</constraints>
<point key="canvasLocation" x="139" y="154"/>
</customView>
- <objectController id="18">
- <declaredKeys>
- <string>findString</string>
- </declaredKeys>
- <connections>
- <outlet property="content" destination="-2" id="19"/>
- </connections>
- </objectController>
</objects>
<resources>
<image name="NSGoLeftTemplate" width="10" height="14"/>
Modified: trunk/SKFindController.h
===================================================================
--- trunk/SKFindController.h 2024-01-26 10:22:57 UTC (rev 14020)
+++ trunk/SKFindController.h 2024-01-28 23:02:42 UTC (rev 14021)
@@ -58,7 +58,6 @@
@property (nonatomic, nullable, strong) IBOutlet NSTextField *messageField;
@property (nonatomic, nullable, strong) IBOutlet NSButton *doneButton;
@property (nonatomic, nullable, strong) IBOutlet NSSegmentedControl
*navigationButton;
-@property (nonatomic, nullable, strong) IBOutlet NSObjectController
*ownerController;
@property (nonatomic, nullable, weak) id <SKFindControllerDelegate> delegate;
@property (nonatomic, nullable, strong) NSString *findString;
Modified: trunk/SKFindController.m
===================================================================
--- trunk/SKFindController.m 2024-01-26 10:22:57 UTC (rev 14020)
+++ trunk/SKFindController.m 2024-01-28 23:02:42 UTC (rev 14021)
@@ -48,7 +48,7 @@
@implementation SKFindController
-@synthesize delegate, findField, messageField, doneButton, navigationButton,
ownerController, findString;
+@synthesize delegate, findField, messageField, doneButton, navigationButton,
findString;
- (NSString *)nibName {
return @"FindBar";
@@ -102,12 +102,6 @@
[messageField setHidden:YES];
}
-- (void)setDelegate:(id <SKFindControllerDelegate>)newDelegate {
- if (newDelegate == nil)
- [ownerController setContent:nil];
- delegate = newDelegate;
-}
-
- (void)setFindString:(NSString *)newFindString {
if (findString != newFindString) {
findString = newFindString;
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2024-01-26 10:22:57 UTC (rev 14020)
+++ trunk/SKMainWindowController.m 2024-01-28 23:02:42 UTC (rev 14021)
@@ -287,7 +287,7 @@
[rightSideController setMainController:nil];
[toolbarController setMainController:nil];
[touchBarController setMainController:nil];
- [findController setDelegate:nil]; // this breaks the retain loop from
binding
+ [findController setDelegate:nil];
[pdfView setDelegate:nil]; // this cleans up the pdfview
[[pdfView document] setDelegate:nil];
[noteTypeSheetController setDelegate:nil];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit