Пример #1
0
void cSkindesignerSkinSetup::Set(void) {
    cSkinSetupMenu *setupMenu = config.GetSkinSetupMenu(skin, menu);
    if (!setupMenu) {
        return;
    }
    
    cSkinRepo *repo = config.GetSkinRepo(skin);
    if (repo) {
        if (repo->Type() == rtGit)
            SetHelp(tr("Update"), NULL, tr("Delete Skin"), NULL);
        else
            SetHelp(NULL, NULL, tr("Delete Skin"), NULL);
    }

    setupMenu->InitParameterIterator();
    cSkinSetupParameter *param = NULL;
    while (param = setupMenu->GetNextParameter(false)) {
        if (param->type == sptInt) {
            Add(new cMenuEditIntItem(param->displayText.c_str(), &param->value, param->min, param->max));
        } else if (param->type == sptBool) {
            Add(new cMenuEditBoolItem(param->displayText.c_str(), &param->value));
        }
    }

    setupMenu->InitSubmenuIterator();
    cSkinSetupMenu *subMenu = NULL;
    while (subMenu = setupMenu->GetNextSubMenu(false)) {
        Add(new cSkinSetupSubMenu(subMenu->GetName(), subMenu->GetDisplayText()));
    }
}
Пример #2
0
void cMenuSearchResultsForBlacklist::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)
    {

      ModeBlueSR nextModeBlue = (ModeBlueSR)(((int)modeBlue+1)%3);
      if (nextModeBlue == showTimerPreview)
	nextModeBlue = (ModeBlueSR)(((int)nextModeBlue+1)%3);

      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"), NULL);
      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"), NULL);
      helpKeys = NewHelpKeys;
    }
}
Пример #3
0
void cMenuSearchMain::SetHelpKeys(bool Force)
{
    cMenuMyScheduleItem *item = (cMenuMyScheduleItem *)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")), trVDR("Button$Now"), trVDR("Button$Next"), EPGSearchConfig.bluekeymode==0?trVDR("Button$Switch"):tr("Button$Search"));
	else
	  {
	    const char* szGreenToggled = CHANNELNAME(Channels.GetByNumber(currentChannel-1,-1));
	    const char* szYellowToggled = CHANNELNAME(Channels.GetByNumber(currentChannel+1,1));

	    SetHelp((EPGSearchConfig.redkeymode==1?(hasTimer?trVDR("Button$Timer"):trVDR("Button$Record")):tr("Button$Commands")), (EPGSearchConfig.toggleGreenYellow==0?trVDR("Button$Now"):szGreenToggled), (EPGSearchConfig.toggleGreenYellow==0?trVDR("Button$Next"):szYellowToggled), EPGSearchConfig.bluekeymode==1?trVDR("Button$Switch"):tr("Button$Search"));

	  }
	helpKeys = NewHelpKeys;
      }
}
Пример #4
0
void cMenuEpgTimers::SetHelpKeys(void)
{
  int NewHelpKeys = 0;
  cTimer *timer = CurrentTimer();
  bool isCurrItemSwitchTimer = false;
  if (timer) {
     if (timer->Event())
        NewHelpKeys = 2;
     else
        NewHelpKeys = 1;
  } else {
      cMenuSwitchTimerItem *item = dynamic_cast<cMenuSwitchTimerItem*>(Get(Current()));
      if (item) {
          NewHelpKeys = 1;
          isCurrItemSwitchTimer = true;
      }
  }

  if (NewHelpKeys != helpKeys) {
     helpKeys = NewHelpKeys;

    bool on = (timer && timer->HasFlags(tfActive)
               || isCurrItemSwitchTimer) ? true : false;
    static eKeys ikeys[] = { kInfo, kNone };

    /// Löschen | Neu | Ein/Aus | (frei) | Info
    if(on)
    {
        SetHelp(
            helpKeys > 0 ? tr("Button$Delete") : NULL,
            tr("Button$New"),
            (!isCurrItemSwitchTimer && helpKeys > 0) ? tr("Button$Off") : NULL,
            NULL //helpKeys == 2 ? tr("Button$Info") : NULL,
#if REELVDR && APIVERSNUM >= 10718
            , helpKeys == 2 ? ikeys : NULL
#endif
            );
    }
    else
    {
        SetHelp(
            helpKeys > 0 ? tr("Button$Delete") : NULL,
            tr("Button$New"),
            helpKeys > 0 ? tr("Button$On") : NULL,
            NULL //helpKeys == 2 ? tr("Button$Info") : NULL,
#if REELVDR && APIVERSNUM >= 10718
            , helpKeys == 2 ? ikeys : NULL
#endif
            );
    }
  }
}
Пример #5
0
void cMenuSetupSearchtimers::SetHelpKeys()
{
    const char* ItemText = Get(Current())->Text();
    if (!HasSubMenu())
    {
	if (strstr(ItemText, tr("Channel groups")) == ItemText)
	    SetHelp(NULL, NULL, tr("Button$Help"), tr("Button$Setup"));
	else if (strstr(ItemText, tr("Search templates")) == ItemText)
	    SetHelp(NULL, NULL, tr("Button$Help"), tr("Button$Setup"));
	else if (strstr(ItemText, tr("Blacklists")) == ItemText)
	    SetHelp(NULL, NULL, tr("Button$Help"), tr("Button$Setup"));
	else
	    SetHelp(NULL, NULL, tr("Button$Help"), NULL);
    }
}
Пример #6
0
void cMenuSetupTimers::SetHelpKeys()
{
    const char* ItemText = Get(Current())->Text();
    if (!HasSubMenu())
    {
	if (strstr(ItemText, tr("Default recording dir")) == ItemText)
	{
	    if (!InEditMode(ItemText, tr("Default recording dir"), data->defrecdir))
		SetHelp(NULL, NULL, tr("Button$Help"), tr("Button$Select"));
	}
	//if (strstr(ItemText, tr("Default timer check method")) == ItemText)
	//    SetHelp(NULL, NULL, tr("Button$Help"), tr("Button$Setup"));
	else
	    SetHelp(NULL, NULL, tr("Button$Help"), NULL);
    }
}
Пример #7
0
void cCMDMove::Build(char *dir)
{
  MYDEBUG("Verzeichnis: Move: Erstelle Verzeichnisliste: %s", dir);
  if(!dir)
    dir = CurrentDir();

  Clear();

  cDirHandling *DirHand = new cDirHandling(this, this);
  SetCurrent(Get(DirHand->Build(dir, true)));
  delete(DirHand);

  if(Count())
  {
    cMainMenuItem *item = (cMainMenuItem*)First();
    while(item)
    {
      if(!strcasecmp(item->FileName(), File))
      {
        Del(item->Index());
        break;
      }
      item = (cMainMenuItem*)Next(item);
    }
  }

  Display();
  SetHelp();
}
Пример #8
0
void cMenuDirSelect::Load()
{
    int current = Current();
    char* oldSelection = NULL; // save old selection for reselection
    if (current>-1)
	oldSelection = strdup(Get(current)->Text());
    Clear();

    CreateDirSet();
    std::set<string>::iterator it;
    for (it = directorySet.begin(); it != directorySet.end(); ++it)
	AddDistinct((*it).c_str());

    Sort();
    for(int i=0; i<Count(); i++)
    {
	const char* text = Get(i)->Text();
	if (oldSelection && strchr(text, '%') == NULL && strstr(text, oldSelection) == text) // skip entries with variables
	{
	    SetCurrent(Get(i));
	    break;
	}
    }
    if (oldSelection) free(oldSelection);

    if (yellow)
    {
	free(yellow);
	yellow = NULL;
    }
    msprintf(&yellow, "%s %d", tr("Button$Level"), (CurLevel==MaxLevel?1:CurLevel+1));
    SetHelp(NULL, NULL, MaxLevel==1?NULL:yellow, tr("Button$Select"));
    Display();
}
Пример #9
0
static void create() {
    verb::create();
    SetVerb("reload");
    SetRules("OBJ", "STR OBJ", "STR here", "here", "every STR");
    SetErrorMessage("reload what?");
    SetHelp("Syntax: reload [every] <OBJ>\n\n"
            "This command loads into memory the file of the object "
            "you specify, and replaces the current copy with a new "
            "copy. If you change something about a sword you are "
            "holding, for example, \"reload sword\" will update the "
            "changes and you will be holding a sword with the updates.\n"
            "  When used with the -r flag it recursively loads all the objects "
            "inherited by the target object. If any of those objects "
            "or the target object's file fail to load, the object "
            "is not updated.\n"
            "    If you \"reload every npc\", then any loaded object that "
            "inherits LIB_NPC gets reloaded. Other valid lib objects "
            "that can be used this way are: room, sentient, armor, item.\n"
            "Please note that if there are too many items to reload, "
            "the command will fail with \"Too long evaluation\" errors.\n"
            "    Books, due to their processing-intensive load time, "
            "are excluded from the \"every\" keyword.\n"
            "Please note that reloading a door also reloads the "
            "door's adjoining rooms.\n"
            "\nSee also: copy, create, delete, modify, initfix, add");
}
Пример #10
0
void cMenuBrowseFiles::SetHelpButtons(void)
{
  bool isDir  = !GetCurrent() || GetCurrent()->IsDir();
  bool isFile = !isDir;
  bool bDel   = isFile && xc.media_enable_delete;

  if (isDir && !strcmp("..", GetCurrent()->Name())) {
    help[0] = help[1] = help[2] = help[3] = NULL;
  } else if (m_Mode == ShowMusic) {
    help[0] = isDir  ? trVDR("Button$Play")   : NULL;
    help[1] =          tr   ("Button$Queue");
    help[2] = bDel   ? trVDR("Button$Delete") : NULL;
    help[3] = isFile ? trVDR("Button$Info")   : NULL;
  } else if (m_Mode == ShowImages) {
    help[0] = isDir  ? trVDR("Button$Play")   : NULL;
    help[1] =                                   NULL;
    help[2] = bDel   ? trVDR("Button$Delete") : NULL;
    help[3] = isFile ? trVDR("Button$Info")   : NULL;
  } else {
    bool isDvd     = GetCurrent() && (GetCurrent()->IsDvd() || GetCurrent()->IsBluRay());
    bool hasResume = GetCurrent() && GetCurrent()->HasResume();

    help[0] = isDir && isDvd  ? trVDR("Button$Open")   : NULL;
    help[1] = hasResume       ? trVDR("Button$Rewind") : NULL;
    help[2] = bDel            ? trVDR("Button$Delete") : NULL;
    help[3] = isFile          ? trVDR("Button$Info")   : NULL;
  }

  SetHelp(help[0], help[1], help[2], help[3]);
}
Пример #11
0
void RootDown12_set(void* ctx, int v)
{
    int val = PitchHandler_getNoteDiff(phctx);
    if(val-12 >=1 )val-=12;
    NoteDiff_set(NULL,val*1.0/126);
    SetHelp("Center Down Octave");
}
Пример #12
0
void RootUp_set(void* ctx, int v)
{
    int val = PitchHandler_getNoteDiff(phctx);
    if(val <=126 )val++;
    NoteDiff_set(NULL,val*1.0/126);
    SetHelp("Center Up Semitone");
}
Пример #13
0
void RootDown_set(void* ctx, int v)
{
    int val = PitchHandler_getNoteDiff(phctx);
    if(val >=1 )val--;
    NoteDiff_set(NULL,val*1.0/126);
    SetHelp("Center Down Semitone");
}
Пример #14
0
void Scale_set(void* ctx,int val)
{
    SetHelp("Scale Shape - Advanced");
    scaleControl->rect->isActive = val;
    scaleToggleButton->rect->isActive = val;
    scaleCommitButton->rect->isActive = val;
}
Пример #15
0
void Intonation_set(void* ctx, float val)
{
    SetHelp("Scale Shape set");
    int ival = (int)(7.99*val);
    ScaleControl_setCurrentScale(ival);
    intonationSlider->val = val;
}
Пример #16
0
void Page_jump_set(void* ctx,int val,int jump)
{
    SetHelp("http://rfieldin.appspot.com");
    //The two buttons are always in sync
    currentPage = (currentPage + PAGEMAX + jump) % PAGEMAX;
    Page_set(ctx, currentPage);
}
Пример #17
0
void NoteDiff_set(void* ctx, float val)
{
    SetHelp("Center Move");
    //PitchHandler_setNoteDiff(phctx, 24-1+24*val);
    PitchHandler_setNoteDiff(phctx, val*126);
    SurfaceDraw_drawBackground();
}
Пример #18
0
cSatipPluginSetup::cSatipPluginSetup()
: detachedModeM(SatipConfig.GetDetachedMode()),
  deviceCountM(0),
  operatingModeM(SatipConfig.GetOperatingMode()),
  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");
  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"));
}
Пример #19
0
void RootUp12_set(void* ctx, int v)
{
    int val = PitchHandler_getNoteDiff(phctx);
    if(val+12 <=126 )val+=12;
    NoteDiff_set(NULL,val*1.0/126);
    SetHelp("Center Up Octave");
}
Пример #20
0
void MidiBend_set(void* ctx, float val)
{
    SetHelp("MIDI Bend Size");
    int ival = (int)(val*22)+2;
    sprintf(stringRenderBuffer,"Bend: %d", ival);
    reRenderString(stringRenderBuffer, PIC_MIDIBENDTEXT);
    Fretless_setMidiHintChannelBendSemis(fctx, ival);
}
Пример #21
0
void Legato_set(void* ctx, int val)
{
    SetHelp("Attack First Note");
    char cval = "ny"[val];
    sprintf(stringRenderBuffer,"Legato:%c", cval);
    reRenderString(stringRenderBuffer, PIC_LEGATOTEXT);
    return SurfaceTouchHandling_setLegato(val);
}
Пример #22
0
void MidiBase_set(void* ctx, float val)
{
    SetHelp("Low MIDI Channel");
    int ival = (int)(val*15.99);
    sprintf(stringRenderBuffer,"Channel: %d",ival+1);
    reRenderString(stringRenderBuffer, PIC_MIDIBASETEXT);
    Fretless_setMidiHintChannelBase(fctx, ival);
}
Пример #23
0
static void create() {
    verb::create();
    SetVerb("empty");
    SetRules("OBJ");
    SetErrorMessage("Empty what?");
    SetHelp("Syntax: empty <vessel>\n\n"
            "Removes the fluid from a vessel.");
}
Пример #24
0
static void create() {
    verb::create();
    SetVerb("pour");
    SetRules("from OBJ into OBJ","from OBJ in OBJ", "OBJ in OBJ","OBJ into OBJ","OBJ on OBJ","OBJ onto OBJ","OBJ out","out OBJ");
    SetErrorMessage("Pour what into what?");
    SetHelp("Syntax: pour <substance> into <vessel>\n\n"
      "Allows you to pour into a vessel designed for containing a substance.");
}
Пример #25
0
void MidiSpan_set(void* ctx, float val)
{
    SetHelp("High MIDI Channel");
    int ival = (int)(val*15)+1;
    sprintf(stringRenderBuffer,"Span: %d",ival);
    reRenderString(stringRenderBuffer, PIC_MIDISPANTEXT);
    Fretless_setMidiHintChannelSpan(fctx, ival);
}
Пример #26
0
static void create() {
    verb::create();
    SetVerb("sink");
    SetRules("", "down");
    SetErrorMessage("Sink down?");
    SetHelp("Syntax: <sink down>\n"
      "Allows you to stop swimming, or otherwise attempt to sink in your current medium.\n"
      "See also: sit, lie, stand, swim, fly");
}
Пример #27
0
static void create(){
    verb::create();
    SetVerb("teach");
    SetRules("","STR to LIV","LIV to STR");
    SetErrorMessage("Syntax: teach <ability> to <person>");
    SetHelp("Syntax: teach <ability> to <person>\n\n"
            "This command allows you to teach another person "
            "an ability, spell, or skill.\nSee also: learn");
}
Пример #28
0
cMenuInfoCard::cMenuInfoCard(int Port)
:cMenuText(tr("Smartcard"),0,fontFix)
{
  port=Port;
  smartcards.CardInfo(port,infoStr,sizeof(infoStr));
  SetText(infoStr);
  SetHelp(tr("Reset card"));
  Display();
}
Пример #29
0
static void create() {
    verb::create();
    SetVerb("dest");
    SetRules("OBS","STR");
    SetErrorMessage("dest what?");
    SetHelp("Syntax: <dest OBJ>\n\n"
      "Destroy an object.\n"
      "\nSee also: zap");
}
Пример #30
0
void cReplayList::UpdateHelp() {
	switch (Mode) {
		case eMEdit:
			SetHelp(tr("Mode"),tr("(Add)"),
					tr("Delete"),tr("Move"));
			break;
		case eMNormal:
			SetHelp(tr("Mode"),tr("Skip Forward"),
					tr("Skip Back"),tr("Stop"));
			break;
		case eMOptions:
			SetHelp(tr("Mode"),tr("Options"),NULL,tr("Save"));
			break;
                default:
                        break;
	};
        lastMode=Mode;
};