예제 #1
0
void cSatipPluginSetup::Setup(void)
{
  int current = Current();

  Clear();
  helpM.Clear();

  Add(new cMenuEditStraItem(tr("Operating mode"), &operatingModeM, ELEMENTS(operatingModeTextsM), operatingModeTextsM));
  helpM.Append(tr("Define the used operating mode for all SAT>IP devices:\n\noff - devices are disabled\nlow - devices are working at the lowest priority\nnormal - devices are working within normal parameters\nhigh - devices are working at the highest priority"));

  if (operatingModeM) {
     Add(new cMenuEditBoolItem(tr("Enable CI extension"), &ciExtensionM));
     helpM.Append(tr("Define whether a CI extension shall be used.\n\nThis setting enables integrated CI/CAM handling found in some SAT>IP hardware (e.g. Digital Devices OctopusNet)."));

     for (unsigned int i = 0; ciExtensionM && i < ELEMENTS(cicamsM); ++i) {
         Add(new cMenuEditStraItem(*cString::sprintf(" %s #%d", tr("CI/CAM"), i + 1), &cicamsM[i], ELEMENTS(cicamTextsM), cicamTextsM));
         helpM.Append(tr("Define a desired CAM type for the CI slot.\n\nThe '---' option lets SAT>IP hardware do the auto-selection."));
         }

     Add(new cMenuEditBoolItem(tr("Enable EPG scanning"), &eitScanM));
     helpM.Append(tr("Define whether the EPG background scanning shall be used.\n\nThis setting disables the automatic EIT scanning functionality for all SAT>IP devices."));

     Add(new cMenuEditIntItem(tr("Disabled sources"), &numDisabledSourcesM, 0, MAX_DISABLED_SOURCES_COUNT, tr("none")));
     helpM.Append(tr("Define number of sources to be disabled.\n\nSAT>IP servers might not have all satellite positions available and such sources can be blacklisted here."));

     for (int i = 0; i < numDisabledSourcesM; ++i) {
         Add(new cSatipEditSrcItem(*cString::sprintf(" %s %d", trVDR("Source"), i + 1), &disabledSourcesM[i]));
         helpM.Append(tr("Define a source to be blacklisted."));
         }

     Add(new cMenuEditIntItem(tr("Disabled filters"), &numDisabledFiltersM, 0, SECTION_FILTER_TABLE_SIZE, tr("none")));
     helpM.Append(tr("Define number of section filters to be disabled.\n\nCertain section filters might cause some unwanted behaviour to VDR such as time being falsely synchronized. By blacklisting the filters here, useful section data can be left intact for VDR to process."));

     for (int i = 0; i < numDisabledFiltersM; ++i) {
         Add(new cMenuEditStraItem(*cString::sprintf(" %s %d", tr("Filter"), i + 1), &disabledFilterIndexesM[i], SECTION_FILTER_TABLE_SIZE, disabledFilterNamesM));
         helpM.Append(tr("Define an ill-behaving filter to be blacklisted."));
         }
     }
  Add(new cMenuEditStraItem(tr("Transport mode"), &transportModeM, ELEMENTS(transportModeTextsM), transportModeTextsM));
  helpM.Append(tr("Define which transport mode shall be used.\n\nUnicast, Multicast, RTP-over-TCP"));
  Add(new cOsdItem(tr("Active SAT>IP servers:"), osUnknown, false));
  helpM.Append("");

  detachedModeM = SatipConfig.GetDetachedMode();
  if (!detachedModeM) {
     cSatipServers *servers = cSatipDiscover::GetInstance()->GetServers();
     deviceCountM = servers->Count();
     for (cSatipServer *s = servers->First(); s; s = servers->Next(s)) {
         Add(new cSatipServerItem(s));
         helpM.Append("");
         }
     }

  SetCurrent(Get(current));
  Display();
}
예제 #2
0
void cMenuBouquetsList::Options()
{
    if (mode_ == 0)
    {
        SetHelp(NULL, NULL, NULL, NULL);
    }
    else if (mode_ == 1)
    {
        SetTitle(tr("Bouquets"));
        SetHelp(tr("Channels"), NULL, NULL, tr("Button$Customize"));
    }
    else if (mode_ == 2)
    {
        //SetStatus(tr("Select bouquet with OK"));
        SetTitle(tr("Customize Bouquets"));
        SetHelp(tr("New"), tr("Move"), trVDR("Button$Delete"), trVDR("Button$Edit"));
    }
    Display();
}
예제 #3
0
eOSState cMenuSearchMain::Switch(void)
{
  cMenuMyScheduleItem *item = (cMenuMyScheduleItem *)Get(Current());
  if (item) {
     cChannel *channel = Channels.GetByChannelID(item->event->ChannelID(), true, true);
     if (channel && cDevice::PrimaryDevice()->SwitchChannel(channel, true))
        return osEnd;
     }
  Skins.Message(mtInfo, trVDR("Can't switch channel!"));
  return osContinue;
}
예제 #4
0
void cMenuSearchResultsForList::SetHelpKeys(bool Force)
{
  cMenuSearchResultsItem *item = (cMenuSearchResultsItem *)Get(Current());
  int NewHelpKeys = 0;
  if (item) {
    if (item->Selectable() && item->timerMatch == tmFull)
      NewHelpKeys = 2;
    else
      NewHelpKeys = 1;
  }

  bool hasTimer = (NewHelpKeys == 2);
  if (NewHelpKeys != helpKeys || Force)
    {
      if (toggleKeys==0)
	SetHelp((EPGSearchConfig.redkeymode==0?(hasTimer?trVDR("Button$Timer"):trVDR("Button$Record")):tr("Button$Commands")), m_bSort? tr("Button$by channel"):tr("Button$by time"), modeYellow==showTitleEpisode?tr("Button$Episode"):tr("Button$Title"), ButtonBlue[0]);
      else
	SetHelp((EPGSearchConfig.redkeymode==1?(hasTimer?trVDR("Button$Timer"):trVDR("Button$Record")):tr("Button$Commands")), m_bSort? tr("Button$by channel"):tr("Button$by time"), modeYellow==showTitleEpisode?tr("Button$Episode"):tr("Button$Title"), ButtonBlue[0]);
      helpKeys = NewHelpKeys;
    }
}
예제 #5
0
void cMenuEditSwitchTimer::Set()
{
    int current = Current();
    Clear();

    Add(new cMenuEditStraItem(tr("Action"), &data.mode, 3, SwitchModes));
    if (data.mode == 0) // always switch
      Add(new cMenuEditIntItem(tr("Switch ... minutes before start"), &data.switchMinsBefore, 0, 99));
    if (data.mode == 1) // only announce
      Add(new cMenuEditIntItem(tr("Announce ... minutes before start"), &data.switchMinsBefore, 0, 99));
    if (data.mode == 2) // ask for switching
      Add(new cMenuEditIntItem(tr("Ask ... minutes before start"), &data.switchMinsBefore, 0, 99));

    cString info = cString::sprintf("%s:\t%s", tr("action at"),
				    TIMESTRING(data.startTime - 60 * data.switchMinsBefore));
    cOsdItem* pInfoItem = new cOsdItem(info);
    pInfoItem->SetSelectable(false);
    Add(pInfoItem);
    Add(new cMenuEditBoolItem(tr("Unmute sound"), &data.unmute, trVDR("no"), trVDR("yes")));
    SetCurrent(Get(current));
}
예제 #6
0
void cMenuSetupSearchtimers::Set()
{
  int current = Current();
  Clear();
  helpTexts.clear();

  Add(new cMenuEditBoolItem(tr("Use search timers"), &data->useSearchTimers, trVDR("no"), trVDR("yes")));
  AddHelp(tr("Help$'Search timers' can be used to automatically create timers for events that match your search criterions."));
  if (data->useSearchTimers)
  {
      Add(new cMenuEditIntItem(tr("  Update interval [min]"), &data->UpdateIntervall, 1, 9999));
      AddHelp(tr("Help$Specify here the time intervall to be used when searching for events in the background."));
      AddHelp(tr("Help$Specify here the default lifetime of timers/recordings created with this plugin. This value can also be adjusted for each search itself."));
      Add(new cMenuEditIntItem(IndentMenuItem(tr("Setup.Recording$Time Buffer at Start (min)")), &data->DefMarginStart));
      AddHelp(tr("Help$Specify here the default start recording margin of timers/recordings created with this plugin. This value can also be adjusted for each search itself."));
      Add(new cMenuEditIntItem(IndentMenuItem(tr("Setup.Recording$Time Buffer at End (min)")), &data->DefMarginStop));
      AddHelp(tr("Help$Specify here the default stop recording margin of timers/recordings created with this plugin. This value can also be adjusted for each search itself."));
      Add(new cMenuEditBoolItem(IndentMenuItem(tr("No announcements when replaying")), &data->noAnnounceWhileReplay, trVDR("no"), trVDR("yes")));
      AddHelp(tr("Help$Set this to 'yes' if you don't like to get any announcements of broadcasts if you currently replay anything."));
#ifdef REELVDR
      Add(new cMenuEditBoolItem(IndentMenuItem(tr("Show pip on announcements")), &data->showPipOnAnnounce, trVDR("no"), trVDR("yes")));
      AddHelp(tr("Help$Set this to 'yes' if you want to show up the pip window with the announced channel."));
#endif
      Add(new cMenuEditBoolItem(IndentMenuItem(tr("Recreate timers after deletion")), &data->TimerProgRepeat, trVDR("no"), trVDR("yes")));
      AddHelp(tr("Help$Set this to 'yes' if you want timers to be recreated with the next search timer update after deleting them."));
  }

  Add(new cMenuEditBoolItem(  tr("Without PayTV channels"), &data->ignorePayTV, trVDR("no"), trVDR("yes")));
  AddHelp(tr("Help$Set this to 'yes' if don't want to see events on PayTV channels when searching for repeats."));
  Add(new cOsdItem(tr("Search templates")));
  AddHelp(tr("Help$Here you can setup templates for your searches."));
  Add(new cOsdItem(tr("Blacklists")));
  AddHelp(tr("Help$Here you can setup blacklists which can be used within a search to exclude events you don't like."));
//  Add(new cOsdItem(tr("Channel groups")));
//  AddHelp(tr("Help$Here you can setup channel groups which can be used within a search. These are different to VDR channel groups and represent a set of arbitrary channels, e.g. 'FreeTV'."));

  SetCurrent(Get(current));
  Display();
  SetHelpKeys();
}
예제 #7
0
// ------------------
// cMenuEPGSearchSetup
cMenuEPGSearchSetup::cMenuEPGSearchSetup(void)
{
    OkKeyMode[0] = trVDR("Button$Info");
    OkKeyMode[1] = trVDR("Button$Switch");

    RedKeyMode[0] = tr("Standard");
    RedKeyMode[1] = tr("Button$Commands");

    BlueKeyMode[0] = tr("Standard");
    BlueKeyMode[1] = tr("Button$Search");

    ProgressbarMode[0] = trVDR("no");
    ProgressbarMode[1] = tr("pipes");
    ProgressbarMode[2] = tr("graphical");

    StartMenuMode[0] = trVDR("Button$Schedule");
    StartMenuMode[1] = trVDR("Button$Now");

    AddSubtitleMode[0] = tr("never");
    AddSubtitleMode[1] = tr("always");
    AddSubtitleMode[2] = tr("smart");

    FavoritesMenuMode[0] = trVDR("no");
    FavoritesMenuMode[1] = tr("before user-def. times");
    FavoritesMenuMode[2] = tr("after user-def. times");
    FavoritesMenuMode[3] = tr("before 'next'");

    MailMethod[0] = "sendmail";
    MailMethod[1] = "sendEmail.pl";

    Setup();
}
예제 #8
0
void cMenuSetupMailNotification::Set()
{
  int current = Current();
  Clear();
  helpTexts.clear();

  Add(new cMenuEditBoolItem(tr("Search timer notification"), &data->sendMailOnSearchtimers, trVDR("no"), trVDR("yes")));
  AddHelp(tr("Help$Set this to 'yes' if you want to get an email notification about the search timers that where programmed automatically in the background."));

  if (data->sendMailOnSearchtimers)
  {
    Add(new cMenuEditIntItem(IndentMenuItem(tr("Time between mails [h]")), &data->sendMailOnSearchtimerHours,  0, 999999, ""));
    AddHelp(tr("Help$Specifiy how much time in [h] you would\nlike to have atleast between two mails.\nWith '0' you get a new mail after each\nsearch timer update with new results."));
  }
  Add(new cMenuEditBoolItem(tr("Timer conflict notification"), &data->sendMailOnConflicts, trVDR("no"), trVDR("yes")));
  AddHelp(tr("Help$Set this to 'yes' if you want to get an email notification about the timer conflicts."));

  Add(new cMenuEditStrItem(tr("Send to"), data->MailAddressTo, sizeof(data->MailAddressTo), MailBoxChars));
  AddHelp(tr("Help$Specify the email address where notifications should be sent to."));

  Add(new cMenuEditStraItem(tr("Mail method"), &data->mailViaScript, 2, MailMethod));
  AddHelp(tr("Help$Specify here the method to use when sending mails.\nYou can choose between\n - 'sendmail': requires a properly configured email system\n - 'SendEmail.pl': simple script for mail delivery"));

  if (data->mailViaScript)
  {
     cOsdItem* sep = new cOsdItem(tr("--- Email account ---"));
     sep->SetSelectable(false);
     Add(sep);
     AddHelp(" dummy");

     Add(new cMenuEditStrItem(tr("Email address"), data->MailAddress, sizeof(data->MailAddress), MailBoxChars));
     AddHelp(tr("Help$Specify the email address where notifications should be sent from."));

     Add(new cMenuEditStrItem(tr("SMTP server"), data->MailServer, sizeof(data->MailServer), HostNameChars));
     AddHelp(tr("Help$Specify the SMTP server that should deliver the notifications. If it's using a port different from the default(25) append the port with \":port\"."));
     Add(new cMenuEditBoolItem(tr("Use SMTP authentication"), &data->MailUseAuth, trVDR("no"), trVDR("yes")));
     AddHelp(tr("Help$Set this to 'yes' if your account needs authentication to send mails."));

     if (data->MailUseAuth)
     {
        Add(new cMenuEditStrItem(IndentMenuItem(tr("Auth user")), data->MailAuthUser, sizeof(data->MailAuthUser), UserNameChars));
        AddHelp(tr("Help$Specify the auth user, if this account needs authentication for SMTP."));
        Add(new cMenuEditStrItem(IndentMenuItem(tr("Auth password")), tmpMailAuthPass, sizeof(tmpMailAuthPass), PasswordChars));
        AddHelp(tr("Help$Specify the auth password, if this account needs authentication for SMTP."));
     }
  }

  SetCurrent(Get(current));
  Display();

  SetHelpKeys();
}
예제 #9
0
eOSState cMenuBrowseFiles::Delete(void)
{
  cFileListItem *it = GetCurrent();
  if (!it->IsDir()) {
    if (Interface->Confirm(trVDR("Delete recording?"))) {
      cString name = cString::sprintf("%s/%s", (const char *)m_CurrentDir, it->Name());
      if (!unlink(name)) {
        isyslog("file %s deleted", *name);
        if (m_Mode != ShowImages) {
          name = cString::sprintf("%s.resume", *name);
          unlink(name);
        }
        cOsdMenu::Del(Current());
        SetHelpButtons();
        Display();
      } else {
        Skins.Message(mtError, trVDR("Error while deleting recording!"));
        isyslog("Error deleting file %s", *name);
      }
    }
  }
  return osContinue;
}
예제 #10
0
cSatipPluginSetup::cSatipPluginSetup()
: detachedModeM(SatipConfig.GetDetachedMode()),
  deviceCountM(0),
  operatingModeM(SatipConfig.GetOperatingMode()),
  transportModeM(SatipConfig.GetTransportMode()),
  ciExtensionM(SatipConfig.GetCIExtension()),
  eitScanM(SatipConfig.GetEITScan()),
  numDisabledSourcesM(SatipConfig.GetDisabledSourcesCount()),
  numDisabledFiltersM(SatipConfig.GetDisabledFiltersCount())
{
  debug1("%s", __PRETTY_FUNCTION__);
  operatingModeTextsM[cSatipConfig::eOperatingModeOff]    = tr("off");
  operatingModeTextsM[cSatipConfig::eOperatingModeLow]    = tr("low");
  operatingModeTextsM[cSatipConfig::eOperatingModeNormal] = tr("normal");
  operatingModeTextsM[cSatipConfig::eOperatingModeHigh]   = tr("high");
  transportModeTextsM[cSatipConfig::eTransportModeUnicast]    = tr("Unicast");
  transportModeTextsM[cSatipConfig::eTransportModeMulticast]  = tr("Multicast");
  transportModeTextsM[cSatipConfig::eTransportModeRtpOverTcp] = tr("RTP-over-TCP");
  for (unsigned int i = 0; i < ELEMENTS(cicamsM); ++i)
      cicamsM[i] = SatipConfig.GetCICAM(i);
  for (unsigned int i = 0; i < ELEMENTS(ca_systems_table); ++i)
      cicamTextsM[i] = ca_systems_table[i].description;
  if (numDisabledSourcesM > MAX_DISABLED_SOURCES_COUNT)
     numDisabledSourcesM = MAX_DISABLED_SOURCES_COUNT;
  for (int i = 0; i < MAX_DISABLED_SOURCES_COUNT; ++i)
      disabledSourcesM[i] = SatipConfig.GetDisabledSources(i);
  if (numDisabledFiltersM > SECTION_FILTER_TABLE_SIZE)
     numDisabledFiltersM = SECTION_FILTER_TABLE_SIZE;
  for (int i = 0; i < SECTION_FILTER_TABLE_SIZE; ++i) {
      disabledFilterIndexesM[i] = SatipConfig.GetDisabledFilters(i);
      disabledFilterNamesM[i] = tr(section_filter_table[i].description);
      }
  SetMenuCategory(mcSetupPlugins);
  Setup();
  SetHelp(trVDR("Button$Scan"), NULL, tr("Button$Devices"), trVDR("Button$Info"));
}
예제 #11
0
eOSState cMenuFemonSetup::ProcessKey(eKeys keyP)
{
  int oldUseSvdrp = useSvdrpM;
  int oldAnalyzeStream = analyzeStreamM;

  eOSState state = cMenuSetupPage::ProcessKey(keyP);

  if (keyP != kNone && (analyzeStreamM != oldAnalyzeStream || useSvdrpM != oldUseSvdrp))
     Setup();

  if ((keyP == kInfo) && (state == osUnknown) && (Current() < helpM.Size()))
     return AddSubMenu(new cMenuText(cString::sprintf("%s - %s '%s'", tr("Help"), trVDR("Plugin"), PLUGIN_NAME_I18N), helpM[Current()]));

  return state;
}
예제 #12
0
void cMenuSetupSearchtimers::Set()
{
  int current = Current();
  Clear();
  helpTexts.clear();

  Add(new cMenuEditBoolItem(tr("Use search timers"), &data->useSearchTimers, trVDR("no"), trVDR("yes")));
  AddHelp(tr("Help$'Search timers' can be used to automatically create timers for events that match your search criterions."));
  if (data->useSearchTimers)
  {
      Add(new cMenuEditIntItem(tr("  Update interval [min]"), &data->UpdateIntervall, 1, 9999));
      AddHelp(tr("Help$Specify here the time intervall to be used when searching for events in the background."));
      Add(new cMenuEditIntItem(tr("  SVDRP port"), &data->SVDRPPort, 1, 99999));
      AddHelp(tr("Help$Programming of new timers or timer changes is done with SVDRP. The default value should be correct, so change it only if you know what you are doing."));
      Add(new cMenuEditIntItem(IndentMenuItem(trVDR("Setup.Recording$Default priority")), &data->DefPriority, 0, MAXPRIORITY));
      AddHelp(tr("Help$Specify here the default priority of timers created with this plugin. This value can also be adjusted for each search itself."));
      Add(new cMenuEditIntItem(IndentMenuItem(trVDR("Setup.Recording$Default lifetime (d)")), &data->DefLifetime, 0, MAXLIFETIME));
      AddHelp(tr("Help$Specify here the default lifetime of timers/recordings created with this plugin. This value can also be adjusted for each search itself."));
      Add(new cMenuEditIntItem(IndentMenuItem(trVDR("Setup.Recording$Margin at start (min)")), &data->DefMarginStart));
      AddHelp(tr("Help$Specify here the default start recording margin of timers/recordings created with this plugin. This value can also be adjusted for each search itself."));
      Add(new cMenuEditIntItem(IndentMenuItem(trVDR("Setup.Recording$Margin at stop (min)")), &data->DefMarginStop));
      AddHelp(tr("Help$Specify here the default stop recording margin of timers/recordings created with this plugin. This value can also be adjusted for each search itself."));
      Add(new cMenuEditBoolItem(IndentMenuItem(tr("No announcements when replaying")), &data->noAnnounceWhileReplay, trVDR("no"), trVDR("yes")));
      AddHelp(tr("Help$Set this to 'yes' if you don't like to get any announcements of broadcasts if you currently replay anything."));
      Add(new cMenuEditBoolItem(IndentMenuItem(tr("Recreate timers after deletion")), &data->TimerProgRepeat, trVDR("no"), trVDR("yes")));
      AddHelp(tr("Help$Set this to 'yes' if you want timers to be recreated with the next search timer update after deleting them."));
      Add(new cMenuEditIntItem(IndentMenuItem(tr("Check if EPG exists for ... [h]")), &data->checkEPGHours, 0, 999));
      AddHelp(tr("Help$Specify how many hours of future EPG there should be and get warned else after a search timer update."));
      if (data->checkEPGHours > 0)
      {
	Add(new cMenuEditBoolItem(IndentMenuItem(tr("Warn by OSD"),2), &data->checkEPGWarnByOSD, trVDR("no"), trVDR("yes")));
	AddHelp(tr("Help$Set this to 'yes' if you want get warnings from the EPG check via OSD."));
	Add(new cMenuEditBoolItem(IndentMenuItem(tr("Warn by mail"),2), &data->checkEPGWarnByMail, trVDR("no"), trVDR("yes")));
	AddHelp(tr("Help$Set this to 'yes' if you want get warnings from the EPG check by mail."));

	// create the char array for the menu display
	if (menuitemsChGr) delete [] menuitemsChGr;
	menuitemsChGr = ChannelGroups.CreateMenuitemsList();
	Add(new cMenuEditStraItem(IndentMenuItem(tr("Channel group to check"),2), &data->checkEPGchannelGroupNr, ChannelGroups.Count()+1, menuitemsChGr));
	AddHelp(tr("Help$Specify the channel group to check."));
      }
  }

  Add(new cMenuEditBoolItem(  tr("Ignore PayTV channels"), &data->ignorePayTV, trVDR("no"), trVDR("yes")));
  AddHelp(tr("Help$Set this to 'yes' if don't want to see events on PayTV channels when searching for repeats."));
  Add(new cOsdItem(tr("Search templates")));
  AddHelp(tr("Help$Here you can setup templates for your searches."));
  Add(new cOsdItem(tr("Blacklists")));
  AddHelp(tr("Help$Here you can setup blacklists which can be used within a search to exclude events you don't like."));
  Add(new cOsdItem(tr("Channel groups")));
  AddHelp(tr("Help$Here you can setup channel groups which can be used within a search. These are different to VDR channel groups and represent a set of arbitrary channels, e.g. 'FreeTV'."));

  SetCurrent(Get(current));
  Display();
  SetHelpKeys();
}
예제 #13
0
파일: commands.c 프로젝트: suborb/reelvdr
eOSState cCMDDir::Edit(cMainMenuItem *mItem)
{
  MYDEBUG("Verzeichnis: Edit: %s", mItem->FileName());
  cFileInfo *info = new cFileInfo(mItem->FileName());
  if(!info->isWriteable())
  {
    DELETENULL(info);
    info = new cFileInfo(CurrentDir());
    if(!info->isWriteable())
    {
      MYDEBUG("Verzeichnis: Edit: Keine Rechte");
      OSD_ERRMSG(tr("no rights to rename"));
      DELETENULL(info);
      return osContinue;
    }
  }
  DELETENULL(info);
  info = new cFileInfo(mItem->FileName());
  SetDir(info->FileName());
  DELETENULL(info);
  State = csDirEdit;
  SetCols(11);
  SetTitle(CurrentDir());

  cMainMenuItem *dmItem = NULL;
  mItem = (cMainMenuItem*)First();
  while(mItem)
  {
    if(!strcasecmp(mItem->FileName(), LastSelDir()))
    {
      MYDEBUG("Verzeichnis: Edit: Item gefunden: %s", mItem->FileName());
      Ins(new cMenuEditStrItem(tr("Rename"), Dir, MaxFileName, trVDR(FileNameChars)),
          true,
          mItem);
      dmItem = mItem;
    }
    mItem->SetSelectable(false);
    mItem = (cMainMenuItem*)Next(mItem);
  }

  if(dmItem)
    Del(dmItem->Index());
  Display();
  cOsdMenu::ProcessKey(kRight);

  return osContinue;
}
예제 #14
0
void cMenuSetupEPGMenus::Set()
{
    int current = Current();
    Clear();
    helpTexts.clear();

    Add(new cMenuEditStraItem(  tr("Ok key"), &data->useOkForSwitch, 2, OkKeyMode));
    AddHelp(tr("Help$Choose here the behaviour of key 'Ok'. You can use it to display the summary or to switch to the corresponding channel.\nNote: the functionality of key 'blue' (Switch/Info/Search) depends on this setting."));

    Add(new cMenuEditStraItem(tr("Red key"), &data->redkeymode, 2, RedKeyMode));
    AddHelp(tr("Help$Choose which standard function ('Record' or 'Commands') you like to have on the red key.\n(Can be toggled with key '0')"));
    Add(new cMenuEditStraItem(tr("Blue key"), &data->bluekeymode, 2, BlueKeyMode));
    AddHelp(tr("Help$Choose which standard function ('Switch'/'Info' or 'Search') you like to have on the blue key.\n(Can be toggled with key '0')"));

    Add(new cMenuEditBoolItem(tr("Show progress in 'Now'"), &data->showProgress, trVDR("no"), trVDR("yes")));
    AddHelp(tr("Help$Shows a progressbar in 'Overview - Now' that informs about the remaining time of the current event."));
    Add(new cMenuEditBoolItem(  tr("Show channel numbers"), &data->showChannelNr,       trVDR("no"),      trVDR("yes")));
    AddHelp(tr("Help$Display channel numbers in 'Overview - Now'.\n\n(To completely define your own menu look please inspect the MANUAL)"));
    Add(new cMenuEditBoolItem(  tr("Show channel separators"), &data->showChannelGroups,       trVDR("no"),      trVDR("yes")));
    AddHelp(tr("Help$Display VDR channel groups as separators between your channels in 'Overview - Now'."));
    Add(new cMenuEditBoolItem(  tr("Show day separators"), &data->showDaySeparators,       trVDR("no"),      trVDR("yes")));
    AddHelp(tr("Help$Display a separator line at day break in 'Schedule'."));
    Add(new cMenuEditBoolItem(  tr("Show radio channels"), &data->showRadioChannels,       trVDR("no"),      trVDR("yes")));
    AddHelp(tr("Help$Show also radio channels."));
    Add(new cMenuEditIntItem(tr("Limit channels from 1 to"), &data->maxChannelMenuNow, 0, 9999));
    AddHelp(tr("Help$If you have a large channel set you can speed up things when you limit the displayed channels with this setting. Use '0' to disable the limit."));
    Add(new cMenuEditBoolItem(  tr("'One press' timer creation"), &data->onePressTimerCreation,       trVDR("no"),      trVDR("yes")));
    AddHelp(tr("Help$When a timer is created with 'Record' you can choose between an immediate creation of the timer or the display of the timer edit menu."));
    Add(new cMenuEditBoolItem(  tr("Show channels without EPG"), &data->showEmptyChannels,       trVDR("no"),      trVDR("yes")));
    AddHelp(tr("Help$Choose 'yes' here if you want to display channels without EPG in 'Overview - Now'. 'Ok' on these entries switches the channel."));
    Add(new cMenuEditIntItem(tr("Time interval for FRew/FFwd [min]"), &data->timeShiftValue, 1, 9999));
    AddHelp(tr("Help$Choose here the time interval which should be used for jumping through the EPG by pressing FRew/FFwd.\n\n(If you don't have those keys, you can toggle to this functionality pressing '0' and get '<<' and '>>' on the keys green and yellow)"));
    Add(new cMenuEditBoolItem(  tr("Toggle Green/Yellow"), &data->toggleGreenYellow,       trVDR("no"),      trVDR("yes")));
    AddHelp(tr("Help$Specify if green and yellow shall also be switched when pressing '0'."));

    Add(new cMenuEditStraItem(  tr("Show favorites menu"), &data->showFavoritesMenu, 4, FavoritesMenuMode));
    AddHelp(tr("Help$A favorites menu can display a list of your favorite broadcasts. Enable this if you want an additional menu besides 'Now' and 'Next'\nAny search can be used as a favorite. You only have to set the option 'Use in favorites menu' when editing a search."));
    if (data->showFavoritesMenu)
    {
	Add(new cMenuEditIntItem( IndentMenuItem(tr("for the next ... hours")), &data->FavoritesMenuTimespan, 1, 9999));
	AddHelp(tr("Help$This value controls the timespan used to display your favorites."));
    }

    SetCurrent(Get(current));
    Display();
    SetHelpKeys();
}
예제 #15
0
void cMpvPluginSetup::Setup()
{
  int current = Current();
  Clear();

  Add(new cMenuEditBoolItem(tr("Hide main menu entry"), &SetupHideMainMenuEntry, trVDR("no"), trVDR("yes")));
  Add(new cMenuEditBoolItem(tr("Audio Passthrough"), &SetupUsePassthrough));
  if (SetupUsePassthrough)
    Add(new cMenuEditBoolItem(tr("DTS-HD Passthrough"), &SetupUseDtsHdPassthrough));
  else
    Add(new cMenuEditBoolItem(tr("Enable stereo downmix"), &SetupStereoDownmix));
  Add(new cMenuEditBoolItem(tr("Use prev/next keys for playlist control"), &SetupPlaylistOnNextKey));
  if (!SetupPlaylistOnNextKey)
    Add(new cMenuEditBoolItem(tr("Control playlist if no chapters in file"), &SetupPlaylistIfNoChapters));
  Add(new cMenuEditBoolItem(tr("Show media title instead of filename"), &SetupShowMediaTitle));
  SetCurrent(Get(current));
  Display();
}
예제 #16
0
eOSState cSatipPluginSetup::ProcessKey(eKeys keyP)
{
  bool hadSubMenu = HasSubMenu();
  int oldOperatingMode = operatingModeM;
  int oldCiExtension = ciExtensionM;
  int oldNumDisabledSources = numDisabledSourcesM;
  int oldNumDisabledFilters = numDisabledFiltersM;
  eOSState state = cMenuSetupPage::ProcessKey(keyP);

  // Ugly hack with hardcoded '+/-' characters :(
  const char *p = Get(Current())->Text();
  if (!hadSubMenu && !HasSubMenu() && p && (*p == '+' || *p == '-') && (keyP == kOk))
     return DeviceInfo();
  if (hadSubMenu && !HasSubMenu())
     Setup();

  if (state == osUnknown) {
     switch (keyP) {
       case kRed:    return DeviceScan();
       case kYellow: return ShowDeviceStatus();
       case kBlue:   return ShowInfo();
       case kInfo:   if (Current() < helpM.Size())
                        return AddSubMenu(new cMenuText(cString::sprintf("%s - %s '%s'", tr("Help"), trVDR("Plugin"), PLUGIN_NAME_I18N), helpM[Current()]));
       default:      state = osContinue; break;
       }
     }

  if ((keyP == kNone) && (cSatipDiscover::GetInstance()->GetServers()->Count() != deviceCountM))
     Setup();

  if ((keyP != kNone) && ((numDisabledSourcesM != oldNumDisabledSources) || (numDisabledFiltersM != oldNumDisabledFilters) || (operatingModeM != oldOperatingMode) || (ciExtensionM != oldCiExtension) || (detachedModeM != SatipConfig.GetDetachedMode()))) {
     while ((numDisabledSourcesM < oldNumDisabledSources) && (oldNumDisabledSources > 0))
           disabledSourcesM[--oldNumDisabledSources] = cSource::stNone;
     while ((numDisabledFiltersM < oldNumDisabledFilters) && (oldNumDisabledFilters > 0))
           disabledFilterIndexesM[--oldNumDisabledFilters] = -1;
     Setup();
     }

  return state;
}
// --- cMenuBlacklistEdit --------------------------------------------------------
cMenuBlacklistEdit::cMenuBlacklistEdit(cBlacklist *Blacklist, bool New)
:cOsdMenu(tr("Edit blacklist"),32)
{
#if VDRVERSNUM >= 10734
  SetMenuCategory(mcSetupPlugins);
#endif
    SearchModes[0] = strdup(tr("phrase"));
    SearchModes[1] = strdup(tr("all words"));
    SearchModes[2] = strdup(tr("at least one word"));
    SearchModes[3] = strdup(tr("match exactly"));
    SearchModes[4] = strdup(tr("regular expression"));
    SearchModes[5] = strdup(tr("fuzzy"));

    DaysOfWeek[0] = strdup(WeekDayName(0));
    DaysOfWeek[1] = strdup(WeekDayName(1));
    DaysOfWeek[2] = strdup(WeekDayName(2));
    DaysOfWeek[3] = strdup(WeekDayName(3));
    DaysOfWeek[4] = strdup(WeekDayName(4));
    DaysOfWeek[5] = strdup(WeekDayName(5));
    DaysOfWeek[6] = strdup(WeekDayName(6));
    DaysOfWeek[7] = strdup(tr("user-defined"));

    UseChannelSel[0] = strdup(trVDR("no"));
    UseChannelSel[1] = strdup(tr("interval"));
    UseChannelSel[2] = strdup(tr("channel group"));
    UseChannelSel[3] = strdup(tr("only FTA"));

    if (New)
    {
	cSearchExt* SearchTempl = NULL; // copy the default settings, if we have a default template
	cMutexLock SearchTemplatesLock(&SearchTemplates);
	cSearchExt *SearchExtTempl = SearchTemplates.First();
	while (SearchExtTempl)
	{
	    if (SearchExtTempl->ID == EPGSearchConfig.DefSearchTemplateID)
		SearchTempl = SearchExtTempl;
	    SearchExtTempl = SearchTemplates.Next(SearchExtTempl);
	}
	if (SearchTempl)
	    Blacklist->CopyFromTemplate(SearchTempl);
    }

    blacklist = Blacklist;
    addIfConfirmed = New;

    if (blacklist)
    {
	data = *blacklist;
	UserDefDayOfWeek = 0;
	if (blacklist->DayOfWeek < 0)
	{
	    UserDefDayOfWeek = blacklist->DayOfWeek;
	    data.DayOfWeek = 7;
	}

	menuitemsChGr = NULL;
	channelGroupName = NULL;

	channelMin = channelMax = cDevice::CurrentChannel();
	channelGroupNr = 0;
	if (data.useChannel==1)
	{
	    channelMin = data.channelMin->Number();
	    channelMax = data.channelMax->Number();
	}
	if (data.useChannel==2)
	{
	    channelGroupNr = ChannelGroups.GetIndex(data.channelGroup);
	    if (channelGroupNr == -1)
	    {
		free(data.channelGroup);
		data.channelGroup = NULL;
		channelGroupNr = 0; // no selection
	    }
	    else
	    {
		channelGroupName = strdup(data.channelGroup);
		channelGroupNr++;
	    }
	}
	catvaluesNumeric = NULL;
	if (SearchExtCats.Count() > 0)
	  {
	    catvaluesNumeric = (int*) malloc(SearchExtCats.Count() * sizeof(int));
	    cSearchExtCat *SearchExtCat = SearchExtCats.First();
	    int index = 0;
	    while (SearchExtCat)
	      {
		catvaluesNumeric[index] = atol(blacklist->catvalues[index]);
		SearchExtCat = SearchExtCats.Next(SearchExtCat);
		index++;
	      }
	  }
	Set();
    }
}
예제 #18
0
파일: favourites.c 프로젝트: suborb/reelvdr
cMenuRenameFavFolder::cMenuRenameFavFolder(cChannel *chan)
    : cOsdMenu(trVDR("Functions: Rename favourite folder")), channel(chan)
{
    strncpy(folderName, channel->Name(), sizeof(folderName));
    Set();
}
예제 #19
0
파일: favourites.c 프로젝트: suborb/reelvdr
/** **************** cMenuFavouritesFunction ***********************************
*** Menu to offer functions on favourites menu
*******************************************************************************/
cMenuFavouritesFunction::cMenuFavouritesFunction(cChannel* chan) :
    cOsdMenu(trVDR("Functions: Favourites")),
    channel(chan)
{
    Set();
}
예제 #20
0
void cMenuSetupTimerConflicts::Set()
{
  int current = Current();
  Clear();
  helpTexts.clear();

  Add(new cMenuEditIntItem(tr("Ignore below priority"), &data->checkMinPriority, 0, MAXPRIORITY));
  AddHelp(tr("Help$If a timer with priority below the given value will fail it will not be classified as important. Only important conflicts will produce an OSD message about the conflict after an automatic conflict check."));
  Add(new cMenuEditIntItem(tr("Ignore conflict duration less ... min."), &data->checkMinDuration, 0, 999));
  AddHelp(tr("Help$If a conflicts duration is less then the given number of minutes it will not be classified as important. Only important conflicts will produce an OSD message about the conflict after an automatic conflict check."));
  Add(new cMenuEditIntItem(tr("Only check within next ... days"), &data->checkMaxDays, 1, 99));
  AddHelp(tr("Help$This value reduces the conflict check to the given range of days. All other conflicts are classified as 'not yet important'."));

  cOsdItem* sep = new cOsdItem(tr("--- Automatic checking ---"));
  sep->SetSelectable(false);
  Add(sep);
  AddHelp("dummy");

  Add(new cMenuEditBoolItem(tr("After each timer programming"), &data->checkTimerConflAfterTimerProg, trVDR("no"), trVDR("yes")));
  AddHelp(tr("Help$Set this to 'yes' if the conflict check should be performed after each manual timer programming. In the case of a conflict you get immediately a message that informs you about it. The message is only displayed if this timer is involved in any conflict."));
  Add(new cMenuEditBoolItem(tr("When a recording starts"), &data->checkTimerConflOnRecording, trVDR("no"), trVDR("yes")));
  AddHelp(tr("Help$Set this to 'yes' if the conflict check should be performed when a recording starts. In the case of a conflict you get immediately a message that informs you about it. The message is only displayed if the conflict is within the next 2 hours."));

  Add(new cMenuEditBoolItem(tr("After each search timer update"), &data->checkTimerConflictsAfterUpdate, trVDR("no"), trVDR("yes")));
  AddHelp(tr("Help$Set this to 'yes' if the conflict check should be performed after each search timer update."));
  if (!data->checkTimerConflictsAfterUpdate)
  {
      Add(new cMenuEditIntItem(IndentMenuItem(tr("every ... minutes")), &data->conflictCheckIntervall, 0, 999));
      AddHelp(tr("Help$Specify here the time intervall to be used for an automatic conflict check in the background.\n('0' disables an automatic check)"));
      Add(new cMenuEditIntItem(IndentMenuItem(tr("if conflicts within next ... minutes")), &data->conflictCheckWithinLimit, 0, 9999));
      AddHelp(tr("Help$If the next conflict will appear in the given number of minutes you can specify here a shorter check intervall to get more OSD notifications about it."));
      if (data->conflictCheckWithinLimit)
      {
	  Add(new cMenuEditIntItem(IndentMenuItem(IndentMenuItem(tr("every ... minutes"))), &data->conflictCheckIntervall2, 1, 999));
      AddHelp(tr("Help$If the next conflict will appear in the given number of minutes you can specify here a shorter check intervall to get more OSD notifications about it."));
      }
  }
  Add(new cMenuEditBoolItem(tr("Avoid notification when replaying"), &data->noConflMsgWhileReplay, trVDR("no"), trVDR("yes")));
  AddHelp(tr("Help$Set this to 'yes' if the don't want to get OSD messages about conflicts if you currently replay something. Nevertheless messages will be displayed if the first upcoming conflict is within the next 2 hours."));

  SetCurrent(Get(current));
  Display();
  SetHelp(NULL, NULL, tr("Button$Help"), NULL);
}
예제 #21
0
파일: favourites.c 프로젝트: suborb/reelvdr
cMenuMoveFavFolder::cMenuMoveFavFolder(cChannel *chan)
    : cOsdMenu(trVDR("Functions: Move favourites bouquet")), channel(chan)
{
    Set();
}
예제 #22
0
void cMenuSetupUserdefTimes::Set()
{
  int current = Current();
  Clear();
  helpTexts.clear();

  cString szUseUserTime = cString::sprintf("%s %d", tr("Use user-defined time"), 1);
  Add(new cMenuEditBoolItem(szUseUserTime, &data->ShowModes[showUserMode1].useIt,       trVDR("no"),      trVDR("yes")));
  AddHelp(tr("Help$Besides 'Now' and 'Next' you can specify up to 4 other times in the EPG which can be used by repeatedly pressing the green key, e.g. 'prime time', 'late night',..."));
  if (data->ShowModes[showUserMode1].GetUsage())
  {
      Add(new cMenuEditStrItem(IndentMenuItem(tr("Description")), data->ShowModes[showUserMode1].description, sizeof(data->ShowModes[showUserMode1].description), trVDR(FileNameChars)));
      AddHelp(tr("Help$This is the description for your user-defined time as it will appear as label on the green button."));
      Add(new cMenuEditTimeItem(IndentMenuItem(tr("Time")), &data->ShowModes[showUserMode1].itime));
      AddHelp(tr("Help$Specify the user-defined time here in 'HH:MM'."));
  }

  szUseUserTime = cString::sprintf("%s %d", tr("Use user-defined time"), 2);
  Add(new cMenuEditBoolItem( szUseUserTime, &data->ShowModes[showUserMode2].useIt,       trVDR("no"),      trVDR("yes")));
  AddHelp(tr("Help$Besides 'Now' and 'Next' you can specify up to 4 other times in the EPG which can be used by repeatedly pressing the green key, e.g. 'prime time', 'late night',..."));
  if (data->ShowModes[showUserMode2].GetUsage())
  {
      Add(new cMenuEditStrItem(IndentMenuItem(tr("Description")), data->ShowModes[showUserMode2].description, sizeof(data->ShowModes[showUserMode2].description), trVDR(FileNameChars)));
      AddHelp(tr("Help$This is the description for your user-defined time as it will appear as label on the green button."));
      Add(new cMenuEditTimeItem(IndentMenuItem(tr("Time")), &data->ShowModes[showUserMode2].itime));
      AddHelp(tr("Help$Specify the user-defined time here in 'HH:MM'."));
  }

  szUseUserTime = cString::sprintf("%s %d", tr("Use user-defined time"), 3);
  Add(new cMenuEditBoolItem(szUseUserTime, &data->ShowModes[showUserMode3].useIt,       trVDR("no"),      trVDR("yes")));
  AddHelp(tr("Help$Besides 'Now' and 'Next' you can specify up to 4 other times in the EPG which can be used by repeatedly pressing the green key, e.g. 'prime time', 'late night',..."));
  if (data->ShowModes[showUserMode3].GetUsage())
  {
      Add(new cMenuEditStrItem(IndentMenuItem(tr("Description")), data->ShowModes[showUserMode3].description, sizeof(data->ShowModes[showUserMode3].description), trVDR(FileNameChars)));
      AddHelp(tr("Help$This is the description for your user-defined time as it will appear as label on the green button."));
      Add(new cMenuEditTimeItem(IndentMenuItem(tr("Time")), &data->ShowModes[showUserMode3].itime));
      AddHelp(tr("Help$Specify the user-defined time here in 'HH:MM'."));
  }

  szUseUserTime = cString::sprintf("%s %d", tr("Use user-defined time"), 4);
  Add(new cMenuEditBoolItem(szUseUserTime, &data->ShowModes[showUserMode4].useIt,       trVDR("no"),      trVDR("yes")));
  AddHelp(tr("Help$Besides 'Now' and 'Next' you can specify up to 4 other times in the EPG which can be used by repeatedly pressing the green key, e.g. 'prime time', 'late night',..."));
  if (data->ShowModes[showUserMode4].GetUsage())
  {
      Add(new cMenuEditStrItem(IndentMenuItem(tr("Description")), data->ShowModes[showUserMode4].description, sizeof(data->ShowModes[showUserMode4].description), trVDR(FileNameChars)));
      AddHelp(tr("Help$This is the description for your user-defined time as it will appear as label on the green button."));
      Add(new cMenuEditTimeItem(IndentMenuItem(tr("Time")), &data->ShowModes[showUserMode4].itime));
      AddHelp(tr("Help$Specify the user-defined time here in 'HH:MM'."));
  }

  SetCurrent(Get(current));
  Display();
  SetHelp(NULL, NULL, tr("Button$Help"), NULL);
}
예제 #23
0
파일: favourites.c 프로젝트: suborb/reelvdr
/** ****************** cMenuMoveChannelInFavBouquet ****************************
*** Select a channel in bouquet and change its position within the bouquet
*******************************************************************************/
cMenuMoveChannelInFavBouquet::cMenuMoveChannelInFavBouquet(cChannel *ch)
    :cOsdMenu(trVDR("Functions: Move Channel")), channel(ch)
{
    Set();
}
예제 #24
0
파일: cam_menu.c 프로젝트: suborb/reelvdr
cCamMenu::cCamMenu (cmdline_t * cmd) 
#if APIVERSNUM < 10700
: cOsdMenu (trVDR ("Common Interface"), 18)
#else
: cOsdMenu (trVDR ("Common Interface"), 23)
예제 #25
0
파일: cam_menu.c 프로젝트: suborb/reelvdr
		cCamMtd(const char *uuid, int slot, const char *info, nc_ca_caps_t flags) : 
				cMenuEditIntItem((const char *)cString::sprintf("      %s", tr("Multi-Transponder")), &m_flags, 1, 2, trVDR("no"), trVDR("yes")) {
			m_oflags = m_flags = flags;
			if(uuid) strcpy (m_uuid, uuid); else m_uuid[0]=0;
			if(info) strcpy (m_info, info); else m_info[0]=0;
			m_slot = slot;
			Set();
		}; // cCamMtd
