Diff for /chimera/BookmarksButton.mm between versions 1.1 and 1.2

version 1.1, 2002/04/16 07:26:07 version 1.2, 2002/04/17 08:31:11
Line 7 Line 7
 //  //
   
 #import "BookmarksButton.h"  #import "BookmarksButton.h"
#include "nsIDOMElement.h"
 #include "nsString.h"
   
 @implementation BookmarksButton  @implementation BookmarksButton
   
Line 15 Line 16
   self = [super initWithFrame:frame];    self = [super initWithFrame:frame];
   if (self) {    if (self) {
     // Initialization code here.      // Initialization code here.
       mElement = nsnull;
       [self setBezelStyle: NSRegularSquareBezelStyle];
       [self setBordered: NO];
       [self setImagePosition: NSImageLeft];
       [self setRefusesFirstResponder: YES];
       [self setFont: [NSFont labelFontOfSize: 11.0]];
   }    }
   
   // Create a sample button.  
   [self setBezelStyle: NSRegularSquareBezelStyle];  
   [self setBordered: NO];  
   [self setImagePosition: NSImageLeft];  
   [self setImage: [NSImage imageNamed: @"smallbookmark"]];  
   [self setFont: [NSFont labelFontOfSize: 11.0]];  
   [self setRefusesFirstResponder: YES];  
   //[[self cell] setHighlightsBy: NSChangeGrayCellMask];  
   [self sizeToFit];  
   
   return self;    return self;
 }  }
   
   -(void)setElement: (nsIDOMElement*)aElt
   {
     mElement = aElt;
     nsAutoString tag;
     mElement->GetLocalName(tag);
     if (tag.Equals(NS_LITERAL_STRING("folder")))
       [self setImage: [NSImage imageNamed: @"folder"]];
     else
       [self setImage: [NSImage imageNamed: @"smallbookmark"]];
   
     nsAutoString name;
     mElement->GetAttribute(NS_LITERAL_STRING("name"), name);
     [self setTitle: [NSString stringWithCharacters: name.get() length: nsCRT::strlen(name.get())]];
   }
   
 @end  @end

Removed from v.1.1  
changed lines
  Added in v.1.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>