mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 02:04:20 +00:00
Removed some compiler warnings and unneeded direct drawing.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23119 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7069a80090
commit
4986199ba1
5 changed files with 26 additions and 19 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
2006-07-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSTextView.m (-rulerView:didMoveMarker:,
|
||||
-rulerView:didRemoveMarker:, -rulerView:didAddMarker:): Removed a
|
||||
compiler warning by adding a type cast.
|
||||
* Source/NSTextView.m (-initWithCoder:) Removed unused variables.
|
||||
* Source/NSTextView.m (NSTextViewSharedData -dealloc) Call super dealloc.
|
||||
* Source/NSApplication.m (-initWithCoder:) Set delegate only when
|
||||
the keyed decoder contains it.
|
||||
* Source/NSSlider.m (-trackKnob:knobRect:, mouseDown:) Don't draw
|
||||
explicitly, as this gets handled automatically by the cell.
|
||||
* Source/NSOutlineView.m (-editColumn:row:withEvent:select:) Moved
|
||||
the lockFocus call right around the image cell drawing, as it is
|
||||
only needed here.
|
||||
|
||||
2006-06-25 12:40 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/GSNibCompatibility.m: Added NSDecimalNumberPlaceholder
|
||||
|
|
|
@ -3316,8 +3316,8 @@ image.</p><p>See Also: -applicationIconImage</p>
|
|||
if([aDecoder containsValueForKey: @"NSDelegate"])
|
||||
{
|
||||
obj = [aDecoder decodeObjectForKey: @"NSDelegate"];
|
||||
[self setDelegate: obj];
|
||||
}
|
||||
[self setDelegate: obj];
|
||||
obj = [aDecoder decodeObjectForKey: @"NSMainMenu"]; // TODO_NIB: Verify this key!!
|
||||
[self setMainMenu: obj];
|
||||
obj = [aDecoder decodeObjectForKey: @"NSWindowsMenu"]; // TODO_NIB: Verify this key!!
|
||||
|
|
|
@ -1456,8 +1456,6 @@ static NSImage *unexpandable = nil;
|
|||
// move the drawing rect over like in the drawRow routine...
|
||||
drawingRect = [self frameOfCellAtColumn: columnIndex row: rowIndex];
|
||||
|
||||
[self lockFocus];
|
||||
|
||||
if (tb == [self outlineTableColumn])
|
||||
{
|
||||
level = [self levelForItem: item];
|
||||
|
@ -1481,7 +1479,10 @@ static NSImage *unexpandable = nil;
|
|||
// draw...
|
||||
imageRect.size.width = [image size].width;
|
||||
imageRect.size.height = [image size].height;
|
||||
|
||||
[self lockFocus];
|
||||
[imageCell drawWithFrame: imageRect inView: self];
|
||||
[self unlockFocus];
|
||||
}
|
||||
|
||||
if (flag)
|
||||
|
@ -1502,7 +1503,6 @@ static NSImage *unexpandable = nil;
|
|||
event: theEvent];
|
||||
}
|
||||
|
||||
[self unlockFocus];
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -384,8 +384,6 @@ static Class cellClass;
|
|||
[NSEvent startPeriodicEventsAfterDelay: 0.05 withPeriod: 0.05];
|
||||
[[NSRunLoop currentRunLoop] limitDateForMode: NSEventTrackingRunLoopMode];
|
||||
|
||||
[self lockFocus];
|
||||
|
||||
while (eventType != NSLeftMouseUp)
|
||||
{
|
||||
theEvent = [app nextEventMatchingMask: eventMask
|
||||
|
@ -412,8 +410,6 @@ static Class cellClass;
|
|||
if (floatValue != oldFloatValue)
|
||||
{
|
||||
[_cell setFloatValue: floatValue];
|
||||
[_cell drawWithFrame: _bounds inView: self];
|
||||
[_window flushWindow];
|
||||
if (isContinuous)
|
||||
{
|
||||
[self sendAction: action to: target];
|
||||
|
@ -424,7 +420,7 @@ static Class cellClass;
|
|||
}
|
||||
}
|
||||
}
|
||||
[self unlockFocus];
|
||||
|
||||
// If the control is not continuous send the action at the end of the drag
|
||||
if (!isContinuous)
|
||||
{
|
||||
|
@ -457,13 +453,10 @@ static Class cellClass;
|
|||
{
|
||||
[self sendAction: [_cell action] to: [_cell target]];
|
||||
}
|
||||
[self lockFocus];
|
||||
[_cell drawWithFrame: _bounds inView: self];
|
||||
[self unlockFocus];
|
||||
[_window flushWindow];
|
||||
}
|
||||
|
||||
[self trackKnob: theEvent knobRect: rect];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -171,6 +171,7 @@ Interface for a bunch of internal methods that need to be cleaned up.
|
|||
RELEASE(linkAttr);
|
||||
RELEASE(markAttr);
|
||||
RELEASE(selectedAttr);
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSColor *)backgroundColor
|
||||
|
@ -693,8 +694,6 @@ that makes decoding and encoding compatible with the old code.
|
|||
self = [super initWithCoder: aDecoder];
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
NSTextContainer *aTextContainer;
|
||||
|
||||
if ([aDecoder containsValueForKey: @"NSDelegate"])
|
||||
{
|
||||
[self setDelegate: [aDecoder decodeObjectForKey: @"NSDelegate"]];
|
||||
|
@ -764,7 +763,7 @@ that makes decoding and encoding compatible with the old code.
|
|||
|
||||
if ([aDecoder containsValueForKey: @"NSTVFlags"])
|
||||
{
|
||||
int vFlags = [aDecoder decodeIntForKey: @"NSTVFlags"];
|
||||
//int vFlags = [aDecoder decodeIntForKey: @"NSTVFlags"];
|
||||
// these flags are not used...
|
||||
}
|
||||
|
||||
|
@ -3361,7 +3360,7 @@ Figure out how the additional layout stuff is supposed to work.
|
|||
- (void) rulerView: (NSRulerView *)ruler
|
||||
didMoveMarker: (NSRulerMarker *)marker
|
||||
{
|
||||
NSTextTab *old_tab = [marker representedObject];
|
||||
NSTextTab *old_tab = (NSTextTab *)[marker representedObject];
|
||||
NSTextTab *new_tab = [[NSTextTab alloc] initWithType: [old_tab tabStopType]
|
||||
location: [marker markerLocation]];
|
||||
NSRange range = [self rangeForUserParagraphAttributeChange];
|
||||
|
@ -3430,7 +3429,7 @@ Figure out how the additional layout stuff is supposed to work.
|
|||
- (void) rulerView: (NSRulerView *)ruler
|
||||
didRemoveMarker: (NSRulerMarker *)marker
|
||||
{
|
||||
NSTextTab *tab = [marker representedObject];
|
||||
NSTextTab *tab = (NSTextTab *)[marker representedObject];
|
||||
NSRange range = [self rangeForUserParagraphAttributeChange];
|
||||
unsigned loc = range.location;
|
||||
NSParagraphStyle *style;
|
||||
|
@ -3489,7 +3488,7 @@ Figure out how the additional layout stuff is supposed to work.
|
|||
- (void) rulerView: (NSRulerView *)ruler
|
||||
didAddMarker: (NSRulerMarker *)marker
|
||||
{
|
||||
NSTextTab *old_tab = [marker representedObject];
|
||||
NSTextTab *old_tab = (NSTextTab *)[marker representedObject];
|
||||
NSTextTab *new_tab = [[NSTextTab alloc] initWithType: [old_tab tabStopType]
|
||||
location: [marker markerLocation]];
|
||||
NSRange range = [self rangeForUserParagraphAttributeChange];
|
||||
|
|
Loading…
Reference in a new issue