/*
 * system.c:
 *
 * Copyright (c) 2000 James McKenzie <james@fishsoup.dhs.org>,
 * All rights reserved.
 *
 */

static char rcsid[] = "$Id: prefs.c,v 1.3 2001/01/30 06:16:33 root Exp $";

/*
 * $Log: prefs.c,v $
 * Revision 1.3  2001/01/30 06:16:33  root
 * #
 *
 * Revision 1.2  2000/12/01 04:42:23  root
 * #
 *
 * Revision 1.1  2000/11/23 23:45:30  root
 * #
 *
 * Revision 1.3  2000/10/07 18:30:11  root
 * #
 *
 * Revision 1.2  2000/10/06 19:52:46  root
 * #
 *
 * Revision 1.1  2000/10/06 06:21:36  root
 * #
 *
 */

#include "project.h"

static void
fish (Panel_item p)
{
  int i;
  int *j;

  i = panel_get (p, PANEL_VALUE);
  j = (int *) panel_get (p, PANEL_CLIENT_DATA);

  *j = i;

}


void
prefs_makepanel (Panel p)
{
  int y = 5;

#define SOUP(a,b) \
  do { \
  xv_create (p, PANEL_NUMERIC_TEXT, \
		PANEL_MIN_VALUE,0, \
		PANEL_MAX_VALUE,255, \
		PANEL_VALUE,b, \
		PANEL_CLIENT_DATA,& b, \
		PANEL_LABEL_STRING, a , \
                PANEL_NOTIFY_PROC, fish, \
                XV_X, 5, \
                XV_Y, y, \
                0); \
  y+=35; \
  } while(0)

  SOUP ("System unit", systemunit);
  SOUP ("Clock unit", clockunit);
  SOUP ("Tuner unit", tunerunit);
  SOUP ("CD unit", cdunit);
  SOUP ("MPEG unit", mpegunit);
  SOUP ("WAVE unit", waveunit);
  SOUP ("OGG unit", oggunit);

}
