From: Christiaan H. <ho...@us...> - 2005-07-20 08:51:42
|
Update of /cvsroot/bibdesk/bibdesk In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30949 Modified Files: Tag: BR_1x BibDocument.m BibEditor.m Log Message: Also observe changes in the global macro definitions. Index: BibEditor.m =================================================================== RCS file: /cvsroot/bibdesk/bibdesk/BibEditor.m,v retrieving revision 1.159.2.7 retrieving revision 1.159.2.8 diff -C2 -d -r1.159.2.7 -r1.159.2.8 *** BibEditor.m 19 Jul 2005 20:14:17 -0000 1.159.2.7 --- BibEditor.m 20 Jul 2005 08:51:32 -0000 1.159.2.8 *************** *** 324,332 **** selector:@selector(macrosDidChange:) name:BDSKBibDocMacroDefinitionChangedNotification ! object:theDocument]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(macrosDidChange:) name:BDSKBibDocMacroKeyChangedNotification ! object:theDocument]; [authorTableView setDoubleAction:@selector(showPersonDetailCmd:)]; --- 324,332 ---- selector:@selector(macrosDidChange:) name:BDSKBibDocMacroDefinitionChangedNotification ! object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(macrosDidChange:) name:BDSKBibDocMacroKeyChangedNotification ! object:nil]; [authorTableView setDoubleAction:@selector(showPersonDetailCmd:)]; *************** *** 1508,1511 **** --- 1508,1515 ---- - (void)macrosDidChange:(NSNotification *)notification{ + id sender = [notification object]; + if([sender isKindOfClass:[BibDocument class]] && sender != theDocument) + return; // only macro changes for our own document or the global macros + NSArray *cells = [bibFields cells]; NSEnumerator *cellE = [cells objectEnumerator]; Index: BibDocument.m =================================================================== RCS file: /cvsroot/bibdesk/bibdesk/BibDocument.m,v retrieving revision 1.307.2.13 retrieving revision 1.307.2.14 diff -C2 -d -r1.307.2.13 -r1.307.2.14 *** BibDocument.m 19 Jul 2005 21:02:24 -0000 1.307.2.13 --- BibDocument.m 20 Jul 2005 08:51:31 -0000 1.307.2.14 *************** *** 125,134 **** selector:@selector(handleMacroChangedNotification:) name:BDSKBibDocMacroKeyChangedNotification ! object:self]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleMacroChangedNotification:) name:BDSKBibDocMacroDefinitionChangedNotification ! object:self]; // It's wrong that we have to manually register for this, since the document is the window's delegate in IB (and debugging/logging appears to confirm this). --- 125,134 ---- selector:@selector(handleMacroChangedNotification:) name:BDSKBibDocMacroKeyChangedNotification ! object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleMacroChangedNotification:) name:BDSKBibDocMacroDefinitionChangedNotification ! object:nil]; // It's wrong that we have to manually register for this, since the document is the window's delegate in IB (and debugging/logging appears to confirm this). *************** *** 2507,2510 **** --- 2507,2514 ---- - (void)handleMacroChangedNotification:(NSNotification *)aNotification{ + id sender = [aNotification object]; + if([sender isKindOfClass:[BibDocument class]] && sender != self) + return; // only macro changes for ourselves or the global macros + [tableView reloadData]; [self updatePreviews:nil]; |