Revision: 10961
http://bibdesk.svn.sourceforge.net/bibdesk/?rev=10961&view=rev
Author: amaxwell
Date: 2007-08-20 13:52:15 -0700 (Mon, 20 Aug 2007)
Log Message:
-----------
Fix remaining warnings of shadowing parameters, locals, globals.
Modified Paths:
--------------
trunk/bibdesk/BDSKAlert.m
trunk/bibdesk/BDSKApplication.m
trunk/bibdesk/BDSKConditionsView.m
trunk/bibdesk/BDSKLogUtilities.m
trunk/bibdesk/BDSKSearchGroupSheetController.m
trunk/bibdesk/BDSKUpdateChecker.m
trunk/bibdesk/BibEditor.m
trunk/bibdesk/BibPref_Export.m
trunk/bibdesk/MacroWindowController.m
trunk/bibdesk/NSBezierPath_BDSKExtensions.m
Modified: trunk/bibdesk/BDSKAlert.m
===================================================================
--- trunk/bibdesk/BDSKAlert.m 2007-08-20 20:18:50 UTC (rev 10960)
+++ trunk/bibdesk/BDSKAlert.m 2007-08-20 20:52:15 UTC (rev 10961)
@@ -269,7 +269,7 @@
imageRect.size = [unbadgedImage size];
badgeRect = NSMakeRect(floorf(NSMidX(imageRect)), 1.0, ceilf(0.5 *
NSWidth(imageRect)), ceilf(0.5 * NSHeight(imageRect)));
- NSImage *image = [NSImage iconWithSize:imageRect.size
forToolboxCode:kAlertCautionIcon];
+ image = [NSImage iconWithSize:imageRect.size
forToolboxCode:kAlertCautionIcon];
[image lockFocus];
[unbadgedImage drawInRect:badgeRect fromRect:imageRect
operation:NSCompositeSourceOver fraction:1.0];
Modified: trunk/bibdesk/BDSKApplication.m
===================================================================
--- trunk/bibdesk/BDSKApplication.m 2007-08-20 20:18:50 UTC (rev 10960)
+++ trunk/bibdesk/BDSKApplication.m 2007-08-20 20:52:15 UTC (rev 10961)
@@ -69,18 +69,18 @@
- (id)targetForAction:(SEL)anAction to:(id)aTarget from:(id)sender{
if (anAction == @selector(undo:) || anAction == @selector(redo:)) {
- NSWindow *keyWindow = [self keyWindow];
- if ([keyWindow isSheet] && [keyWindow respondsToSelector:anAction])
- return keyWindow;
+ NSWindow *theKeyWindow = [self keyWindow];
+ if ([theKeyWindow isSheet] && [theKeyWindow
respondsToSelector:anAction])
+ return theKeyWindow;
}
return [super targetForAction:anAction to:aTarget from:sender];
}
- (BOOL)sendAction:(SEL)anAction to:(id)theTarget from:(id)sender{
if (anAction == @selector(undo:) || anAction == @selector(redo:)) {
- NSWindow *keyWindow = [self keyWindow];
- if ([keyWindow isSheet] && [keyWindow respondsToSelector:anAction])
- return [super sendAction:anAction to:keyWindow from:sender];
+ NSWindow *theKeyWindow = [self keyWindow];
+ if ([theKeyWindow isSheet] && [theKeyWindow
respondsToSelector:anAction])
+ return [super sendAction:anAction to:theKeyWindow from:sender];
}
return [super sendAction:anAction to:theTarget from:sender];
}
Modified: trunk/bibdesk/BDSKConditionsView.m
===================================================================
--- trunk/bibdesk/BDSKConditionsView.m 2007-08-20 20:18:50 UTC (rev 10960)
+++ trunk/bibdesk/BDSKConditionsView.m 2007-08-20 20:52:15 UTC (rev 10961)
@@ -115,7 +115,7 @@
unsigned int idx = [subviews indexOfObjectIdenticalTo:view];
if (idx != NSNotFound) {
- NSView *view = [subviews objectAtIndex:idx];
+
NSPoint newPoint = [view frame].origin;
float dy = NSHeight([view frame]) + SEPARATION;
Modified: trunk/bibdesk/BDSKLogUtilities.m
===================================================================
--- trunk/bibdesk/BDSKLogUtilities.m 2007-08-20 20:18:50 UTC (rev 10960)
+++ trunk/bibdesk/BDSKLogUtilities.m 2007-08-20 20:52:15 UTC (rev 10961)
@@ -344,8 +344,8 @@
val = asl_get(msg, ASL_KEY_TIME);
if (NULL == val) val = "0";
- time_t time = strtol(val, NULL, 0);
- date = [[NSDate dateWithTimeIntervalSince1970:time] copy];
+ time_t theTime = strtol(val, NULL, 0);
+ date = [[NSDate dateWithTimeIntervalSince1970:theTime] copy];
hash = [date hash];
val = asl_get(msg, ASL_KEY_SENDER);
Modified: trunk/bibdesk/BDSKSearchGroupSheetController.m
===================================================================
--- trunk/bibdesk/BDSKSearchGroupSheetController.m 2007-08-20 20:18:50 UTC
(rev 10960)
+++ trunk/bibdesk/BDSKSearchGroupSheetController.m 2007-08-20 20:52:15 UTC
(rev 10961)
@@ -99,7 +99,7 @@
if ([[[dirEnum fileAttributes] valueForKey:NSFileType]
isEqualToString:NSFileTypeDirectory]) {
[dirEnum skipDescendents];
} else if (isSearchFileAtPath([serversPath
stringByAppendingPathComponent:file])) {
- NSString *path = [serversPath
stringByAppendingPathComponent:file];
+ path = [serversPath stringByAppendingPathComponent:file];
NSDictionary *dict = [NSDictionary
dictionaryWithContentsOfFile:path];
BDSKServerInfo *info = [[BDSKServerInfo alloc]
initWithType:nil dictionary:dict];
if (info) {
@@ -483,19 +483,19 @@
BOOL collapse = [revealButton state] == NSOffState;
NSRect winRect = [[self window] frame];
NSSize minSize = [[self window] minSize];
- NSSize maxSize = [[self window] maxSize];
+ NSSize maximumSize = [[self window] maxSize];
float dh = [serverView minSize].height;
if (collapse)
dh *= -1;
winRect.size.height += dh;
winRect.origin.y -= dh;
minSize.height += dh;
- maxSize.height += dh;
+ maximumSize.height += dh;
if (collapse == NO)
[serverView setHidden:NO];
[[self window] setFrame:winRect display:[[self window] isVisible]
animate:[[self window] isVisible]];
[[self window] setMinSize:minSize];
- [[self window] setMaxSize:maxSize];
+ [[self window] setMaxSize:maximumSize];
if (collapse)
[serverView setHidden:YES];
}
Modified: trunk/bibdesk/BDSKUpdateChecker.m
===================================================================
--- trunk/bibdesk/BDSKUpdateChecker.m 2007-08-20 20:18:50 UTC (rev 10960)
+++ trunk/bibdesk/BDSKUpdateChecker.m 2007-08-20 20:52:15 UTC (rev 10961)
@@ -366,8 +366,8 @@
// a zero interval indicates that automatic update checking should not be
performed
- (NSTimeInterval)updateCheckTimeInterval;
{
- CFAbsoluteTime time = 0;
- return (NSTimeInterval)CFAbsoluteTimeAddGregorianUnits(time, NULL, [self
updateCheckGregorianUnits]);
+ CFAbsoluteTime cfTime = 0;
+ return (NSTimeInterval)CFAbsoluteTimeAddGregorianUnits(cfTime, NULL, [self
updateCheckGregorianUnits]);
}
// returns UTC date of next update check
Modified: trunk/bibdesk/BibEditor.m
===================================================================
--- trunk/bibdesk/BibEditor.m 2007-08-20 20:18:50 UTC (rev 10960)
+++ trunk/bibdesk/BibEditor.m 2007-08-20 20:52:15 UTC (rev 10961)
@@ -3821,7 +3821,8 @@
NSPoint origin = [extraBibFields frame].origin;
float width = NSWidth([[extraBibFields enclosingScrollView] frame]) -
[NSScroller scrollerWidth];
float spacing = [extraBibFields intercellSpacing].width;
- int numCols = MAX(MIN(floor((width + spacing) / (cellWidth + spacing)),
numEntries), 1);
+ int numCols = MIN(floor((width + spacing) / (cellWidth + spacing)),
numEntries);
+ numCols = MAX(numCols, 1);
int numRows = (numEntries / numCols) + (numEntries % numCols == 0 ? 0 : 1);
while ([extraBibFields numberOfRows])
@@ -3859,7 +3860,8 @@
float width = NSWidth([[extraBibFields enclosingScrollView] frame]) -
[NSScroller scrollerWidth];
float spacing = [extraBibFields intercellSpacing].width;
float cellWidth = [extraBibFields cellSize].width;
- int numCols = MAX(MIN(floor((width + spacing) / (cellWidth + spacing)),
numEntries), 1);
+ int numCols = MIN(floor((width + spacing) / (cellWidth + spacing)),
numEntries);
+ numCols = MAX(numCols, 1);
if (numCols != [extraBibFields numberOfColumns])
[self setupMatrix];
}
Modified: trunk/bibdesk/BibPref_Export.m
===================================================================
--- trunk/bibdesk/BibPref_Export.m 2007-08-20 20:18:50 UTC (rev 10960)
+++ trunk/bibdesk/BibPref_Export.m 2007-08-20 20:52:15 UTC (rev 10961)
@@ -469,11 +469,11 @@
[chooseMainPagePopup
addItemWithTitle:NSLocalizedString(@"Separate templates", @"Popup menu item
title")];
[chooseMainPagePopup addItemsWithTitles:[fileNames
valueForKey:@"lastPathComponent"]];
[chooseMainPagePopup selectItemAtIndex:0];
- NSDictionary *info = [[NSDictionary alloc]
initWithObjectsAndKeys:fileNames, @"fileNames", [NSNumber numberWithInt:idx],
@"index", nil];
+ NSDictionary *contextInfo = [[NSDictionary alloc]
initWithObjectsAndKeys:fileNames, @"fileNames", [NSNumber numberWithInt:idx],
@"index", nil];
[NSApp beginSheet:chooseMainPageSheet modalForWindow:[[self
controlBox] window]
modalDelegate:self
didEndSelector:@selector(chooseMainPageSheetDidEnd:returnCode:contextInfo:)
- contextInfo:info];
+
contextInfo:contextInfo];
return YES;
}
} else if ([item isLeaf] == NO && idx != NSOutlineViewDropOnItemIndex
&& idx > 0) {
Modified: trunk/bibdesk/MacroWindowController.m
===================================================================
--- trunk/bibdesk/MacroWindowController.m 2007-08-20 20:18:50 UTC (rev
10960)
+++ trunk/bibdesk/MacroWindowController.m 2007-08-20 20:52:15 UTC (rev
10961)
@@ -363,7 +363,6 @@
return;
}
- NSDictionary *macroDefinitions = [(BDSKMacroResolver *)macroResolver
macroDefinitions];
if([macroResolver macroDefinition:[macroDefinitions
objectForKey:key] dependsOnMacro:object]){
[tableView reloadData];
[tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:row]
byExtendingSelection:NO];
Modified: trunk/bibdesk/NSBezierPath_BDSKExtensions.m
===================================================================
--- trunk/bibdesk/NSBezierPath_BDSKExtensions.m 2007-08-20 20:18:50 UTC (rev
10960)
+++ trunk/bibdesk/NSBezierPath_BDSKExtensions.m 2007-08-20 20:52:15 UTC (rev
10961)
@@ -62,7 +62,8 @@
OBASSERT([NSThread inMainThread]);
// Make sure radius doesn't exceed a maximum size to avoid artifacts:
- radius = MIN(radius, 0.5f * MIN(NSHeight(rect), NSWidth(rect)));
+ float rectLimit = MIN(NSHeight(rect), NSWidth(rect));
+ radius = MIN(radius, 0.5f * rectLimit);
// Make sure silly values simply lead to un-rounded corners:
if( radius <= 0 )
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit