Revision: 23934
http://sourceforge.net/p/bibdesk/svn/23934
Author: hofman
Date: 2019-07-03 17:31:07 +0000 (Wed, 03 Jul 2019)
Log Message:
-----------
expose preferences to automatically download URLs on import
Modified Paths:
--------------
trunk/bibdesk/BDSKStringConstants.h
trunk/bibdesk/BDSKStringConstants.m
trunk/bibdesk/BibDocument.m
trunk/bibdesk/BibPref_General.h
trunk/bibdesk/BibPref_General.m
trunk/bibdesk/English.lproj/BibPref_General.xib
trunk/bibdesk/build_config.txt
Modified: trunk/bibdesk/BDSKStringConstants.h
===================================================================
--- trunk/bibdesk/BDSKStringConstants.h 2019-07-03 17:06:51 UTC (rev 23933)
+++ trunk/bibdesk/BDSKStringConstants.h 2019-07-03 17:31:07 UTC (rev 23934)
@@ -59,6 +59,9 @@
extern NSString *BDSKAlternateDragCopyTemplateKey;
extern NSString *BDSKUsesTeXKey;
extern NSString *BDSKEditOnPasteKey;
+extern NSString *BDSKDownloadImportedURLsKey;
+extern NSString *BDSKReplaceDownloadedURLsKey;
+extern NSString *BDSKURLTypesToDownloadKey;
extern NSString *BDSKSeparateCiteKey;
extern NSString *BDSKShownColsNamesKey;
extern NSString *BDSKShowStatusBarKey;
Modified: trunk/bibdesk/BDSKStringConstants.m
===================================================================
--- trunk/bibdesk/BDSKStringConstants.m 2019-07-03 17:06:51 UTC (rev 23933)
+++ trunk/bibdesk/BDSKStringConstants.m 2019-07-03 17:31:07 UTC (rev 23934)
@@ -85,6 +85,9 @@
NSString *BDSKAlternateDragCopyTypeKey = @"BDSKAlternateDragCopyTypeKey";
NSString *BDSKAlternateDragCopyTemplateKey =
@"BDSKAlternateDragCopyTemplateKey";
NSString *BDSKEditOnPasteKey = @"Edit on Paste";
+NSString *BDSKDownloadImportedURLsKey = @"BDSKDownloadImportedURLs";
+NSString *BDSKReplaceDownloadedURLsKey = @"BDSKReplaceDownloadedURLs";
+NSString *BDSKURLTypesToDownloadKey = @"BDSKURLTypesToDownload";
NSString *BDSKSeparateCiteKey = @"Separate Cite";
NSString *BDSKCitePrependTildeKey = @"Cite Prepend Tilde";
NSString *BDSKCiteStringKey = @"Cite String";
Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2019-07-03 17:06:51 UTC (rev 23933)
+++ trunk/bibdesk/BibDocument.m 2019-07-03 17:31:07 UTC (rev 23934)
@@ -165,10 +165,6 @@
#define BDSKDisableDocumentExtendedAttributesKey
@"BDSKDisableDocumentExtendedAttributes"
#define BDSKDisableExportAttributesKey @"BDSKDisableExportAttributes"
-#define BDSKDownloadImportedURLsKey @"BDSKDownloadImportedURLs"
-#define BDSKReplaceDownloadedURLsKey @"BDSKReplaceDownloadedURLs"
-#define BDSKURLTypesToDownloadKey @"BDSKURLTypesToDownload"
-
#pragma mark -
static inline BOOL BDSKIsSaveOperation(NSSaveOperationType saveOperation) {
Modified: trunk/bibdesk/BibPref_General.h
===================================================================
--- trunk/bibdesk/BibPref_General.h 2019-07-03 17:06:51 UTC (rev 23933)
+++ trunk/bibdesk/BibPref_General.h 2019-07-03 17:31:07 UTC (rev 23934)
@@ -40,7 +40,9 @@
@interface BibPref_General : BDSKPreferencePane {
IBOutlet NSMatrix *startupBehaviorRadio;
IBOutlet NSPopUpButton *emailTemplatePopup;
- IBOutlet NSButton* editOnPasteButton;
+ IBOutlet NSButton *editOnPasteButton;
+ IBOutlet NSButton *downloadImportedURLsButton;
+ IBOutlet NSButton *replaceDownloadedURLsButton;
IBOutlet NSPopUpButton *checkForUpdatesButton;
IBOutlet NSButton *warnOnDeleteButton;
IBOutlet NSButton *warnOnRemovalFromGroupButton;
@@ -58,6 +60,8 @@
- (IBAction)chooseAutoOpenFile:(id) sender;
- (IBAction)changeUpdateInterval:(id)sender;
- (IBAction)changeEditOnPaste:(id)sender;
+- (IBAction)changeDownloadOnImport:(id)sender;
+- (IBAction)changeReplaceDownloadedURLs:(id)sender;
- (IBAction)changeWarnOnDelete:(id)sender;
- (IBAction)changeWarnOnRemovalFromGroup:(id)sender;
- (IBAction)changeWarnOnRenameGroup:(id)sender;
Modified: trunk/bibdesk/BibPref_General.m
===================================================================
--- trunk/bibdesk/BibPref_General.m 2019-07-03 17:06:51 UTC (rev 23933)
+++ trunk/bibdesk/BibPref_General.m 2019-07-03 17:31:07 UTC (rev 23934)
@@ -76,6 +76,9 @@
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(handleExportTemplatesChanged:)
name:BDSKExportTemplatesChangedNotification object:nil];
[editOnPasteButton setState:[sud boolForKey:BDSKEditOnPasteKey] ?
NSOnState : NSOffState];
+ [downloadImportedURLsButton setState:[sud
boolForKey:BDSKDownloadImportedURLsKey] ? NSOnState : NSOffState];
+ [replaceDownloadedURLsButton setState:[sud
boolForKey:BDSKReplaceDownloadedURLsKey] ? NSOnState : NSOffState];
+ [replaceDownloadedURLsButton setEnabled:[sud
boolForKey:BDSKDownloadImportedURLsKey]];
}
- (void)updateStartupBehaviorUI {
@@ -180,6 +183,15 @@
[sud setBool:([sender state] == NSOnState) forKey:BDSKEditOnPasteKey];
}
+- (IBAction)changeDownloadOnImport:(id)sender{
+ [sud setBool:([sender state] == NSOnState)
forKey:BDSKDownloadImportedURLsKey];
+ [replaceDownloadedURLsButton setEnabled:[sender state] == NSOnState];
+}
+
+- (IBAction)changeReplaceDownloadedURLs:(id)sender{
+ [sud setBool:([sender state] == NSOnState)
forKey:BDSKReplaceDownloadedURLsKey];
+}
+
- (IBAction)changeWarnOnDelete:(id)sender{
[sud setBool:([sender state] == NSOnState) forKey:BDSKWarnOnDeleteKey];
}
Modified: trunk/bibdesk/English.lproj/BibPref_General.xib
===================================================================
--- trunk/bibdesk/English.lproj/BibPref_General.xib 2019-07-03 17:06:51 UTC
(rev 23933)
+++ trunk/bibdesk/English.lproj/BibPref_General.xib 2019-07-03 17:31:07 UTC
(rev 23934)
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0"
toolsVersion="14460.31" targetRuntime="MacOSX.Cocoa"
propertyAccessControl="none">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0"
toolsVersion="14490.70" targetRuntime="MacOSX.Cocoa"
propertyAccessControl="none">
<dependencies>
<deployment identifier="macosx"/>
<development version="8000" identifier="xcode"/>
- <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin"
version="14460.31"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin"
version="14490.70"/>
<capability name="documents saved in the Xcode 8 format"
minToolsVersion="8.0"/>
</dependencies>
<objects>
@@ -13,8 +13,10 @@
<outlet property="checkForUpdatesButton" destination="194"
id="202"/>
<outlet property="defaultBibFileButton" destination="69"
id="230"/>
<outlet property="defaultBibFileTextField" destination="144"
id="153"/>
+ <outlet property="downloadImportedURLsButton"
destination="egO-bg-2o0" id="Wqh-R3-kF9"/>
<outlet property="editOnPasteButton" destination="85" id="96"/>
<outlet property="emailTemplatePopup" destination="222"
id="228"/>
+ <outlet property="replaceDownloadedURLsButton"
destination="LLl-0L-qEl" id="LCK-Et-g6B"/>
<outlet property="startupBehaviorRadio" destination="65"
id="68"/>
<outlet property="view" destination="5" id="261"/>
<outlet property="warnOnDeleteButton" destination="155"
id="158"/>
@@ -24,9 +26,9 @@
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder"
customClass="FirstResponder"/>
- <customObject id="-3" userLabel="Application"/>
+ <customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customView id="5" userLabel="View">
- <rect key="frame" x="0.0" y="0.0" width="576" height="451"/>
+ <rect key="frame" x="0.0" y="0.0" width="576" height="491"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button id="231">
@@ -54,7 +56,7 @@
<autoresizingMask key="autoresizingMask"/>
<popUpButtonCell key="cell" type="push"
bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on"
borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter"
preferredEdge="maxY" selectedItem="225" id="276">
<behavior key="behavior" lightByBackground="YES"
lightByGray="YES"/>
- <font key="font" metaFont="system"/>
+ <font key="font" metaFont="menu"/>
<menu key="menu" id="223">
<items>
<menuItem state="on" id="225"/>
@@ -80,7 +82,7 @@
<autoresizingMask key="autoresizingMask"/>
</box>
<textField verticalHuggingPriority="750" id="199">
- <rect key="frame" x="161" y="282" width="324" height="17"/>
+ <rect key="frame" x="161" y="322" width="324" height="17"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES"
title="Check for updates (requires a network connection)" id="274">
<font key="font" metaFont="system"/>
@@ -89,11 +91,11 @@
</textFieldCell>
</textField>
<popUpButton verticalHuggingPriority="750" id="194">
- <rect key="frame" x="29" y="276" width="130" height="26"/>
+ <rect key="frame" x="29" y="316" width="130" height="26"/>
<autoresizingMask key="autoresizingMask"/>
<popUpButtonCell key="cell" type="push" title="Never"
bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" state="on"
borderStyle="borderAndBezel" inset="2" arrowPosition="arrowAtCenter"
preferredEdge="maxY" selectedItem="197" id="273">
<behavior key="behavior" lightByBackground="YES"
lightByGray="YES"/>
- <font key="font" metaFont="system"/>
+ <font key="font" metaFont="menu"/>
<menu key="menu" id="195">
<items>
<menuItem title="Never" state="on" id="197"/>
@@ -170,7 +172,7 @@
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" id="144">
- <rect key="frame" x="134" y="329" width="321" height="22"/>
+ <rect key="frame" x="134" y="369" width="321" height="22"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" scrollable="YES"
lineBreakMode="clipping" selectable="YES" editable="YES"
sendsActionOnEndEditing="YES" state="on" borderStyle="bezel"
drawsBackground="YES" id="267">
<font key="font" metaFont="system"/>
@@ -183,11 +185,11 @@
</connections>
</textField>
<box verticalHuggingPriority="750" boxType="separator"
id="123">
- <rect key="frame" x="12" y="266" width="554" height="5"/>
+ <rect key="frame" x="12" y="306" width="554" height="5"/>
<autoresizingMask key="autoresizingMask"/>
</box>
<button id="85">
- <rect key="frame" x="30" y="219" width="436" height="18"/>
+ <rect key="frame" x="30" y="259" width="436" height="18"/>
<autoresizingMask key="autoresizingMask"/>
<buttonCell key="cell" type="check" title="Edit imported
publications after pasting or dragging into BibDesk" bezelStyle="regularSquare"
imagePosition="left" alignment="left" inset="2" id="266">
<behavior key="behavior" changeContents="YES"
doesNotDimImage="YES" lightByContents="YES"/>
@@ -198,8 +200,20 @@
<outlet property="nextKeyView" destination="155"
id="163"/>
</connections>
</button>
+ <button id="egO-bg-2o0">
+ <rect key="frame" x="30" y="239" width="362" height="18"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <buttonCell key="cell" type="check" title="Automatically
download remote URLs when importing" bezelStyle="regularSquare"
imagePosition="left" alignment="left" inset="2" id="n1w-ZH-aIc">
+ <behavior key="behavior" changeContents="YES"
doesNotDimImage="YES" lightByContents="YES"/>
+ <font key="font" metaFont="system"/>
+ </buttonCell>
+ <connections>
+ <action selector="changeDownloadOnImport:" target="-2"
id="q6I-Ib-P0l"/>
+ <outlet property="nextKeyView" destination="155"
id="lRt-9b-nJq"/>
+ </connections>
+ </button>
<textField verticalHuggingPriority="750" id="84">
- <rect key="frame" x="17" y="243" width="243" height="17"/>
+ <rect key="frame" x="17" y="283" width="243" height="17"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES"
alignment="left" title="Importing Bibliography Information" id="265">
<font key="font" metaFont="systemBold"/>
@@ -208,7 +222,7 @@
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" id="82">
- <rect key="frame" x="17" y="414" width="136" height="17"/>
+ <rect key="frame" x="17" y="454" width="136" height="17"/>
<autoresizingMask key="autoresizingMask"/>
<textFieldCell key="cell" sendsActionOnEndEditing="YES"
alignment="left" title="Application Launch" id="264">
<font key="font" metaFont="systemBold"/>
@@ -217,7 +231,7 @@
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" id="69">
- <rect key="frame" x="462" y="321" width="100" height="32"/>
+ <rect key="frame" x="462" y="361" width="100" height="32"/>
<autoresizingMask key="autoresizingMask"/>
<buttonCell key="cell" type="push" title="Choose…"
bezelStyle="rounded" alignment="center" borderStyle="border" inset="2" id="263">
<behavior key="behavior" pushIn="YES"
lightByBackground="YES" lightByGray="YES"/>
@@ -229,7 +243,7 @@
</connections>
</button>
<matrix verticalHuggingPriority="750" selectionByRect="NO"
allowsEmptySelection="NO" id="65">
- <rect key="frame" x="30" y="309" width="102" height="98"/>
+ <rect key="frame" x="30" y="349" width="102" height="98"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" name="controlColor"
catalog="System" colorSpace="catalog"/>
<size key="cellSize" width="102" height="18"/>
@@ -282,6 +296,18 @@
<outlet property="nextKeyView" destination="69"
id="89"/>
</connections>
</matrix>
+ <button id="LLl-0L-qEl">
+ <rect key="frame" x="50" y="219" width="229" height="18"/>
+ <autoresizingMask key="autoresizingMask"/>
+ <buttonCell key="cell" type="check" title="Replace
downloaded remote URL" bezelStyle="regularSquare" imagePosition="left"
alignment="left" inset="2" id="PPt-1x-2mK">
+ <behavior key="behavior" changeContents="YES"
doesNotDimImage="YES" lightByContents="YES"/>
+ <font key="font" metaFont="system"/>
+ </buttonCell>
+ <connections>
+ <action selector="changeReplaceDownloadedURLs:"
target="-2" id="agH-ca-kxg"/>
+ <outlet property="nextKeyView" destination="155"
id="2by-50-AVo"/>
+ </connections>
+ </button>
</subviews>
<connections>
<outlet property="nextKeyView" destination="65" id="160"/>
Modified: trunk/bibdesk/build_config.txt
===================================================================
--- trunk/bibdesk/build_config.txt 2019-07-03 17:06:51 UTC (rev 23933)
+++ trunk/bibdesk/build_config.txt 2019-07-03 17:31:07 UTC (rev 23934)
@@ -1 +1 @@
-disableLocalizations 0
+disableLocalizations 1
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