/*
 * subgenreitm.c: cMenuSubGenreItem is a class that holds genre data for display
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id$
 */
#include "subgenreitm.h"
#include "tools.h"


cMenuSubGenreItem::cMenuSubGenreItem(int i, char *p, int c) 
: id(i)
, name(0)	
, count(c)	
{_
  if(p) name = strdup(p);	
}

cMenuSubGenreItem::~cMenuSubGenreItem() 
{_
  SLDEBUG("# destructor of cMenuSubGenreItem: %s", name);
  if(name) free(name);
}

void cMenuSubGenreItem::Compile()
{_
  char * tmp;

  asprintf(&tmp, "%s\t%d", name, count);
  SetText(tmp, false);  
}
