Revision: 30079
http://sourceforge.net/p/bibdesk/svn/30079
Author: hofman
Date: 2026-02-27 22:30:58 +0000 (Fri, 27 Feb 2026)
Log Message:
-----------
set key field from caller rather than passing it to editPub command
Modified Paths:
--------------
trunk/bibdesk/BDSKEditor.m
trunk/bibdesk/BDSKErrorObjectController.m
trunk/bibdesk/BibDocument_Actions.h
trunk/bibdesk/BibDocument_Actions.m
Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m 2026-02-27 22:19:34 UTC (rev 30078)
+++ trunk/bibdesk/BDSKEditor.m 2026-02-27 22:30:58 UTC (rev 30079)
@@ -1281,8 +1281,11 @@
// these methods are for crossref interaction with the table
- (void)openParentItemForField:(NSString *)field{
BibItem *parent = [publication crossrefParent];
- if (parent)
- [[self document] editPub:parent forField:[field
isEqualToString:BDSKCrossrefString] ? nil : field];
+ if (parent) {
+ BDSKEditor *editor = [[self document] editPub:parent];
+ if (field && [field isEqualToString:BDSKCrossrefString] == NO)
+ [editor setKeyField:field];
+ }
}
- (IBAction)selectCrossrefParentAction:(id)sender{
Modified: trunk/bibdesk/BDSKErrorObjectController.m
===================================================================
--- trunk/bibdesk/BDSKErrorObjectController.m 2026-02-27 22:19:34 UTC (rev
30078)
+++ trunk/bibdesk/BDSKErrorObjectController.m 2026-02-27 22:30:58 UTC (rev
30079)
@@ -256,7 +256,7 @@
// fileName is nil for paste/drag and author parsing errors; check for a
pub first, since that's the best way to edit
if (pub) {
// if we have an error for a pub, it should be from a BibDocument.
Otherwise we would have ignored it, see endObservingErrorsForDocument:...
- [(BibDocument *)[pub owner] editPub:pub forField:BDSKAuthorString];
+ [[(BibDocument *)[pub owner] editPub:pub]
setKeyField:BDSKAuthorString];
} else if (nil == fileName || [[NSFileManager defaultManager]
fileExistsAtPath:fileName]) {
[editor showWindow:self];
[editor gotoLine:[errObj lineNumber]];
Modified: trunk/bibdesk/BibDocument_Actions.h
===================================================================
--- trunk/bibdesk/BibDocument_Actions.h 2026-02-27 22:19:34 UTC (rev 30078)
+++ trunk/bibdesk/BibDocument_Actions.h 2026-02-27 22:30:58 UTC (rev 30079)
@@ -85,8 +85,7 @@
- (void)editPublications:(NSArray <BibItem *>*)pubs;
-- (void)editPub:(BibItem *)pub forField:(nullable NSString *)field;
-- (void)editPub:(BibItem *)pub;
+- (nullable BDSKEditor *)editPub:(BibItem *)pub;
/*!
@method editAction:
Modified: trunk/bibdesk/BibDocument_Actions.m
===================================================================
--- trunk/bibdesk/BibDocument_Actions.m 2026-02-27 22:19:34 UTC (rev 30078)
+++ trunk/bibdesk/BibDocument_Actions.m 2026-02-27 22:30:58 UTC (rev 30079)
@@ -346,17 +346,12 @@
return editor;
}
-- (void)editPub:(BibItem *)pub forField:(NSString *)field {
+- (nullable BDSKEditor *)editPub:(BibItem *)pub{
BDSKEditor *editor = [self editorForPublication:pub create:YES];
[editor showWindow:nil];
- if (field)
- [editor setKeyField:field];
+ return editor;
}
-- (void)editPub:(BibItem *)pub{
- [self editPub:pub forField:nil];
-}
-
- (void)editPublications:(NSArray *)pubs{
NSInteger n = [pubs count];
if (n > 6) {
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