Revision: 28853
http://sourceforge.net/p/bibdesk/svn/28853
Author: hofman
Date: 2024-04-06 21:00:37 +0000 (Sat, 06 Apr 2024)
Log Message:
-----------
Right align shortcuts. Use macros and string constant.
Modified Paths:
--------------
trunk/bibdesk/BDSKTextImportController.m
trunk/bibdesk/Base.lproj/TextImport.xib
Modified: trunk/bibdesk/BDSKTextImportController.m
===================================================================
--- trunk/bibdesk/BDSKTextImportController.m 2024-04-06 16:12:20 UTC (rev
28852)
+++ trunk/bibdesk/BDSKTextImportController.m 2024-04-06 21:00:37 UTC (rev
28853)
@@ -78,6 +78,9 @@
#define BDSKTouchBarItemIdentifierClose
@"edu.ucsd.mmccrack.bibdesk.touchbar-item.close"
#define BDSKTouchBarItemIdentifierClear
@"edu.ucsd.mmccrack.bibdesk.touchbar-item.clear"
+#define FIELDNAME_COLUMN @"FieldName"
+#define KEY_COLUMN @"Num"
+
@interface BDSKTextImportController (Private)
- (void)handleWebViewDidChangeSelection:(NSNotification *)notification;
@@ -744,8 +747,8 @@
}
- (void)updateColumnWidths {
- NSTableColumn *tc1 = [itemTableView tableColumnWithIdentifier:@"Num"];
- NSTableColumn *tc2 = [itemTableView
tableColumnWithIdentifier:@"FieldName"];
+ NSTableColumn *tc1 = [itemTableView tableColumnWithIdentifier:KEY_COLUMN];
+ NSTableColumn *tc2 = [itemTableView
tableColumnWithIdentifier:FIELDNAME_COLUMN];
NSCell *cell1 = [tc1 dataCell];
NSCell *cell2 = [tc2 dataCell];
__block CGFloat width1 = 0.0, width2 = 0.0;
@@ -1248,9 +1251,9 @@
NSTableCellView *view = [tableView makeViewWithIdentifier:identifier
owner:self];
NSString *key = [fields objectAtIndex:row];
NSString *value = nil;
- if ([identifier isEqualToString:@"FieldName"]) {
+ if ([identifier isEqualToString:FIELDNAME_COLUMN]) {
value = [key localizedFieldName];
- } else if ([identifier isEqualToString:@"Num"]){
+ } else if ([identifier isEqualToString:KEY_COLUMN]){
if (row < 10)
value = [NSString stringWithFormat:@"%@%ld", [NSString
commandKeyIndicatorString], (long)((row + 1) % 10)];
else if (row < 20)
@@ -1357,7 +1360,7 @@
}
- NSString *bibtexType = [typeMan bibTeXTypeForDublinCoreType:[metaTagDict
objectForKey:@"DC.type"]] ?: @"misc";
+ NSString *bibtexType = [typeMan bibTeXTypeForDublinCoreType:[metaTagDict
objectForKey:@"DC.type"]] ?: BDSKMiscString;
if ([[item pubType] isEqualToString:bibtexType])
[self updateType];
else
Modified: trunk/bibdesk/Base.lproj/TextImport.xib
===================================================================
--- trunk/bibdesk/Base.lproj/TextImport.xib 2024-04-06 16:12:20 UTC (rev
28852)
+++ trunk/bibdesk/Base.lproj/TextImport.xib 2024-04-06 21:00:37 UTC (rev
28853)
@@ -148,7 +148,7 @@
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750"
horizontalCompressionResistancePriority="250"
translatesAutoresizingMaskIntoConstraints="NO" id="pUV-Qw-lHM">
<rect key="frame" x="0.0" y="1" width="45" height="15"/>
-
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping"
sendsActionOnEndEditing="YES" id="TLi-Tu-8b8">
+
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping"
sendsActionOnEndEditing="YES" alignment="right" id="TLi-Tu-8b8">
<font key="font" metaFont="cellTitle"/>
<color key="textColor" name="controlTextColor" catalog="System"
colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System"
colorSpace="catalog"/>
@@ -201,7 +201,7 @@
</tableCellView>
</prototypeCellViews>
</tableColumn>
- <tableColumn
identifier="FieldValue" width="132" minWidth="10" maxWidth="1000" id="18">
+ <tableColumn
identifier="FieldValue" width="103" minWidth="10" maxWidth="1000" id="18">
<tableHeaderCell
key="headerCell" lineBreakMode="truncatingTail" borderStyle="border"
alignment="left">
<color
key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color
key="backgroundColor" white="0.33333298560000002" alpha="1"
colorSpace="calibratedWhite"/>
@@ -214,11 +214,11 @@
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"
userResizable="YES"/>
<prototypeCellViews>
<tableCellView
id="oe3-GM-yGF">
- <rect
key="frame" x="142" y="1" width="136" height="16"/>
+ <rect
key="frame" x="142" y="1" width="107" height="16"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"
heightSizable="YES"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750"
horizontalCompressionResistancePriority="250"
translatesAutoresizingMaskIntoConstraints="NO" id="Vuc-uc-lVd">
-
<rect key="frame" x="0.0" y="1" width="136" height="15"/>
+
<rect key="frame" x="0.0" y="1" width="107" height="15"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping"
selectable="YES" editable="YES" sendsActionOnEndEditing="YES" id="OMP-vJ-84O"
customClass="BDSKComplexStringCell">
<font key="font" metaFont="cellTitle"/>
<color key="textColor" name="controlTextColor" catalog="System"
colorSpace="catalog"/>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit