Revision: 7163
          http://skim-app.svn.sourceforge.net/skim-app/?rev=7163&view=rev
Author:   hofman
Date:     2011-03-14 12:36:28 +0000 (Mon, 14 Mar 2011)

Log Message:
-----------
refactor inits, separate assignment and check of self

Modified Paths:
--------------
    trunk/NSMenu_SKExtensions.m
    trunk/NSValueTransformer_SKExtensions.m
    trunk/PDFAnnotationCircle_SKExtensions.m
    trunk/PDFAnnotationFreeText_SKExtensions.m
    trunk/PDFAnnotationInk_SKExtensions.m
    trunk/PDFAnnotationLine_SKExtensions.m
    trunk/PDFAnnotationMarkup_SKExtensions.m
    trunk/PDFAnnotationSquare_SKExtensions.m
    trunk/SKAccessibilityFauxUIElement.m
    trunk/SKAnnotationTypeImageCell.m
    trunk/SKBookmark.m
    trunk/SKBookmarkController.m
    trunk/SKBorderlessImageWindow.m
    trunk/SKColorSwatch.m
    trunk/SKFindFieldEditor.m
    trunk/SKFloatMapTable.m
    trunk/SKFontWell.m
    trunk/SKGradientView.m
    trunk/SKGroupedSearchResult.m
    trunk/SKImageToolTipWindow.m
    trunk/SKLineWell.m
    trunk/SKNPDFAnnotationNote_SKExtensions.m
    trunk/SKNavigationWindow.m
    trunk/SKNumberArrayFormatter.m
    trunk/SKPDFSynchronizer.m
    trunk/SKPDFView.m
    trunk/SKRemoteStateWindow.m
    trunk/SKScriptMenu.m
    trunk/SKSecondaryPDFView.m
    trunk/SKSideWindow.m
    trunk/SKSnapshotPDFView.m
    trunk/SKSnapshotPageCell.m
    trunk/SKSplitView.m
    trunk/SKStatusBar.m
    trunk/SKTemplateTag.m
    trunk/SKTextWithIconCell.m
    trunk/SKThumbnail.m
    trunk/SKTransitionInfo.m
    trunk/SKTypeSelectHelper.m
    trunk/vendorsrc/ulikusterer/UKKQueue.m

Modified: trunk/NSMenu_SKExtensions.m
===================================================================
--- trunk/NSMenu_SKExtensions.m 2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/NSMenu_SKExtensions.m 2011-03-14 12:36:28 UTC (rev 7163)
@@ -114,7 +114,8 @@
 }
 
 - (id)initWithTitle:(NSString *)aString imageNamed:(NSString *)anImageName 
action:(SEL)aSelector target:(id)aTarget tag:(NSInteger)aTag {
-    if (self = [self initWithTitle:aString action:aSelector 
keyEquivalent:@""]) {
+    self = [self initWithTitle:aString action:aSelector keyEquivalent:@""];
+    if (self) {
         if (anImageName)
             [self setImage:[NSImage imageNamed:anImageName]];
         [self setTarget:aTarget];
@@ -124,7 +125,8 @@
 }
 
 - (id)initWithTitle:(NSString *)aString submenu:(NSMenu *)aSubmenu {
-    if (self = [self initWithTitle:aString action:NULL keyEquivalent:@""]) {
+    self = [self initWithTitle:aString action:NULL keyEquivalent:@""];
+    if (self) {
         [self setSubmenu:aSubmenu];
     }
     return self;

Modified: trunk/NSValueTransformer_SKExtensions.m
===================================================================
--- trunk/NSValueTransformer_SKExtensions.m     2011-03-13 23:57:56 UTC (rev 
7162)
+++ trunk/NSValueTransformer_SKExtensions.m     2011-03-14 12:36:28 UTC (rev 
7163)
@@ -65,7 +65,8 @@
 }
 
 - (id)initWithValueTransformer:(NSValueTransformer *)aValueTransformer {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         if (aValueTransformer) {
             valueTransformer = [aValueTransformer retain];
         } else {

Modified: trunk/PDFAnnotationCircle_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationCircle_SKExtensions.m    2011-03-13 23:57:56 UTC (rev 
7162)
+++ trunk/PDFAnnotationCircle_SKExtensions.m    2011-03-14 12:36:28 UTC (rev 
7163)
@@ -49,7 +49,8 @@
 @implementation PDFAnnotationCircle (SKExtensions)
 
 - (id)initSkimNoteWithBounds:(NSRect)bounds {
-    if (self = [super initSkimNoteWithBounds:bounds]) {
+    self = [super initSkimNoteWithBounds:bounds];
+    if (self) {
         if (SKPDFAnnotationLeaksBorder)
             [[self border] release];
         NSColor *color = [[NSUserDefaults standardUserDefaults] 
colorForKey:SKCircleNoteInteriorColorKey];

Modified: trunk/PDFAnnotationFreeText_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationFreeText_SKExtensions.m  2011-03-13 23:57:56 UTC (rev 
7162)
+++ trunk/PDFAnnotationFreeText_SKExtensions.m  2011-03-14 12:36:28 UTC (rev 
7163)
@@ -58,7 +58,8 @@
 @implementation PDFAnnotationFreeText (SKExtensions)
 
 - (id)initSkimNoteWithBounds:(NSRect)bounds {
-    if (self = [super initSkimNoteWithBounds:bounds]) {
+    self = [super initSkimNoteWithBounds:bounds];
+    if (self) {
         NSFont *font = [NSFont fontWithName:[[NSUserDefaults 
standardUserDefaults] stringForKey:SKFreeTextNoteFontNameKey]
                                        size:[[NSUserDefaults 
standardUserDefaults] floatForKey:SKFreeTextNoteFontSizeKey]];
         if (font)

Modified: trunk/PDFAnnotationInk_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationInk_SKExtensions.m       2011-03-13 23:57:56 UTC (rev 
7162)
+++ trunk/PDFAnnotationInk_SKExtensions.m       2011-03-14 12:36:28 UTC (rev 
7163)
@@ -51,7 +51,8 @@
 @implementation PDFAnnotationInk (SKExtensions)
 
 - (id)initSkimNoteWithBounds:(NSRect)bounds {   
-    if (self = [super initSkimNoteWithBounds:bounds]) {         
+    self = [super initSkimNoteWithBounds:bounds];
+    if (self) {         
         if (SKPDFAnnotationLeaksBorder)
             [[self border] release];
         [self setColor:[[NSUserDefaults standardUserDefaults] 
colorForKey:SKInkNoteColorKey]];          
@@ -75,7 +76,8 @@
     bounds = NSInsetRect(NSIntegralRect(bounds), -8.0, -8.0);
     [transform translateXBy:-NSMinX(bounds) yBy:-NSMinY(bounds)];
     
-    if (self = [self initSkimNoteWithBounds:bounds]) {
+    self = [self initSkimNoteWithBounds:bounds];
+    if (self) {
         for (path in paths) {
             [path transformUsingAffineTransform:transform];
             [self addBezierPath:path];

Modified: trunk/PDFAnnotationLine_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationLine_SKExtensions.m      2011-03-13 23:57:56 UTC (rev 
7162)
+++ trunk/PDFAnnotationLine_SKExtensions.m      2011-03-14 12:36:28 UTC (rev 
7163)
@@ -57,7 +57,8 @@
 @implementation PDFAnnotationLine (SKExtensions)
 
 - (id)initSkimNoteWithBounds:(NSRect)bounds {   
-    if (self = [super initSkimNoteWithBounds:bounds]) {         
+    self = [super initSkimNoteWithBounds:bounds];
+    if (self) {         
         [self setColor:[[NSUserDefaults standardUserDefaults] 
colorForKey:SKLineNoteColorKey]];         
         NSColor *color = [[NSUserDefaults standardUserDefaults] 
colorForKey:SKLineNoteInteriorColorKey];
         if ([color alphaComponent] > 0.0)

Modified: trunk/PDFAnnotationMarkup_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationMarkup_SKExtensions.m    2011-03-13 23:57:56 UTC (rev 
7162)
+++ trunk/PDFAnnotationMarkup_SKExtensions.m    2011-03-14 12:36:28 UTC (rev 
7163)
@@ -133,7 +133,8 @@
 }
 
 - (id)initSkimNoteWithBounds:(NSRect)bounds markupType:(NSInteger)type 
quadrilateralPointsAsStrings:(NSArray *)pointStrings {
-    if (self = [super initSkimNoteWithBounds:bounds]) {
+    self = [super initSkimNoteWithBounds:bounds];
+    if (self) {
         [self setMarkupType:type];
         
         NSColor *color = [[self class] defaultSkimNoteColorForMarkupType:type];
@@ -157,39 +158,42 @@
     if ([selection hasCharacters] == NO || NSIsEmptyRect(bounds)) {
         [[self initWithBounds:NSZeroRect] release];
         self = nil;
-    } else if (self = [self initSkimNoteWithBounds:bounds markupType:type 
quadrilateralPointsAsStrings:nil]) {
-        PDFPage *page = [selection safeFirstPage];
-        NSInteger rotation = floor(NSAppKitVersionNumber) > 
NSAppKitVersionNumber10_5 ? [page rotation] : 0;
-        NSMutableArray *quadPoints = [[NSMutableArray alloc] init];
-        NSRect newBounds = NSZeroRect;
-        if (selection) {
-            NSUInteger i, iMax;
-            NSRect lineRect = NSZeroRect;
-            for (PDFSelection *sel in [selection selectionsByLine]) {
-                lineRect = [sel boundsForPage:page];
-                if (NSIsEmptyRect(lineRect) == NO && [[sel string] 
rangeOfCharacterFromSet:[NSCharacterSet 
nonWhitespaceAndNewlineCharacterSet]].length) {
-                     [[self lineRects] addPointer:&lineRect];
-                     newBounds = NSUnionRect(lineRect, newBounds);
-                }
-            } 
-            if (NSIsEmptyRect(newBounds)) {
-                [self release];
-                self = nil;
-            } else {
-                [self setBounds:newBounds];
-                if ([self hasLineRects]) {
-                    NSPointerArray *lines = [self lineRects];
-                    iMax = [lines count];
-                    for (i = 0; i < iMax; i++) {
-                        NSArray *quadLine = 
createQuadPointsWithBounds(*(NSRectPointer)[lines pointerAtIndex:i], [self 
bounds].origin, rotation);
-                        [quadPoints addObjectsFromArray:quadLine];
-                        [quadLine release];
+    } else {
+        self = [self initSkimNoteWithBounds:bounds markupType:type 
quadrilateralPointsAsStrings:nil];
+        if (self) {
+            PDFPage *page = [selection safeFirstPage];
+            NSInteger rotation = floor(NSAppKitVersionNumber) > 
NSAppKitVersionNumber10_5 ? [page rotation] : 0;
+            NSMutableArray *quadPoints = [[NSMutableArray alloc] init];
+            NSRect newBounds = NSZeroRect;
+            if (selection) {
+                NSUInteger i, iMax;
+                NSRect lineRect = NSZeroRect;
+                for (PDFSelection *sel in [selection selectionsByLine]) {
+                    lineRect = [sel boundsForPage:page];
+                    if (NSIsEmptyRect(lineRect) == NO && [[sel string] 
rangeOfCharacterFromSet:[NSCharacterSet 
nonWhitespaceAndNewlineCharacterSet]].length) {
+                         [[self lineRects] addPointer:&lineRect];
+                         newBounds = NSUnionRect(lineRect, newBounds);
                     }
+                } 
+                if (NSIsEmptyRect(newBounds)) {
+                    [self release];
+                    self = nil;
+                } else {
+                    [self setBounds:newBounds];
+                    if ([self hasLineRects]) {
+                        NSPointerArray *lines = [self lineRects];
+                        iMax = [lines count];
+                        for (i = 0; i < iMax; i++) {
+                            NSArray *quadLine = 
createQuadPointsWithBounds(*(NSRectPointer)[lines pointerAtIndex:i], [self 
bounds].origin, rotation);
+                            [quadPoints addObjectsFromArray:quadLine];
+                            [quadLine release];
+                        }
+                    }
                 }
             }
+            [self setQuadrilateralPoints:quadPoints];
+            [quadPoints release];
         }
-        [self setQuadrilateralPoints:quadPoints];
-        [quadPoints release];
     }
     return self;
 }

Modified: trunk/PDFAnnotationSquare_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationSquare_SKExtensions.m    2011-03-13 23:57:56 UTC (rev 
7162)
+++ trunk/PDFAnnotationSquare_SKExtensions.m    2011-03-14 12:36:28 UTC (rev 
7163)
@@ -49,7 +49,8 @@
 @implementation PDFAnnotationSquare (SKExtensions)
 
 - (id)initSkimNoteWithBounds:(NSRect)bounds {
-    if (self = [super initSkimNoteWithBounds:bounds]) {
+    self = [super initSkimNoteWithBounds:bounds];
+    if (self) {
         if (SKPDFAnnotationLeaksBorder)
             [[self border] release];
         NSColor *color = [[NSUserDefaults standardUserDefaults] 
colorForKey:SKSquareNoteInteriorColorKey];

Modified: trunk/SKAccessibilityFauxUIElement.m
===================================================================
--- trunk/SKAccessibilityFauxUIElement.m        2011-03-13 23:57:56 UTC (rev 
7162)
+++ trunk/SKAccessibilityFauxUIElement.m        2011-03-14 12:36:28 UTC (rev 
7163)
@@ -52,7 +52,8 @@
 @dynamic representedObject, index;
 
 - (id)initWithParent:(id)aParent {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         parent = aParent;
     }
     return self;
@@ -156,7 +157,8 @@
 }
 
 - (id)initWithObject:(id)anObject parent:(id)aParent {
-    if (self = [super initWithParent:aParent]) {
+    self = [super initWithParent:aParent];
+    if (self) {
         object = [anObject retain];
     }
     return self;
@@ -199,7 +201,8 @@
 }
 
 - (id)initWithIndex:(NSInteger)anIndex parent:(id)aParent {
-    if (self = [super initWithParent:aParent]) {
+    self = [super initWithParent:aParent];
+    if (self) {
         index = anIndex;
     }
     return self;

Modified: trunk/SKAnnotationTypeImageCell.m
===================================================================
--- trunk/SKAnnotationTypeImageCell.m   2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKAnnotationTypeImageCell.m   2011-03-14 12:36:28 UTC (rev 7163)
@@ -55,7 +55,8 @@
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-    if (self = [super initWithCoder:decoder]) {
+    self = [super initWithCoder:decoder];
+    if (self) {
         type = [[decoder decodeObjectForKey:@"type"] retain];
         active = [decoder decodeBoolForKey:@"active"];
     }

Modified: trunk/SKBookmark.m
===================================================================
--- trunk/SKBookmark.m  2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKBookmark.m  2011-03-14 12:36:28 UTC (rev 7163)
@@ -402,7 +402,8 @@
 }
 
 - (id)initWithPath:(NSString *)aPath pageIndex:(NSUInteger)aPageIndex 
label:(NSString *)aLabel {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         alias = [[BDAlias alloc] initWithPath:aPath];
         if (alias) {
             aliasData = [[alias aliasData] retain];
@@ -418,7 +419,8 @@
 }
 
 - (id)initWithAliasData:(NSData *)aData pageIndex:(NSUInteger)aPageIndex 
label:(NSString *)aLabel {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         alias = [[BDAlias alloc] initWithData:aData];
         if (aData && alias) {
             aliasData = [aData retain];
@@ -435,7 +437,8 @@
 
 - (id)initWithSetup:(NSDictionary *)aSetupDict label:(NSString *)aLabel {
     NSNumber *pageIndexNumber = [aSetupDict objectForKey:PAGEINDEX_KEY];
-    if (self = [self initWithAliasData:[aSetupDict objectForKey:ALIASDATA_KEY] 
pageIndex:(pageIndexNumber ? [pageIndexNumber unsignedIntegerValue] : 
NSNotFound) label:aLabel]) {
+    self = [self initWithAliasData:[aSetupDict objectForKey:ALIASDATA_KEY] 
pageIndex:(pageIndexNumber ? [pageIndexNumber unsignedIntegerValue] : 
NSNotFound) label:aLabel];
+    if (self) {
         setup = [aSetupDict copy];
     }
     return self;
@@ -534,7 +537,8 @@
 @implementation SKFolderBookmark
 
 - (id)initFolderWithChildren:(NSArray *)aChildren label:(NSString *)aLabel {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         label = [aLabel copy];
         children = [[NSMutableArray alloc] initWithArray:aChildren];
         [children makeObjectsPerformSelector:@selector(setParent:) 
withObject:self];

Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m        2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKBookmarkController.m        2011-03-14 12:36:28 UTC (rev 7163)
@@ -114,7 +114,8 @@
 
 - (id)init {
     if (sharedBookmarkController == nil) {
-        if (self = [super initWithWindowNibName:@"BookmarksWindow"]) {
+        self = [super initWithWindowNibName:@"BookmarksWindow"];
+        if (self) {
             recentDocuments = [[NSMutableArray alloc] init];
             
             NSMutableArray *bookmarks = [NSMutableArray array];

Modified: trunk/SKBorderlessImageWindow.m
===================================================================
--- trunk/SKBorderlessImageWindow.m     2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKBorderlessImageWindow.m     2011-03-14 12:36:28 UTC (rev 7163)
@@ -42,7 +42,8 @@
 @implementation SKBorderlessImageWindow
 
 - (id)initWithContentRect:(NSRect)contentRect image:(NSImage *)image {
-    if (self = [self initWithContentRect:contentRect 
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]) {
+    self = [self initWithContentRect:contentRect 
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
+    if (self) {
         [self setReleasedWhenClosed:NO];
         [self setLevel:NSFloatingWindowLevel];
         

Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m       2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKColorSwatch.m       2011-03-14 12:36:28 UTC (rev 7163)
@@ -96,7 +96,8 @@
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-    if (self = [super initWithCoder:decoder]) {
+    self = [super initWithCoder:decoder];
+    if (self) {
         colors = [[NSMutableArray alloc] initWithArray:[decoder 
decodeObjectForKey:COLORS_KEY]];
         action = NSSelectorFromString([decoder decodeObjectForKey:ACTION_KEY]);
         target = [decoder decodeObjectForKey:TARGET_KEY];

Modified: trunk/SKFindFieldEditor.m
===================================================================
--- trunk/SKFindFieldEditor.m   2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKFindFieldEditor.m   2011-03-14 12:36:28 UTC (rev 7163)
@@ -42,7 +42,8 @@
 @implementation SKFindFieldEditor
 
 - (id)initWithFrame:(NSRect)frameRect {
-       if (self = [super initWithFrame:frameRect]) {
+       self = [super initWithFrame:frameRect];
+    if (self) {
                [self setFieldEditor:YES];
                [self setUsesFindPanel:YES];
        }

Modified: trunk/SKFloatMapTable.m
===================================================================
--- trunk/SKFloatMapTable.m     2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKFloatMapTable.m     2011-03-14 12:36:28 UTC (rev 7163)
@@ -42,7 +42,8 @@
 @implementation SKFloatMapTable
 
 - (id)init {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         table = NSCreateMapTable(NSObjectMapKeyCallBacks, 
NSOwnedPointerMapValueCallBacks, 0);
     }
     return self;

Modified: trunk/SKFontWell.m
===================================================================
--- trunk/SKFontWell.m  2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKFontWell.m  2011-03-14 12:36:28 UTC (rev 7163)
@@ -110,14 +110,16 @@
 }
 
 - (id)initWithFrame:(NSRect)frame {
-    if (self = [super initWithFrame:frame]) {
+    self = [super initWithFrame:frame];
+    if (self) {
         [self commonInit];
     }
     return self;
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-    if (self = [super initWithCoder:decoder]) {
+    self = [super initWithCoder:decoder];
+    if (self) {
                NSButtonCell *oldCell = [self cell];
                if (NO == [oldCell isKindOfClass:[[self class] cellClass]]) {
                        SKFontWellCell *newCell = [[[[self class] cellClass] 
alloc] init];
@@ -447,14 +449,16 @@
 }
  
 - (id)initTextCell:(NSString *)aString {
-       if (self = [super initTextCell:aString]) {
+       self = [super initTextCell:aString];
+    if (self) {
                [self commonInit];
        }
        return self;
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-       if (self = [super initWithCoder:decoder]) {
+       self = [super initWithCoder:decoder];
+    if (self) {
         [self setTextColor:[decoder decodeObjectForKey:TEXTCOLOR_KEY]];
         [self setHasTextColor:[decoder decodeBoolForKey:HASTEXTCOLOR_KEY]];
         [self commonInit];

Modified: trunk/SKGradientView.m
===================================================================
--- trunk/SKGradientView.m      2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKGradientView.m      2011-03-14 12:36:28 UTC (rev 7163)
@@ -59,7 +59,8 @@
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-       if (self = [super initWithCoder:decoder]) {
+       self = [super initWithCoder:decoder];
+    if (self) {
                // this decodes only the reference, the actual view should 
already be decoded as a subview
         contentView = [[decoder decodeObjectForKey:@"contentView"] retain];
                minSize.width = [decoder decodeDoubleForKey:@"minSize.width"];

Modified: trunk/SKGroupedSearchResult.m
===================================================================
--- trunk/SKGroupedSearchResult.m       2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKGroupedSearchResult.m       2011-03-14 12:36:28 UTC (rev 7163)
@@ -50,7 +50,8 @@
 }
 
 - (id)initWithPage:(PDFPage *)aPage maxCount:(NSUInteger)aMaxCount {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         page = [aPage retain];
         maxCount = aMaxCount;
         matches = [[NSMutableArray alloc] init];

Modified: trunk/SKImageToolTipWindow.m
===================================================================
--- trunk/SKImageToolTipWindow.m        2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKImageToolTipWindow.m        2011-03-14 12:36:28 UTC (rev 7163)
@@ -62,7 +62,8 @@
 
 - (id)init {
     if (sharedToolTipWindow) NSLog(@"Attempt to allocate second instance of 
%@", self);
-    if (self = [super initWithContentRect:NSZeroRect]) {
+    self = [super initWithContentRect:NSZeroRect];
+    if (self) {
         [self setHidesOnDeactivate:NO];
         [self setIgnoresMouseEvents:YES];
         [self setOpaque:YES];

Modified: trunk/SKLineWell.m
===================================================================
--- trunk/SKLineWell.m  2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKLineWell.m  2011-03-14 12:36:28 UTC (rev 7163)
@@ -86,7 +86,8 @@
 }
 
 - (id)initWithFrame:(NSRect)frame {
-    if (self = [super initWithFrame:frame]) {
+    self = [super initWithFrame:frame];
+    if (self) {
         lineWidth = 1.0;
         style = kPDFBorderStyleSolid;
         dashPattern = nil;
@@ -104,7 +105,8 @@
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-    if (self = [super initWithCoder:decoder]) {
+    self = [super initWithCoder:decoder];
+    if (self) {
         lineWidth = [decoder decodeDoubleForKey:SKLineWellLineWidthKey];
         style = [decoder decodeIntegerForKey:SKLineWellStyleKey];
         dashPattern = [[decoder decodeObjectForKey:SKLineWellDashPatternKey] 
retain];

Modified: trunk/SKNPDFAnnotationNote_SKExtensions.m
===================================================================
--- trunk/SKNPDFAnnotationNote_SKExtensions.m   2011-03-13 23:57:56 UTC (rev 
7162)
+++ trunk/SKNPDFAnnotationNote_SKExtensions.m   2011-03-14 12:36:28 UTC (rev 
7163)
@@ -79,7 +79,8 @@
 }
 
 - (id)initSkimNoteWithBounds:(NSRect)bounds {
-    if (self = [super initSkimNoteWithBounds:bounds]) {
+    self = [super initSkimNoteWithBounds:bounds];
+    if (self) {
         [self setColor:[[NSUserDefaults standardUserDefaults] 
colorForKey:SKAnchoredNoteColorKey]];
         [self setIconType:[[NSUserDefaults standardUserDefaults] 
integerForKey:SKAnchoredNoteIconTypeKey]];
         textStorage = [[NSTextStorage allocWithZone:[self zone]] init];

Modified: trunk/SKNavigationWindow.m
===================================================================
--- trunk/SKNavigationWindow.m  2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKNavigationWindow.m  2011-03-14 12:36:28 UTC (rev 7163)
@@ -68,7 +68,8 @@
     if (hasSlider)
         width += SLIDER_WIDTH;
     NSRect contentRect = NSMakeRect(NSMidX([screen frame]) - 0.5 * width, 
NSMinY([screen frame]) + WINDOW_OFFSET, width, BUTTON_HEIGHT + 2 * 
BUTTON_MARGIN);
-    if (self = [super initWithContentRect:contentRect]) {
+    self = [super initWithContentRect:contentRect];
+    if (self) {
         
         [self setDisplaysWhenScreenProfileChanges:YES];
         [self setLevel:[[pdfView window] level]];
@@ -145,7 +146,8 @@
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-    if (self = [super initWithCoder:decoder]) {
+    self = [super initWithCoder:decoder];
+    if (self) {
         previousButton = [[decoder decodeObjectForKey:@"previousButton"] 
retain];
         nextButton = [[decoder decodeObjectForKey:@"nextButton"] retain];
         zoomButton = [[decoder decodeObjectForKey:@"zoomButton"] retain];
@@ -228,7 +230,8 @@
 }
 
 - (id)init {
-    if (self = [super initWithContentRect:NSZeroRect 
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES]) {
+    self = [super initWithContentRect:NSZeroRect 
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:YES];
+    if (self) {
                [self setBackgroundColor:[NSColor clearColor]];
                [self setOpaque:NO];
         [self setDisplaysWhenScreenProfileChanges:YES];
@@ -282,14 +285,16 @@
 @dynamic attributedStringValue;
 
 - (id)initWithFrame:(NSRect)frameRect {
-    if (self = [super initWithFrame:frameRect]) {
+    self = [super initWithFrame:frameRect];
+    if (self) {
         stringValue = nil;
     }
     return self;
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-    if (self = [super initWithCoder:decoder]) {
+    self = [super initWithCoder:decoder];
+    if (self) {
         stringValue = [[decoder decodeObjectForKey:@"stringValue"] retain];
     }
     return self;
@@ -388,7 +393,8 @@
 @synthesize path, alternatePath, toolTip, alternateToolTip;
 
 - (id)initTextCell:(NSString *)aString {
-    if (self = [super initTextCell:@""]) {
+    self = [super initTextCell:@""];
+    if (self) {
                [self setBezelStyle:NSShadowlessSquareBezelStyle]; // this is 
mainly to make it selectable
         [self setBordered:NO];
         [self setButtonType:NSMomentaryPushInButton];
@@ -397,7 +403,8 @@
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-    if (self = [super initWithCoder:decoder]) {
+    self = [super initWithCoder:decoder];
+    if (self) {
         toolTip = [[decoder decodeObjectForKey:@"toolTip"] retain];
         alternateToolTip = [[decoder decodeObjectForKey:@"alternateToolTip"] 
retain];
         path = [[decoder decodeObjectForKey:@"path"] retain];
@@ -464,7 +471,8 @@
 + (Class)cellClass { return [SKNavigationSliderCell class]; }
 
 - (id)initWithFrame:(NSRect)frameRect {
-    if (self = [super initWithFrame:frameRect]) {
+    self = [super initWithFrame:frameRect];
+    if (self) {
         trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds] 
options:NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect | 
NSTrackingActiveAlways owner:self userInfo:nil];
         [self addTrackingArea:trackingArea];
         toolTip = nil;
@@ -473,7 +481,8 @@
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-    if (self = [super initWithCoder:decoder]) {
+    self = [super initWithCoder:decoder];
+    if (self) {
         toolTip = [[decoder decodeObjectForKey:@"toolTip"] retain];
         trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds] 
options:NSTrackingMouseEnteredAndExited | NSTrackingInVisibleRect | 
NSTrackingActiveAlways owner:self userInfo:nil];
         [self addTrackingArea:trackingArea];

Modified: trunk/SKNumberArrayFormatter.m
===================================================================
--- trunk/SKNumberArrayFormatter.m      2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKNumberArrayFormatter.m      2011-03-14 12:36:28 UTC (rev 7163)
@@ -50,13 +50,15 @@
 }
 
  - (id)init {
-    if (self = [super init])
+    self = [super init];
+    if (self)
         [self commonInit];
     return self;
  }
 
  - (id)initWithCoder:(NSCoder *)aCoder {
-    if (self = [super initWithCoder:aCoder])
+    self = [super initWithCoder:aCoder];
+    if (self)
         [self commonInit];
     return self;
 }

Modified: trunk/SKPDFSynchronizer.m
===================================================================
--- trunk/SKPDFSynchronizer.m   2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKPDFSynchronizer.m   2011-03-14 12:36:28 UTC (rev 7163)
@@ -46,7 +46,8 @@
 @dynamic fileName;
 
 - (id)init {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         NSPort *port1 = [NSPort port];
         NSPort *port2 = [NSPort port];
         

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKPDFView.m   2011-03-14 12:36:28 UTC (rev 7163)
@@ -248,14 +248,16 @@
 }
 
 - (id)initWithFrame:(NSRect)frameRect {
-    if (self = [super initWithFrame:frameRect]) {
+    self = [super initWithFrame:frameRect];
+    if (self) {
         [self commonInitialization];
     }
     return self;
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-    if (self = [super initWithCoder:decoder]) {
+    self = [super initWithCoder:decoder];
+    if (self) {
         [self commonInitialization];
     }
     return self;

Modified: trunk/SKRemoteStateWindow.m
===================================================================
--- trunk/SKRemoteStateWindow.m 2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKRemoteStateWindow.m 2011-03-14 12:36:28 UTC (rev 7163)
@@ -63,7 +63,8 @@
 
 - (id)init {
     NSRect contentRect = SKRectFromCenterAndSize(NSZeroPoint, 
SKMakeSquareSize(WINDOW_SIZE));
-    if (self = [super initWithContentRect:contentRect]) {
+    self = [super initWithContentRect:contentRect];
+    if (self) {
         [self setIgnoresMouseEvents:YES];
         [self setDisplaysWhenScreenProfileChanges:NO];
         [self setLevel:NSStatusWindowLevel];

Modified: trunk/SKScriptMenu.m
===================================================================
--- trunk/SKScriptMenu.m        2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKScriptMenu.m        2011-03-14 12:36:28 UTC (rev 7163)
@@ -82,7 +82,8 @@
 }
 
 - (id)init {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         
         NSInteger itemIndex = [[NSApp mainMenu] numberOfItems] - 1;
         NSFileManager *fm = [NSFileManager defaultManager];

Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m  2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKSecondaryPDFView.m  2011-03-14 12:36:28 UTC (rev 7163)
@@ -106,14 +106,16 @@
 }
 
 - (id)initWithFrame:(NSRect)frameRect {
-    if (self = [super initWithFrame:frameRect]) {
+    self = [super initWithFrame:frameRect];
+    if (self) {
         [self commonInitialization];
     }
     return self;
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-    if (self = [super initWithCoder:decoder]) {
+    self = [super initWithCoder:decoder];
+    if (self) {
         [self commonInitialization];
     }
     return self;

Modified: trunk/SKSideWindow.m
===================================================================
--- trunk/SKSideWindow.m        2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKSideWindow.m        2011-03-14 12:36:28 UTC (rev 7163)
@@ -82,7 +82,8 @@
     NSDivideRect([screen frame], &contentRect, &ignored, DEFAULT_WINDOW_WIDTH, 
anEdge);
     contentRect = NSInsetRect(contentRect, 0.0, WINDOW_INSET);
     
-    if (self = [super initWithContentRect:contentRect 
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]) {
+    self = [super initWithContentRect:contentRect 
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
+    if (self) {
                [self setBackgroundColor:[NSColor clearColor]];
                [self setOpaque:NO];
                [self setHasShadow:YES];
@@ -112,7 +113,8 @@
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-    if (self = [super initWithCoder:decoder]) {
+    self = [super initWithCoder:decoder];
+    if (self) {
         controller = [decoder decodeObjectForKey:@"controller"];
         state = [decoder decodeIntegerForKey:@"state"];
         edge = [decoder decodeIntegerForKey:@"edge"];
@@ -364,14 +366,16 @@
 @implementation SKSideWindowContentView
 
 - (id)initWithFrame:(NSRect)frameRect edge:(NSRectEdge)anEdge {
-    if (self = [super initWithFrame:frameRect]) {
+    self = [super initWithFrame:frameRect];
+    if (self) {
         edge = anEdge;
     }
     return self;
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-    if (self = [super initWithCoder:decoder]) {
+    self = [super initWithCoder:decoder];
+    if (self) {
         edge = [decoder decodeIntegerForKey:@"edge"];
     }
     return self;

Modified: trunk/SKSnapshotPDFView.m
===================================================================
--- trunk/SKSnapshotPDFView.m   2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKSnapshotPDFView.m   2011-03-14 12:36:28 UTC (rev 7163)
@@ -78,14 +78,16 @@
 }
 
 - (id)initWithFrame:(NSRect)frameRect {
-    if (self = [super initWithFrame:frameRect]) {
+    self = [super initWithFrame:frameRect];
+    if (self) {
         [self commonInitialization];
     }
     return self;
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-    if (self = [super initWithCoder:decoder]) {
+    self = [super initWithCoder:decoder];
+    if (self) {
         [self commonInitialization];
     }
     return self;

Modified: trunk/SKSnapshotPageCell.m
===================================================================
--- trunk/SKSnapshotPageCell.m  2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKSnapshotPageCell.m  2011-03-14 12:36:28 UTC (rev 7163)
@@ -44,7 +44,8 @@
 @implementation SKSnapshotPageCell
 
 - (id)initWithCoder:(NSCoder *)decoder {
-       if (self = [super initWithCoder:decoder]) {
+       self = [super initWithCoder:decoder];
+    if (self) {
                hasWindow = [decoder decodeBoolForKey:@"hasWindow"];
        }
        return self;

Modified: trunk/SKSplitView.m
===================================================================
--- trunk/SKSplitView.m 2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKSplitView.m 2011-03-14 12:36:28 UTC (rev 7163)
@@ -45,7 +45,8 @@
 @implementation SKSplitView
 
 - (id)initWithCoder:(NSCoder *)coder{
-    if (self = [super initWithCoder:coder]) {
+    self = [super initWithCoder:coder];
+    if (self) {
         if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5 && [self 
dividerStyle] == NSSplitViewDividerStyleThick)
             [self setDividerStyle:3]; // NSSplitViewDividerStylePaneSplitter
     }

Modified: trunk/SKStatusBar.m
===================================================================
--- trunk/SKStatusBar.m 2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKStatusBar.m 2011-03-14 12:36:28 UTC (rev 7163)
@@ -93,7 +93,8 @@
 }
 
 - (id)initWithCoder:(NSCoder *)decoder {
-       if (self = [super initWithCoder:decoder]) {
+       self = [super initWithCoder:decoder];
+    if (self) {
         leftCell = [[decoder decodeObjectForKey:@"leftCell"] retain];
         rightCell = [[decoder decodeObjectForKey:@"rightCell"] retain];
         iconCell = [[decoder decodeObjectForKey:@"iconCell"] retain];

Modified: trunk/SKTemplateTag.m
===================================================================
--- trunk/SKTemplateTag.m       2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKTemplateTag.m       2011-03-14 12:36:28 UTC (rev 7163)
@@ -49,7 +49,8 @@
 @implementation SKValueTemplateTag
 
 - (id)initWithKeyPath:(NSString *)aKeyPath {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         keyPath = [aKeyPath copy];
     }
     return self;
@@ -73,7 +74,8 @@
 @implementation SKRichValueTemplateTag
 
 - (id)initWithKeyPath:(NSString *)aKeyPath attributes:(NSDictionary 
*)anAttributes {
-    if (self = [super initWithKeyPath:aKeyPath]) {
+    self = [super initWithKeyPath:aKeyPath];
+    if (self) {
         attributes = [anAttributes copy];
     }
     return self;
@@ -95,7 +97,8 @@
 @implementation SKCollectionTemplateTag
 
 - (id)initWithKeyPath:(NSString *)aKeyPath itemTemplateString:(NSString 
*)anItemTemplateString separatorTemplateString:(NSString 
*)aSeparatorTemplateString {
-    if (self = [super initWithKeyPath:aKeyPath]) {
+    self = [super initWithKeyPath:aKeyPath];
+    if (self) {
         itemTemplateString = [anItemTemplateString retain];
         separatorTemplateString = [aSeparatorTemplateString retain];
         itemTemplate = nil;
@@ -133,7 +136,8 @@
 @implementation SKRichCollectionTemplateTag
 
 - (id)initWithKeyPath:(NSString *)aKeyPath 
itemTemplateAttributedString:(NSAttributedString 
*)anItemTemplateAttributedString 
separatorTemplateAttributedString:(NSAttributedString 
*)aSeparatorTemplateAttributedString {
-    if (self = [super initWithKeyPath:aKeyPath]) {
+    self = [super initWithKeyPath:aKeyPath];
+    if (self) {
         itemTemplateAttributedString = [anItemTemplateAttributedString retain];
         separatorTemplateAttributedString = 
[aSeparatorTemplateAttributedString retain];
         itemTemplate = nil;
@@ -171,7 +175,8 @@
 @implementation SKConditionTemplateTag
 
 - (id)initWithKeyPath:(NSString *)aKeyPath 
matchType:(SKTemplateTagMatchType)aMatchType matchStrings:(NSArray 
*)aMatchStrings subtemplates:(NSArray *)aSubtemplates {
-    if (self = [super initWithKeyPath:aKeyPath]) {
+    self = [super initWithKeyPath:aKeyPath];
+    if (self) {
         matchType = aMatchType;
         matchStrings = [aMatchStrings copy];
         subtemplates = [aSubtemplates mutableCopy];
@@ -230,7 +235,8 @@
 @implementation SKTextTemplateTag
 
 - (id)initWithText:(NSString *)aText {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         text = [aText retain];
     }
     return self;
@@ -265,7 +271,8 @@
 @implementation SKRichTextTemplateTag
 
 - (id)initWithAttributedText:(NSAttributedString *)anAttributedText {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         attributedText = [anAttributedText retain];
     }
     return self;

Modified: trunk/SKTextWithIconCell.m
===================================================================
--- trunk/SKTextWithIconCell.m  2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKTextWithIconCell.m  2011-03-14 12:36:28 UTC (rev 7163)
@@ -57,14 +57,16 @@
 }
 
 - (id)init {
-    if (self = [super initTextCell:@""]) {
+    self = [super initTextCell:@""];
+    if (self) {
         [self setFormatter:textWithIconFormatter];
     }
     return self;
 }
 
 - (id)initWithCoder:(NSCoder *)coder {
-    if (self = [super initWithCoder:coder]) {
+    self = [super initWithCoder:coder];
+    if (self) {
         if ([self formatter] == nil)
             [self setFormatter:textWithIconFormatter];
     }

Modified: trunk/SKThumbnail.m
===================================================================
--- trunk/SKThumbnail.m 2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKThumbnail.m 2011-03-14 12:36:28 UTC (rev 7163)
@@ -45,7 +45,8 @@
 @dynamic size;
 
 - (id)initWithImage:(NSImage *)anImage label:(NSString *)aLabel 
pageIndex:(NSUInteger)anIndex {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         image = [anImage retain];
         label = [aLabel retain];
         pageIndex = anIndex;

Modified: trunk/SKTransitionInfo.m
===================================================================
--- trunk/SKTransitionInfo.m    2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKTransitionInfo.m    2011-03-14 12:36:28 UTC (rev 7163)
@@ -50,7 +50,8 @@
 }
 
 - (id)init {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         transitionStyle = SKNoTransition;
         duration = 1.0;
         shouldRestrict = NO;

Modified: trunk/SKTypeSelectHelper.m
===================================================================
--- trunk/SKTypeSelectHelper.m  2011-03-13 23:57:56 UTC (rev 7162)
+++ trunk/SKTypeSelectHelper.m  2011-03-14 12:36:28 UTC (rev 7163)
@@ -77,7 +77,8 @@
 }
 
 - (id)initWithMatchOption:(SKTypeSelectMatchOption)aMatchOption {
-    if (self = [super init]){
+    self = [super init];
+    if (self){
         dataSource = nil;
         searchCache = nil;
         searchString = nil;

Modified: trunk/vendorsrc/ulikusterer/UKKQueue.m
===================================================================
--- trunk/vendorsrc/ulikusterer/UKKQueue.m      2011-03-13 23:57:56 UTC (rev 
7162)
+++ trunk/vendorsrc/ulikusterer/UKKQueue.m      2011-03-14 12:36:28 UTC (rev 
7163)
@@ -447,7 +447,8 @@
 
 - (id)initWatchedPathWithPath:(NSString *)fullPath;
 {
-    if (self = [super init]) {
+    self = [super init];
+    if (self) {
         // copy since the hash mustn't change
         path = [fullPath copy];
         // allows us to open files lazily, since these may be created just for 
a path comparison when removing from the queue


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to