/*
 * $Id: eventSetupMenu.c,v 1.1.1.1 2005/02/17 05:45:52 sundin Exp $
 *
 * Tag: $Name:  $
 *
 * See the file COPYRIGHT for copyright information
 *
 * $Log: eventSetupMenu.c,v $
 * Revision 1.1.1.1  2005/02/17 05:45:52  sundin
 * initial import ver0.0.5
 *
 * Revision 1.1.1.1  2005/01/17 18:06:31  ksltuf
 * PIM-Plugin 0.0.4
 *
 * Revision 1.4  2004/12/13 07:58:12  ksltuf
 * new setup option 'firstIsMonday'
 *
 * Revision 1.3  2004/11/24 21:29:51  ksltuf
 * Changed order of include-Statements - VDR-includes come last
 * (problems with STL under gcc 2.95)
 *
 * Revision 1.2  2004/07/05 19:00:26  ksltuf
 * Added COPYRIGHT and cvs information
 *
 *
 */


#include "eventSetupMenu.h"
#include "i18n.h"
#include "pimSetup.h"

#include <vdr/menuitems.h>


cEventSetupMenu::cEventSetupMenu()
{
  _osdOffsetX = globalSetup.osdOffsetX;
  _osdOffsetY = globalSetup.osdOffsetY;
  _firstIsMonday = globalSetup.firstIsMonday;
  strcpy(_calCmd, globalSetup.calCmd);

  Add(new cMenuEditIntItem(tr("OSD Offset hor."),  &_osdOffsetX,-150, 150));
  Add(new cMenuEditIntItem(tr("OSD Offset vert."), &_osdOffsetY,-150, 150));
  Add(new cMenuEditBoolItem(tr("Week starts with"), &_firstIsMonday,
                                                    tr("Su"), tr("Mo")));

  Add(new cMenuEditStrItem(tr("cal commandline"), _calCmd, MAX_CAL_CHARS,
			   tr(FileNameChars)));
}

void cEventSetupMenu::Store(void)
{
  SetupStore("OsdOffsetX", _osdOffsetX);
  SetupStore("OsdOffsetY", _osdOffsetY);
  SetupStore("FirstIsMonday", _firstIsMonday);
  SetupStore("CalCommand", _calCmd);

  globalSetup.osdOffsetX = _osdOffsetX;
  globalSetup.osdOffsetY = _osdOffsetY;
  globalSetup.firstIsMonday = _firstIsMonday;
  strcpy(globalSetup.calCmd, _calCmd);
}

