Small tidyup in NSSplitView -adjustSubviews

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26419 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2008-04-01 00:39:06 +00:00
parent f5c9c19113
commit 190c13dca9
2 changed files with 8 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2008-04-01 Nicola Pero <nicola.pero@meta-innovation.com>
* Source/NSSplitView.m ([-adjustSubviews]): Removed unused
variable and a few unnecessary method calls.
2008-03-31 Xavier Glattard <xavier.glattard@online.fr> 2008-03-31 Xavier Glattard <xavier.glattard@online.fr>
* Source/NSOpenGLView.m: Use _lockFocusInContext:withRect instead of * Source/NSOpenGLView.m: Use _lockFocusInContext:withRect instead of

View file

@ -633,7 +633,6 @@ static NSNotificationCenter *nc = nil;
NSSize newSize; NSSize newSize;
NSPoint newPoint; NSPoint newPoint;
unsigned i; unsigned i;
NSRect r;
float oldTotal; float oldTotal;
float newTotal; float newTotal;
float scale; float scale;
@ -659,7 +658,6 @@ static NSNotificationCenter *nc = nil;
{ {
float newHeight; float newHeight;
r = [views[i] frame];
newHeight = NSHeight(frames[i]) * scale; newHeight = NSHeight(frames[i]) * scale;
if (i == count - 1) if (i == count - 1)
{ {
@ -682,7 +680,8 @@ static NSNotificationCenter *nc = nil;
oldTotal = 0.0; oldTotal = 0.0;
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
{ {
oldTotal += NSWidth([views[i] frame]); frames[i] = [views[i] frame];
oldTotal += NSWidth(frames[i]);
} }
scale = newTotal/oldTotal; scale = newTotal/oldTotal;
running = 0.0; running = 0.0;
@ -690,8 +689,7 @@ static NSNotificationCenter *nc = nil;
{ {
float newWidth; float newWidth;
r = [views[i] frame]; newWidth = NSWidth(frames[i]) * scale;
newWidth = NSWidth(r) * scale;
if (i == count - 1) if (i == count - 1)
{ {
newWidth = floor(newWidth); newWidth = floor(newWidth);