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

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

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

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

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

