mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Remove direct usage of isa.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32248 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
251b1edd94
commit
d83fb0774b
7 changed files with 44 additions and 35 deletions
|
@ -1,3 +1,12 @@
|
|||
2011-02-20 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSScreen.m,
|
||||
* Source/NSWindow.m,
|
||||
* Source/NSToolbar.m,
|
||||
* Source/NSScroller.m,
|
||||
* Source/NSTextView.m: Remove diract usage of isa.
|
||||
* Source/GSBindingHelpers.h: Replace #include with #import.
|
||||
|
||||
2011-02-19 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Tests/GNUmakefile: Run/clean tests
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#ifndef _GS_BINDING_HELPER_H
|
||||
#define _GS_BINDING_HELPER_H
|
||||
|
||||
#include <Foundation/NSObject.h>
|
||||
#import <Foundation/NSObject.h>
|
||||
|
||||
@class NSString;
|
||||
@class NSDictionary;
|
||||
|
|
|
@ -234,7 +234,7 @@ static NSMutableArray *screenArray = nil;
|
|||
{
|
||||
if (anObject == self)
|
||||
return YES;
|
||||
if ([anObject isKindOfClass: self->isa] == NO)
|
||||
if ([anObject isKindOfClass: [self class]] == NO)
|
||||
return NO;
|
||||
if (_screenNumber == ((NSScreen *)anObject)->_screenNumber)
|
||||
return YES;
|
||||
|
|
|
@ -31,23 +31,23 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
#include <Foundation/NSDate.h>
|
||||
#include <Foundation/NSRunLoop.h>
|
||||
#include <Foundation/NSNotification.h>
|
||||
#include <Foundation/NSUserDefaults.h>
|
||||
#include <Foundation/NSDebug.h>
|
||||
#import <Foundation/NSDate.h>
|
||||
#import <Foundation/NSRunLoop.h>
|
||||
#import <Foundation/NSNotification.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
#import <Foundation/NSDebug.h>
|
||||
|
||||
#include "AppKit/NSApplication.h"
|
||||
#include "AppKit/NSButtonCell.h"
|
||||
#include "AppKit/NSColor.h"
|
||||
#include "AppKit/NSEvent.h"
|
||||
#include "AppKit/NSImage.h"
|
||||
#include "AppKit/NSGraphics.h"
|
||||
#include "AppKit/NSScroller.h"
|
||||
#include "AppKit/NSScrollView.h"
|
||||
#include "AppKit/NSWindow.h"
|
||||
#import "AppKit/NSApplication.h"
|
||||
#import "AppKit/NSButtonCell.h"
|
||||
#import "AppKit/NSColor.h"
|
||||
#import "AppKit/NSEvent.h"
|
||||
#import "AppKit/NSImage.h"
|
||||
#import "AppKit/NSGraphics.h"
|
||||
#import "AppKit/NSScroller.h"
|
||||
#import "AppKit/NSScrollView.h"
|
||||
#import "AppKit/NSWindow.h"
|
||||
|
||||
#include "GNUstepGUI/GSTheme.h"
|
||||
#import "GNUstepGUI/GSTheme.h"
|
||||
|
||||
/**<p>TODO Description</p>
|
||||
*/
|
||||
|
@ -358,12 +358,12 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
|
|||
if (frameRect.size.width > frameRect.size.height)
|
||||
{
|
||||
_scFlags.isHorizontal = YES;
|
||||
frameRect.size.height = [isa scrollerWidth];
|
||||
frameRect.size.height = [[self class] scrollerWidth];
|
||||
}
|
||||
else
|
||||
{
|
||||
_scFlags.isHorizontal = NO;
|
||||
frameRect.size.width = [isa scrollerWidth];
|
||||
frameRect.size.width = [[self class] scrollerWidth];
|
||||
}
|
||||
|
||||
self = [super initWithFrame: frameRect];
|
||||
|
@ -469,7 +469,7 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
|
|||
{
|
||||
NSSize frameSize = _frame.size;
|
||||
float size = (_scFlags.isHorizontal ? frameSize.width : frameSize.height);
|
||||
int buttonsWidth = [isa scrollerWidth] - 2*buttonsOffset;
|
||||
int buttonsWidth = [[self class] scrollerWidth] - 2*buttonsOffset;
|
||||
|
||||
if (_arrowsPosition == NSScrollerArrowsNone)
|
||||
{
|
||||
|
@ -620,12 +620,12 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
|
|||
if (frameRect.size.width > frameRect.size.height)
|
||||
{
|
||||
_scFlags.isHorizontal = YES;
|
||||
frameRect.size.height = [isa scrollerWidth];
|
||||
frameRect.size.height = [[self class] scrollerWidth];
|
||||
}
|
||||
else
|
||||
{
|
||||
_scFlags.isHorizontal = NO;
|
||||
frameRect.size.width = [isa scrollerWidth];
|
||||
frameRect.size.width = [[self class] scrollerWidth];
|
||||
}
|
||||
|
||||
[super setFrame: frameRect];
|
||||
|
@ -654,12 +654,12 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
|
|||
if (size.width > size.height)
|
||||
{
|
||||
_scFlags.isHorizontal = YES;
|
||||
size.height = [isa scrollerWidth];
|
||||
size.height = [[self class] scrollerWidth];
|
||||
}
|
||||
else
|
||||
{
|
||||
_scFlags.isHorizontal = NO;
|
||||
size.width = [isa scrollerWidth];
|
||||
size.width = [[self class] scrollerWidth];
|
||||
}
|
||||
|
||||
[super setFrameSize: size];
|
||||
|
@ -1160,7 +1160,7 @@ static float buttonsOffset = 1.0; // buttonsWidth = sw - 2*buttonsOffset
|
|||
[self drawParts];
|
||||
[self checkSpaceForParts];
|
||||
}
|
||||
buttonsWidth = ([isa scrollerWidth] - 2 * buttonsOffset);
|
||||
buttonsWidth = ([[self class] scrollerWidth] - 2 * buttonsOffset);
|
||||
x = y = buttonsOffset;
|
||||
buttonsSize = 2 * buttonsWidth + 2 * buttonsOffset;
|
||||
|
||||
|
|
|
@ -692,7 +692,7 @@ If a text view is added to an empty text network, it keeps its attributes.
|
|||
return nil;
|
||||
|
||||
if (!did_register_for_services)
|
||||
[isa registerForServices];
|
||||
[[self class] registerForServices];
|
||||
|
||||
_minSize = frameRect.size;
|
||||
_maxSize = NSMakeSize(frameRect.size.width, HUGE);
|
||||
|
@ -1010,7 +1010,7 @@ that makes decoding and encoding compatible with the old code.
|
|||
|
||||
// register for services...
|
||||
if (!did_register_for_services)
|
||||
[isa registerForServices];
|
||||
[[self class] registerForServices];
|
||||
|
||||
[self updateDragTypeRegistration];
|
||||
|
||||
|
@ -1042,7 +1042,7 @@ that makes decoding and encoding compatible with the old code.
|
|||
* set the isa pointer so that the subclass dealloc methods
|
||||
* won't get called again.
|
||||
*/
|
||||
isa = [NSTextView class];
|
||||
GSClassSwizzle(self, [NSTextView class]);
|
||||
DESTROY(_textStorage);
|
||||
return;
|
||||
}
|
||||
|
@ -1144,7 +1144,7 @@ to this method from the text container or layout manager.
|
|||
|
||||
DESTROY(_layoutManager->_typingAttributes);
|
||||
|
||||
_layoutManager->_typingAttributes = [[isa defaultTypingAttributes] mutableCopy];
|
||||
_layoutManager->_typingAttributes = [[[self class] defaultTypingAttributes] mutableCopy];
|
||||
_layoutManager->_original_selected_range.location = NSNotFound;
|
||||
_layoutManager->_selected_range = NSMakeRange(0,0);
|
||||
}
|
||||
|
@ -3175,7 +3175,7 @@ This method is for user changes; see NSTextView_actions.m.
|
|||
|
||||
if (attrs == nil)
|
||||
{
|
||||
attrs = [isa defaultTypingAttributes];
|
||||
attrs = [[self class] defaultTypingAttributes];
|
||||
}
|
||||
|
||||
old_attrs = _layoutManager->_typingAttributes;
|
||||
|
|
|
@ -1087,7 +1087,7 @@ static GSValidationCenter *vc = nil;
|
|||
NSArray *linked;
|
||||
id toolbar;
|
||||
|
||||
linked = [isa _toolbarsWithIdentifier: [self identifier]];
|
||||
linked = [[self class] _toolbarsWithIdentifier: [self identifier]];
|
||||
|
||||
if (linked != nil && [linked count] > 0)
|
||||
{
|
||||
|
|
|
@ -751,7 +751,7 @@ many times.
|
|||
{
|
||||
DESTROY(_toolbar);
|
||||
[nc removeObserver: self];
|
||||
[isa _removeAutodisplayedWindow: self];
|
||||
[[self class] _removeAutodisplayedWindow: self];
|
||||
[NSApp removeWindowsItem: self];
|
||||
[NSApp _windowWillDealloc: self];
|
||||
|
||||
|
@ -1708,7 +1708,7 @@ many times.
|
|||
/*
|
||||
* Don't keep trying to update the window while it is ordered out
|
||||
*/
|
||||
[isa _removeAutodisplayedWindow: self];
|
||||
[[self class] _removeAutodisplayedWindow: self];
|
||||
[self _lossOfKeyOrMainWindow];
|
||||
}
|
||||
else
|
||||
|
@ -1757,7 +1757,7 @@ many times.
|
|||
* Once we are ordered back in, we will want to update the window
|
||||
* whenever there is anything to do.
|
||||
*/
|
||||
[isa _addAutodisplayedWindow: self];
|
||||
[[self class] _addAutodisplayedWindow: self];
|
||||
|
||||
if (_f.has_closed == YES)
|
||||
{
|
||||
|
@ -2524,7 +2524,7 @@ many times.
|
|||
{
|
||||
if (limit == 0)
|
||||
{
|
||||
limit = [isa defaultDepthLimit];
|
||||
limit = [[self class] defaultDepthLimit];
|
||||
}
|
||||
|
||||
_depthLimit = limit;
|
||||
|
|
Loading…
Reference in a new issue