5 // Created by Alex Rozanski on 08/01/2010.
6 // Copyright 2010 Alex Rozanski http://perspx.com
8 // GC-enabled code revised by Stefan Vogt http://byteproject.net
10 // Adapted to VLC media player by Felix Paul Kühne
13 #import "SideBarItem.h"
16 @implementation SideBarItem
19 @synthesize untranslatedTitle;
20 @synthesize identifier;
22 @synthesize badgeValue;
27 #pragma mark Init/Dealloc/Finalize
33 badgeValue = -1; //We don't want a badge value by default
34 sdtype = -1; //no sd type set
41 + (id)itemWithTitle:(NSString*)aTitle identifier:(NSString*)anIdentifier
43 SideBarItem *item = [SideBarItem itemWithTitle:aTitle identifier:anIdentifier icon:nil];
49 + (id)itemWithTitle:(NSString*)aTitle identifier:(NSString*)anIdentifier icon:(NSImage*)anIcon
52 SideBarItem *item = [[[SideBarItem alloc] init] autorelease];
54 [item setTitle:aTitle];
55 [item setIdentifier:anIdentifier];
56 [item setIcon:anIcon];
82 #pragma mark Custom Accessors
86 return badgeValue!=-1;
91 return [children count]>0;