예제 #26
0
파일: cam_menu.c 프로젝트: suborb/reelvdr
				} // if
				node = node->next;
			} // while
			return uuid_match && flags_set;
		}; // PatchCamFlags
		cCamMenu *m_menu;
		const char *m_iface;
		unsigned int m_state;
		cString m_statestr;
}; // cNCUpdate

cCamMenu::cCamMenu (cmdline_t * cmd) 
#if APIVERSNUM < 10700
: cOsdMenu (trVDR ("Common Interface"), 18)
#else
: cOsdMenu (trVDR ("Common Interface"), 23)
#endif
{
	NCUpdate=NULL;
	m_cmd = cmd;
	inCamMenu = false;
	inMMIBroadcastMenu = false;
	inputRequested = eInputNone;
	end = false;
	currentSelected = -1;
	pinCounter = 0;
	alreadyReceived = false;
	mmi_session = -1;
	SetNeedsFastResponse (true);
	CamFind ();
}
예제 #27
0
파일: favourites.c 프로젝트: suborb/reelvdr
/** ****************** cMenuAddChannelToFavourites *****************************
*** Select a bouquet and add give channel to favourites list
*** if no bouquet is available create a new bouquet
*******************************************************************************/
cMenuAddChannelToFavourites::cMenuAddChannelToFavourites(std::vector<int> channels, bool standAlone_)
    : cOsdMenu(trVDR("Functions: Select favourite folder")), channelsToAdd(channels), standAlone(standAlone_)
{
    Set();
}
void cMenuBlacklistEdit::Set()
{
    int current = Current();
    Clear();

    Add(new cMenuEditStrItem( tr("Search term"), data.search, sizeof(data.search), tr(AllowedChars)));
    Add(new cMenuEditStraItem(tr("Search mode"),     &data.mode, 6, SearchModes));
    if (data.mode == 5) // fuzzy
	Add(new cMenuEditIntItem(IndentMenuItem(tr("Tolerance")), &data.fuzzyTolerance, 1, 9));
    Add(new cMenuEditBoolItem( tr("Match case"), &data.useCase, trVDR("no"), trVDR("yes")));
    Add(new cMenuEditBoolItem( tr("Use title"), &data.useTitle, trVDR("no"), trVDR("yes")));
    Add(new cMenuEditBoolItem( tr("Use subtitle"), &data.useSubtitle, trVDR("no"), trVDR("yes")));
    Add(new cMenuEditBoolItem( tr("Use description"), &data.useDescription, trVDR("no"), trVDR("yes")));

    // show Categories only if we have them
    if (SearchExtCats.Count() > 0)
    {
	Add(new cMenuEditBoolItem( tr("Use extended EPG info"), &data.useExtEPGInfo, trVDR("no"), trVDR("yes")));
	if (data.useExtEPGInfo)
	{
	    cSearchExtCat *SearchExtCat = SearchExtCats.First();
	    int index = 0;
	    while (SearchExtCat)
	    {
	      if (SearchExtCat->searchmode >= 10)
		Add(new cMenuEditIntItem(IndentMenuItem(SearchExtCat->menuname), &catvaluesNumeric[index], 0, 999999, ""));
	      else
		Add(new cMenuEditStrItem( IndentMenuItem(SearchExtCat->menuname), data.catvalues[index], MaxFileName, tr(AllowedChars)));

	      SearchExtCat = SearchExtCats.Next(SearchExtCat);
	      index++;
	    }
	    Add(new cMenuEditBoolItem(IndentMenuItem(tr("Ignore missing categories")), &data.ignoreMissingEPGCats, trVDR("no"), trVDR("yes")));	}
    }

    Add(new cMenuEditStraItem(tr("Use channel"), &data.useChannel, 4, UseChannelSel));
    if (data.useChannel==1)
    {
	Add(new cMenuEditChanItem(tr("  from channel"),      &channelMin));
	Add(new cMenuEditChanItem(tr("  to channel"),      &channelMax));
    }
    if (data.useChannel==2)
    {
	// create the char array for the menu display
	if (menuitemsChGr) delete [] menuitemsChGr;
	menuitemsChGr = ChannelGroups.CreateMenuitemsList();
	int oldchannelGroupNr = channelGroupNr;
	channelGroupNr = ChannelGroups.GetIndex(channelGroupName);
	if (channelGroupNr == -1)
	{
	    if (oldchannelGroupNr > 0 && oldchannelGroupNr <= ChannelGroups.Count()) // perhaps its name was changed
		channelGroupNr = oldchannelGroupNr;
	    else
		channelGroupNr = 0; // no selection
	}
	else
	    channelGroupNr++;
	Add(new cMenuEditStraItem(IndentMenuItem(tr("Channel group")), &channelGroupNr, ChannelGroups.Count()+1, menuitemsChGr));
    }

    Add(new cMenuEditBoolItem( tr("Use time"), &data.useTime, trVDR("no"), trVDR("yes")));
    if (data.useTime == true)
    {
	Add(new cMenuEditTimeItem(tr("  Start after"),        &data.startTime));
	Add(new cMenuEditTimeItem(tr("  Start before"),         &data.stopTime));
    }
    Add(new cMenuEditBoolItem( tr("Use duration"), &data.useDuration, trVDR("no"), trVDR("yes")));
    if (data.useDuration == true)
    {
	Add(new cMenuEditTimeItem(tr("  Min. duration"), &data.minDuration));
	Add(new cMenuEditTimeItem(tr("  Max. duration"), &data.maxDuration));
    }
    Add(new cMenuEditBoolItem( tr("Use day of week"), &data.useDayOfWeek, trVDR("no"), trVDR("yes")));
    if (data.useDayOfWeek)
    {
	if (data.DayOfWeek < 0)
	{
	    UserDefDayOfWeek = data.DayOfWeek;
	    data.DayOfWeek = 7;
	}
	Add(new cMenuEditStraItem(IndentMenuItem(tr("Day of week")), &data.DayOfWeek, 8, DaysOfWeek));
    }
    Add(new cMenuEditBoolItem( tr("Use global"), &data.isGlobal, trVDR("no"), trVDR("yes")));

    SetCurrent(Get(current));
}
예제 #29
0
void cConnection::OsdStatusMessage(const char *Message)
{
  if (m_StatusInterfaceEnabled && Message)
  {
    /* Ignore this messages */
    if (strcasecmp(Message, trVDR("Channel not available!")) == 0) return;
    else if (strcasecmp(Message, trVDR("Delete timer?")) == 0) return;
    else if (strcasecmp(Message, trVDR("Delete recording?")) == 0) return;
    else if (strcasecmp(Message, trVDR("Press any key to cancel shutdown")) == 0) return;
    else if (strcasecmp(Message, trVDR("Press any key to cancel restart")) == 0) return;
    else if (strcasecmp(Message, trVDR("Editing - shut down anyway?")) == 0) return;
    else if (strcasecmp(Message, trVDR("Recording - shut down anyway?")) == 0) return;
    else if (strcasecmp(Message, trVDR("shut down anyway?")) == 0) return;
    else if (strcasecmp(Message, trVDR("Recording - restart anyway?")) == 0) return;
    else if (strcasecmp(Message, trVDR("Editing - restart anyway?")) == 0) return;
    else if (strcasecmp(Message, trVDR("Delete channel?")) == 0) return;
    else if (strcasecmp(Message, trVDR("Timer still recording - really delete?")) == 0) return;
    else if (strcasecmp(Message, trVDR("Delete marks information?")) == 0) return;
    else if (strcasecmp(Message, trVDR("Delete resume information?")) == 0) return;
    else if (strcasecmp(Message, trVDR("CAM is in use - really reset?")) == 0) return;
    else if (strcasecmp(Message, trVDR("Really restart?")) == 0) return;
    else if (strcasecmp(Message, trVDR("Stop recording?")) == 0) return;
    else if (strcasecmp(Message, trVDR("Cancel editing?")) == 0) return;
    else if (strcasecmp(Message, trVDR("Cutter already running - Add to cutting queue?")) == 0) return;
    else if (strcasecmp(Message, trVDR("No index-file found. Creating may take minutes. Create one?")) == 0) return;

    cResponsePacket *resp = new cResponsePacket();
    if (!resp->initStatus(VDR_STATUS_MESSAGE))
    {
      delete resp;
      return;
    }

//    else if (type == mtWarning)
//      resp->add_U32(1);
//    else if (type == mtError)
//      resp->add_U32(2);
//    else
    resp->add_U32(0);
    resp->add_String(Message);
    resp->finalise();
    m_socket.write(resp->getPtr(), resp->getLen());
    delete resp;
  }
}
eOSState cMenuBlacklistEdit::ProcessKey(eKeys Key)
{
    bool bHadSubMenu = HasSubMenu();

    int iTemp_mode = data.mode;
    int iTemp_useTime = data.useTime;
    int iTemp_useChannel = data.useChannel;
    int iTemp_useDuration = data.useDuration;
    int iTemp_useDayOfWeek = data.useDayOfWeek;
    int iTemp_useExtEPGInfo = data.useExtEPGInfo;

    eOSState state = cOsdMenu::ProcessKey(Key);

    if (iTemp_mode != data.mode ||
	iTemp_useTime != data.useTime ||
	iTemp_useChannel != data.useChannel ||
	iTemp_useDuration != data.useDuration ||
	iTemp_useDayOfWeek != data.useDayOfWeek ||
	iTemp_useExtEPGInfo != data.useExtEPGInfo)
    {
	Set();
	Display();
    }
    const char* ItemText = Get(Current())->Text();

    if (!HasSubMenu())
    {
	if (strlen(ItemText)>0 && strstr(ItemText, tr("  from channel")) == ItemText && ((Key >= k0 &&  Key <= k9) || Key == kLeft || Key == kRight))
	{
	    channelMax = channelMin;
	    Set();
	    Display();
	}
    }

    int iOnUserDefDayItem = 0;
    int iOnUseChannelGroups = 0;
    int iOnChannelGroup = 0;
    int iOnTerm = 0;
    int iOnExtCatItemBrowsable = 0;
    int iCatIndex = -1;
    char* catname = NULL;

    if (!HasSubMenu() && strlen(ItemText)>0)
    {
	// check, if on an item of ext. EPG info
	int iOnExtCatItem = 0;
	cSearchExtCat *SearchExtCat = SearchExtCats.First();
	int index = 0;
	while (SearchExtCat)
	{
	    if (strstr(ItemText, IndentMenuItem(SearchExtCat->menuname)) == ItemText)
	    {
		iOnExtCatItem = 1;
		if (SearchExtCat->nvalues > 0)
		    iOnExtCatItemBrowsable = 1;
		iCatIndex = index;
		catname = SearchExtCat->menuname;
		break;
	    }
	    index++;
	    SearchExtCat = SearchExtCats.Next(SearchExtCat);
	}

	if (strstr(ItemText, tr("Search term")) == ItemText)
	{
	    if (!InEditMode(ItemText, tr("Search term"), data.search)) // show template for a new search
	    {
		SetHelp(NULL, NULL, NULL, tr("Button$Templates"));
		iOnTerm = 1;
	    }
	}
       	if (strstr(ItemText, IndentMenuItem(tr("Day of week"))) == ItemText)
	{
	    if (data.DayOfWeek == 7)
	    {
		SetHelp(trVDR("Button$Edit"));
		iOnUserDefDayItem = 1;
	    }
	    else
		SetHelp(NULL);
	}
	else if (strstr(ItemText, tr("Use channel")) == ItemText && data.useChannel == 2)
	{
	    SetHelp(NULL, NULL, NULL, tr("Button$Setup"));
	    iOnUseChannelGroups = 1;
	}
	else if (strstr(ItemText, IndentMenuItem(tr("Channel group"))) == ItemText)
	{
	    SetHelp(NULL, NULL, NULL, tr("Button$Setup"));
	    iOnChannelGroup = 1;
	}
	else if (iOnExtCatItem)
	{
	    if (!InEditMode(ItemText, IndentMenuItem(catname), data.catvalues[iCatIndex]) ||
		 SearchExtCats.Get(iCatIndex)->searchmode >= 10)
		SetHelp(NULL, NULL, NULL, iOnExtCatItemBrowsable?tr("Button$Select"):NULL);
	}
	else if (strstr(ItemText, tr("Search term")) != ItemText)
	    SetHelp(NULL, NULL, NULL, NULL);
    }
    if (state == osUnknown) {
	if (HasSubMenu())
	    return osContinue;
	switch (Key) {
	    case kOk:
		if (data.useChannel==1)
		{
		    cChannel *ch = Channels.GetByNumber(channelMin);
		    if (ch)
			data.channelMin = ch;
		    else
		    {
		      ERROR(tr("*** Invalid Channel ***"));
		      break;
		    }
		    ch = Channels.GetByNumber(channelMax);
		    if (ch)
			data.channelMax = ch;
		    else
		    {
		      ERROR(tr("*** Invalid Channel ***"));
		      break;
		    }
		    if (channelMin > channelMax)
		    {
		      ERROR(tr("Please check channel criteria!"));
		      return osContinue;
		    }
		}
		if (data.useChannel==2)
		    data.channelGroup = strdup(menuitemsChGr[channelGroupNr]);

		if (blacklist)
		{
		    *blacklist = data;
		    if (data.DayOfWeek == 7)
			blacklist->DayOfWeek = UserDefDayOfWeek;

		    // transfer numeric cat values back to search
		    cSearchExtCat *SearchExtCat = SearchExtCats.First();
		    int index = 0;
		    while (SearchExtCat)
		      {
			if (SearchExtCat->searchmode >= 10)
			  {
			    if (blacklist->catvalues[index]) free(blacklist->catvalues[index]);
			    msprintf(&blacklist->catvalues[index], "%d", catvaluesNumeric[index]);
			  }
			SearchExtCat = SearchExtCats.Next(SearchExtCat);
			index++;
		      }

		    if (addIfConfirmed)
		    {
			cMutexLock BlacklistLock(&Blacklists);
			blacklist->ID = Blacklists.GetNewID();
			Blacklists.Add(blacklist);
		    }

		    Blacklists.Save();
		    addIfConfirmed = false;
		}
		return osBack;
	    case kRed:
		if (iOnUserDefDayItem)
		    state = AddSubMenu(new cMenuEditDaysOfWeek(&UserDefDayOfWeek));
		break;

	    case kBlue:
		if (iOnUseChannelGroups || iOnChannelGroup)
		{
		    if (channelGroupName)
			free(channelGroupName);
		    channelGroupName = strdup(menuitemsChGr[channelGroupNr]);
		    state = AddSubMenu(new cMenuChannelGroups(&channelGroupName));
		}
		if (iOnTerm)
		    state = AddSubMenu(new cMenuEPGSearchTemplate(NULL, &data, addIfConfirmed));
		if (iOnExtCatItemBrowsable)
		    state = AddSubMenu(new cMenuCatValuesSelect(data.catvalues[iCatIndex], iCatIndex, SearchExtCats.Get(iCatIndex)->searchmode));
		break;
	    case kGreen:
	    case kYellow: state = osContinue;
	    default: break;
	}
    }
    if ((iOnUseChannelGroups || iOnChannelGroup || iOnTerm || iOnExtCatItemBrowsable) && bHadSubMenu && !HasSubMenu()) // return form submenu
    {
	if (iOnTerm)
	{
	    if (data.DayOfWeek < 0)
	    {
		UserDefDayOfWeek = data.DayOfWeek;
		data.DayOfWeek = 7;
	    }
	    if (data.useChannel == 2)
	    {
		channelGroupNr = ChannelGroups.GetIndex(data.channelGroup);
		channelGroupName = strdup(data.channelGroup);
	    }
	}
	if (iOnExtCatItemBrowsable && SearchExtCats.Count() > 0)
	  {
	    cSearchExtCat *SearchExtCat = SearchExtCats.First();
	    int index = 0;
	    while (SearchExtCat)
	      {
		if (SearchExtCat->searchmode >= 10)
		  catvaluesNumeric[index] = atoi(data.catvalues[index]);
		SearchExtCat = SearchExtCats.Next(SearchExtCat);
		index++;
	      }
	  }
	Set();
	Display();
    }
    return state;
}