Revision: 11902
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=11902&view=rev
Author: amaxwell
Date: 2007-12-13 11:12:17 -0800 (Thu, 13 Dec 2007)
Log Message:
-----------
Enable saving. The alias format seems stable, and we're not removing URLs
(yet) anyway.
Coalesce textview notifications per-document.
Return nil from datasource; if it needs to be @"", please comment accordingly.
Modified Paths:
--------------
trunk/bibdesk/BDSKEditor.m
trunk/bibdesk/BibDocument.m
Modified: trunk/bibdesk/BDSKEditor.m
===================================================================
--- trunk/bibdesk/BDSKEditor.m 2007-12-13 17:43:15 UTC (rev 11901)
+++ trunk/bibdesk/BDSKEditor.m 2007-12-13 19:12:17 UTC (rev 11902)
@@ -2117,12 +2117,13 @@
}
}
-// sent by the notesView and the abstractView; this ensures that the
annote/abstract preview gets updated
+// sent by the textviews; this ensures that the document's annote/abstract
preview gets updated
+// post with document as object; if you have multiple docs, others can ignore
these notifications
- (void)textDidChange:(NSNotification *)aNotification{
- NSNotification *notif = [NSNotification
notificationWithName:BDSKPreviewDisplayChangedNotification object:nil];
+ NSNotification *notif = [NSNotification
notificationWithName:BDSKPreviewDisplayChangedNotification object:[self
document]];
[[NSNotificationQueue defaultQueue] enqueueNotification:notif
postingStyle:NSPostWhenIdle
-
coalesceMask:NSNotificationCoalescingOnName
+
coalesceMask:NSNotificationCoalescingOnName | NSNotificationCoalescingOnSender
forModes:nil];
}
@@ -2531,8 +2532,7 @@
if ([tcID isEqualToString:@"field"]) {
return [field localizedFieldName];
} else {
- id value = [publication valueOfField:field];
- return value ? value : @"";
+ return [publication valueOfField:field];
}
} else if ([tv isEqual:authorTableView]) {
return [[[publication sortedPeople] objectAtIndex:row] displayName];
Modified: trunk/bibdesk/BibDocument.m
===================================================================
--- trunk/bibdesk/BibDocument.m 2007-12-13 17:43:15 UTC (rev 11901)
+++ trunk/bibdesk/BibDocument.m 2007-12-13 19:12:17 UTC (rev 11902)
@@ -909,19 +909,6 @@
- (BOOL)saveToURL:(NSURL *)absoluteURL ofType:(NSString *)typeName
forSaveOperation:(NSSaveOperationType)saveOperation error:(NSError **)outError{
-#if !OMNI_FORCE_ASSERTIONS
-#warning Saving disabled
- if (NSSaveOperation == saveOperation) {
- if (outError) {
- *outError = [NSError
mutableLocalErrorWithCode:kBDSKFileOperationFailed localizedDescription:@"Only
Save-As is supported for this build"];
- [*outError setValue:@"In order to avoid data loss, overwriting is
not allowed. Use Save As or Export."
forKey:NSLocalizedRecoverySuggestionErrorKey];
- }
- return NO;
- }
-#else
-#warning Saving enabled
-#endif
-
// Set the string encoding according to the popup.
// NB: the popup has the incorrect encoding if it wasn't displayed, for
example for the Save action and saving using AppleScript, so don't reset
encoding unless we're actually modifying this document through a menu .
if (NSSaveAsOperation == saveOperation && [saveTextEncodingPopupButton
encoding] != 0)
@@ -2482,7 +2469,9 @@
- (void)handlePreviewDisplayChangedNotification:(NSNotification *)notification{
// note: this is only supposed to handle the pretty-printed preview, /not/
the TeX preview
- [self updatePreviewPane];
+ // don't update if the note was posted by editors that don't belong to us
+ if ([notification object] == self || [notification object] == nil)
+ [self updatePreviewPane];
}
- (void)handleTeXPreviewNeedsUpdateNotification:(NSNotification *)notification{
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit