Revision: 26234 http://sourceforge.net/p/bibdesk/svn/26234 Author: hofman Date: 2021-06-15 14:55:13 +0000 (Tue, 15 Jun 2021) Log Message: ----------- View based table views for person controller
Modified Paths: -------------- trunk/bibdesk/BDSKPersonController.m trunk/bibdesk/Base.lproj/BDSKPersonWindow.xib Modified: trunk/bibdesk/BDSKPersonController.m =================================================================== --- trunk/bibdesk/BDSKPersonController.m 2021-06-15 14:40:03 UTC (rev 26233) +++ trunk/bibdesk/BDSKPersonController.m 2021-06-15 14:55:13 UTC (rev 26234) @@ -109,6 +109,10 @@ [publicationTableView setFontNamePreferenceKey:BDSKPersonTableViewFontNameKey]; [publicationTableView setFontSizePreferenceKey:BDSKPersonTableViewFontSizeKey]; + [publicationTableView sizeToFit]; + [nameTextField sizeToFit]; + [fieldTableView sizeToFit]; + [collapsibleView setMinSize:NSMakeSize(0.0, 38.0)]; [imageView setDelegate:self]; [splitView setAutosaveName:@"BibPersonView"]; @@ -413,6 +417,10 @@ #pragma mark TableView delegate +- (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { + return [tableView makeViewWithIdentifier:[tableColumn identifier] owner:self]; +} + - (void)tableViewSelectionDidChange:(NSNotification *)notification { if ([notification object] == nameTableView || [notification object] == fieldTableView) { [self updateFilter]; Modified: trunk/bibdesk/Base.lproj/BDSKPersonWindow.xib =================================================================== --- trunk/bibdesk/Base.lproj/BDSKPersonWindow.xib 2021-06-15 14:40:03 UTC (rev 26233) +++ trunk/bibdesk/Base.lproj/BDSKPersonWindow.xib 2021-06-15 14:55:13 UTC (rev 26234) @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="18122" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES"> <dependencies> <deployment identifier="macosx"/> <development version="8000" identifier="xcode"/> - <plugIn identifier="com.apple.AddressBook.ibplugin" version="17701"/> - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/> + <plugIn identifier="com.apple.AddressBook.ibplugin" version="18122"/> + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="18122"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <objects> @@ -86,9 +86,8 @@ <rect key="frame" x="1" y="1" width="420" height="172"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> - <tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" autosaveColumns="NO" typeSelect="NO" rowHeight="16" headerView="203" id="9" customClass="BDSKTableView"> - <rect key="frame" x="0.0" y="0.0" width="420" height="147"/> - <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <tableView focusRingType="none" horizontalCompressionResistancePriority="250" verticalCompressionResistancePriority="250" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" autosaveColumns="NO" typeSelect="NO" rowHeight="16" headerView="203" viewBased="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9" customClass="BDSKTableView"> + <rect key="frame" x="0.0" y="25" width="420" height="147"/> <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"/> @@ -104,22 +103,50 @@ <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> - <connections> - <binding destination="23" name="value" keyPath="arrangedObjects.publication.displayTitle" id="165"> - <dictionary key="options"> - <integer key="NSAllowsEditingMultipleValuesSelection" value="0"/> - <integer key="NSConditionallySetsEditable" value="1"/> - <integer key="NSCreatesSortDescriptor" value="0"/> - </dictionary> - </binding> - </connections> + <prototypeCellViews> + <tableCellView id="E8L-mQ-QFH"> + <rect key="frame" x="11" y="1" width="388" height="16"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <textField horizontalHuggingPriority="251" horizontalCompressionResistancePriority="250" verticalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="avf-j7-Hma"> + <rect key="frame" x="-2" y="0.0" width="392" height="16"/> + <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" id="m06-03-uzR"> + <font key="font" metaFont="system" size="12"/> + <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + <connections> + <binding destination="E8L-mQ-QFH" name="value" keyPath="objectValue" id="a7O-AI-3dV"> + <dictionary key="options"> + <string key="NSValueTransformerName">publication.displayTitle</string> + </dictionary> + </binding> + </connections> + </textField> + </subviews> + <constraints> + <constraint firstItem="avf-j7-Hma" firstAttribute="top" secondItem="E8L-mQ-QFH" secondAttribute="top" id="Gu3-G1-h3a"/> + <constraint firstAttribute="trailing" secondItem="avf-j7-Hma" secondAttribute="trailing" id="UOM-qq-JQO"/> + <constraint firstAttribute="bottom" secondItem="avf-j7-Hma" secondAttribute="bottom" id="hUf-gD-fGn"/> + <constraint firstItem="avf-j7-Hma" firstAttribute="leading" secondItem="E8L-mQ-QFH" secondAttribute="leading" id="pDp-H0-ARJ"/> + </constraints> + <connections> + <outlet property="textField" destination="avf-j7-Hma" id="Usc-ly-JXG"/> + </connections> + </tableCellView> + </prototypeCellViews> </tableColumn> </tableColumns> <connections> + <binding destination="23" name="content" keyPath="arrangedObjects" id="jF6-e5-gEx"/> <outlet property="delegate" destination="-2" id="17"/> </connections> </tableView> </subviews> + <constraints> + <constraint firstItem="9" firstAttribute="leading" secondItem="y3l-fZ-IKn" secondAttribute="leading" id="9B3-Li-kxK"/> + <constraint firstItem="9" firstAttribute="top" secondItem="y3l-fZ-IKn" secondAttribute="top" constant="25" id="yh9-sz-6rq"/> + </constraints> </clipView> <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="202"> <rect key="frame" x="1" y="157" width="405" height="15"/> @@ -156,9 +183,8 @@ <rect key="frame" x="1" y="1" width="253" height="58"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> - <tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="14" id="154"> + <tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="14" viewBased="YES" translatesAutoresizingMaskIntoConstraints="NO" id="154"> <rect key="frame" x="0.0" y="0.0" width="253" height="58"/> - <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"/> @@ -174,22 +200,46 @@ <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> - <connections> - <binding destination="135" name="value" keyPath="arrangedObjects" id="159"> - <dictionary key="options"> - <integer key="NSAllowsEditingMultipleValuesSelection" value="0"/> - <integer key="NSConditionallySetsEditable" value="1"/> - <integer key="NSCreatesSortDescriptor" value="0"/> - </dictionary> - </binding> - </connections> + <prototypeCellViews> + <tableCellView id="zjT-No-Q0A"> + <rect key="frame" x="11" y="1" width="221" height="14"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <textField horizontalHuggingPriority="251" horizontalCompressionResistancePriority="250" verticalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="Spy-Pp-hkt"> + <rect key="frame" x="-2" y="0.0" width="225" height="14"/> + <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" id="rNK-AO-7Pb"> + <font key="font" metaFont="smallSystem"/> + <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + <connections> + <binding destination="zjT-No-Q0A" name="value" keyPath="objectValue" id="AZY-WR-XdB"/> + </connections> + </textField> + </subviews> + <constraints> + <constraint firstAttribute="trailing" secondItem="Spy-Pp-hkt" secondAttribute="trailing" id="KgG-5w-JIJ"/> + <constraint firstItem="Spy-Pp-hkt" firstAttribute="leading" secondItem="zjT-No-Q0A" secondAttribute="leading" id="YVk-rV-rFm"/> + <constraint firstAttribute="bottom" secondItem="Spy-Pp-hkt" secondAttribute="bottom" id="cPn-Ea-RFY"/> + <constraint firstItem="Spy-Pp-hkt" firstAttribute="top" secondItem="zjT-No-Q0A" secondAttribute="top" id="t8T-2h-aT9"/> + </constraints> + <connections> + <outlet property="textField" destination="Spy-Pp-hkt" id="4kk-pJ-R15"/> + </connections> + </tableCellView> + </prototypeCellViews> </tableColumn> </tableColumns> <connections> + <binding destination="135" name="content" keyPath="arrangedObjects" id="CNl-hw-YpC"/> <outlet property="delegate" destination="-2" id="163"/> </connections> </tableView> </subviews> + <constraints> + <constraint firstItem="154" firstAttribute="leading" secondItem="T3M-aC-bql" secondAttribute="leading" id="OVL-f6-bbi"/> + <constraint firstItem="154" firstAttribute="top" secondItem="T3M-aC-bql" secondAttribute="top" id="vTX-7y-3nk"/> + </constraints> </clipView> <scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" controlSize="small" horizontal="YES" id="207"> <rect key="frame" x="1" y="45" width="87" height="14"/> @@ -207,7 +257,7 @@ <rect key="frame" x="1" y="1" width="78" height="58"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> - <tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="14" id="144"> + <tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" columnResizing="NO" emptySelection="NO" autosaveColumns="NO" typeSelect="NO" rowHeight="14" viewBased="YES" id="144"> <rect key="frame" x="0.0" y="0.0" width="78" height="58"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <size key="intercellSpacing" width="3" height="2"/> @@ -225,18 +275,38 @@ <color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/> </textFieldCell> <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> - <connections> - <binding destination="136" name="value" keyPath="arrangedObjects" id="152"> - <dictionary key="options"> - <integer key="NSAllowsEditingMultipleValuesSelection" value="0"/> - <integer key="NSConditionallySetsEditable" value="1"/> - <integer key="NSCreatesSortDescriptor" value="0"/> - </dictionary> - </binding> - </connections> + <prototypeCellViews> + <tableCellView id="TCt-G1-Jux"> + <rect key="frame" x="11" y="1" width="49" height="14"/> + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> + <subviews> + <textField horizontalHuggingPriority="251" horizontalCompressionResistancePriority="250" verticalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="GTe-1h-haG"> + <rect key="frame" x="-2" y="0.0" width="53" height="14"/> + <textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" id="rM0-LA-6Kb"> + <font key="font" metaFont="smallSystem"/> + <color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/> + <color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/> + </textFieldCell> + <connections> + <binding destination="TCt-G1-Jux" name="value" keyPath="objectValue" id="BPy-A3-r6I"/> + </connections> + </textField> + </subviews> + <constraints> + <constraint firstAttribute="bottom" secondItem="GTe-1h-haG" secondAttribute="bottom" id="Pj3-bH-mwr"/> + <constraint firstItem="GTe-1h-haG" firstAttribute="leading" secondItem="TCt-G1-Jux" secondAttribute="leading" id="UwS-rc-JlZ"/> + <constraint firstItem="GTe-1h-haG" firstAttribute="top" secondItem="TCt-G1-Jux" secondAttribute="top" id="YdV-4p-7i9"/> + <constraint firstAttribute="trailing" secondItem="GTe-1h-haG" secondAttribute="trailing" id="nmg-F8-jeu"/> + </constraints> + <connections> + <outlet property="textField" destination="GTe-1h-haG" id="7aS-dc-tAd"/> + </connections> + </tableCellView> + </prototypeCellViews> </tableColumn> </tableColumns> <connections> + <binding destination="136" name="content" keyPath="arrangedObjects" id="t0A-xT-jfT"/> <outlet property="delegate" destination="-2" id="162"/> </connections> </tableView> @@ -304,6 +374,7 @@ <string>displayTitle</string> <string>publication.displayTitle</string> </declaredKeys> + <classReference key="objectClass" className="BibItem"/> <connections> <binding destination="-2" name="contentArray" keyPath="publicationItems" id="164"> <dictionary key="options"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit