Revision: 26725 http://sourceforge.net/p/bibdesk/svn/26725 Author: hofman Date: 2021-08-23 22:04:34 +0000 (Mon, 23 Aug 2021) Log Message: ----------- Use table cell view with amageView and textView instead of file path cell
Modified Paths: -------------- trunk/bibdesk/BDSKFileMatchConfigController.m trunk/bibdesk/Base.lproj/FileMatcherConfigSheet.xib Modified: trunk/bibdesk/BDSKFileMatchConfigController.m =================================================================== --- trunk/bibdesk/BDSKFileMatchConfigController.m 2021-08-23 21:59:14 UTC (rev 26724) +++ trunk/bibdesk/BDSKFileMatchConfigController.m 2021-08-23 22:04:34 UTC (rev 26725) @@ -37,6 +37,7 @@ #import "NSImage_BDSKExtensions.h" #import "NSWindowController_BDSKExtensions.h" #import "NSPasteboard_BDSKExtensions.h" +#import "BDSKFileImageTransformer.h" #define BDSKTouchBarItemIdentifierButtons @"edu.ucsd.mmccrack.bibdesk.touchbar-item.buttons" @@ -50,6 +51,11 @@ @synthesize documentTableView, fileTableView, useOrphansCheckbox, addRemoveButton, doneButton, documentArrayController, fileArrayController, documents, useOrphanedFiles; @dynamic publications; ++ (void)initialize { + BDSKINITIALIZE; + [BDSKFileImageTransformer class]; +} + - (id)init { self = [super init]; Modified: trunk/bibdesk/Base.lproj/FileMatcherConfigSheet.xib =================================================================== --- trunk/bibdesk/Base.lproj/FileMatcherConfigSheet.xib 2021-08-23 21:59:14 UTC (rev 26724) +++ trunk/bibdesk/Base.lproj/FileMatcherConfigSheet.xib 2021-08-23 22:04:34 UTC (rev 26725) @@ -238,29 +238,47 @@ </textFieldCell> <tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/> <prototypeCellViews> - <tableCellView id="RIB-OV-YaT"> - <rect key="frame" x="11" y="1" width="190" height="16"/> + <tableCellView id="1Fm-u3-WeL"> + <rect key="frame" x="11" y="1" width="190" height="17"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <subviews> - <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="Emp-xV-1PD" customClass="BDSK"> - <rect key="frame" x="0.0" y="1" width="190" height="15"/> - <textFieldCell key="cell" lineBreakMode="truncatingMiddle" sendsActionOnEndEditing="YES" id="QVp-Rr-jJ8" customClass="BDSKFilePathCell"> - <font key="font" metaFont="cellTitle"/> + <imageView horizontalHuggingPriority="251" verticalHuggingPriority="251" horizontalCompressionResistancePriority="250" verticalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="Uhl-Rx-swN"> + <rect key="frame" x="1" y="-1" width="14" height="20"/> + <constraints> + <constraint firstAttribute="width" secondItem="Uhl-Rx-swN" secondAttribute="height" multiplier="1:1" id="isK-hX-eNe"/> + </constraints> + <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="NSActionTemplate" id="CsO-rx-NoJ"/> + <connections> + <binding destination="1Fm-u3-WeL" name="value" keyPath="objectValue" id="6Ti-4J-pEn"> + <dictionary key="options"> + <string key="NSValueTransformerName">BDSKFileImageTransformer</string> + </dictionary> + </binding> + </connections> + </imageView> + <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsExpansionToolTips="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gjW-Wf-DAt"> + <rect key="frame" x="15" y="1" width="175" height="15"/> + <textFieldCell key="cell" lineBreakMode="truncatingMiddle" sendsActionOnEndEditing="YES" id="Fhm-cm-AbR"> + <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"/> + <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> </textFieldCell> <connections> - <binding destination="RIB-OV-YaT" name="value" keyPath="objectValue" id="8Bz-2i-llH"/> + <binding destination="1Fm-u3-WeL" name="value" keyPath="objectValue.path.stringByAbbreviatingWithTildeInPath" id="xif-0A-nXU"/> </connections> </textField> </subviews> <constraints> - <constraint firstAttribute="trailing" secondItem="Emp-xV-1PD" secondAttribute="trailing" constant="2" id="4lU-xW-JEi"/> - <constraint firstItem="Emp-xV-1PD" firstAttribute="centerY" secondItem="RIB-OV-YaT" secondAttribute="centerY" id="GWI-7T-gY1"/> - <constraint firstItem="Emp-xV-1PD" firstAttribute="leading" secondItem="RIB-OV-YaT" secondAttribute="leading" constant="2" id="dfC-Wp-MCu"/> + <constraint firstAttribute="trailing" secondItem="gjW-Wf-DAt" secondAttribute="trailing" priority="750" constant="2" id="N5Q-5B-IHd"/> + <constraint firstItem="gjW-Wf-DAt" firstAttribute="leading" secondItem="Uhl-Rx-swN" secondAttribute="trailing" constant="2" id="Tgv-Fb-Lam"/> + <constraint firstItem="gjW-Wf-DAt" firstAttribute="top" secondItem="Uhl-Rx-swN" secondAttribute="top" id="dou-EC-nrJ"/> + <constraint firstItem="gjW-Wf-DAt" firstAttribute="bottom" secondItem="Uhl-Rx-swN" secondAttribute="bottom" constant="1" id="mnb-li-35Z"/> + <constraint firstItem="Uhl-Rx-swN" firstAttribute="leading" secondItem="1Fm-u3-WeL" secondAttribute="leading" constant="1" id="twW-in-o9W"/> + <constraint firstItem="gjW-Wf-DAt" firstAttribute="centerY" secondItem="1Fm-u3-WeL" secondAttribute="centerY" id="y3w-LU-gxz"/> </constraints> <connections> - <outlet property="textField" destination="Emp-xV-1PD" id="ERa-Km-Ocf"/> + <outlet property="imageView" destination="Uhl-Rx-swN" id="Vnd-4A-cuL"/> + <outlet property="textField" destination="gjW-Wf-DAt" id="yZM-z3-Gse"/> </connections> </tableCellView> </prototypeCellViews> 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