示例#1
0
文件: menubase.c 项目: suborb/reelvdr
		eOSState starter::show_menu()
		{
			m_display = m_nextDisplay;
			m_nextDisplay = display::none;
			job& pending = manager::get_pending();

			switch (m_display)
			{
			case display::recordings:
				return AddSubMenu(new menu::recordings);

			case display::job:
                if(menu::recordings::startedFromRecordigs)
                {
                    return AddSubMenu(new menu::recordings);
                }
                else
                {
				    return AddSubMenu(new menu::job_editor);
                }

			case display::options:
				return AddSubMenu(new job_options_editor( pending ) );

			case display::status:
				return AddSubMenu(new menu::status);

			default:
				return osBack;
			}
		}
示例#2
0
eOSState cMenuSetupTimers::ProcessKey(eKeys Key)
{
    eOSState state = cMenuSetupSubMenu::ProcessKey(Key);

    const char* ItemText = Get(Current())->Text();
    int iOnDefRecDir = 0;
    int iOnDefTimerCheck = 0;
    if (!HasSubMenu())
    {
	if (strstr(ItemText, tr("Default recording dir")) == ItemText)
	    iOnDefRecDir = 1;
	else if (strstr(ItemText, tr("Default timer check method")) == ItemText)
	    iOnDefTimerCheck = 1;
    }
    SetHelpKeys();

    if (state == osUnknown) {
	switch (Key) {
	  case kBlue:
	      if (!HasSubMenu())
	      {
		  if (iOnDefRecDir == 1)
		      state = AddSubMenu(new cMenuDirSelect(data->defrecdir));
		  if (iOnDefTimerCheck == 1)
		      state = AddSubMenu(new cMenuDefTimerCheckMethod());
	      }
	      break;
	    case kOk:
		return osBack;
	    default: break;
	}
    }

    return state;
}
示例#3
0
eOSState cMenuSetupSc::ProcessKey(eKeys Key)
{
  eOSState state = cOsdMenu::ProcessKey(Key);
  switch(state) {
    case osUser4:
      if(Feature.SmartCard()) {
        cScInfoItem *ii=dynamic_cast<cScInfoItem *>(Get(Current()));
        if(ii) return(AddSubMenu(new cMenuInfoCard(ii->Ident())));
        }
      state=osContinue;
      break;

    case osUser7:
      state=osContinue;
      if(Interface->Confirm(tr("Really flush ECM cache?"))) {
        state=osEnd;
        }
      break;

    case osUser8:
      return AddSubMenu(new cMenuInfoSc);

    case osUser6:
      return AddSubMenu(new cMenuLogSys);

    case osUser5:
      return AddSubMenu(new cMenuSysOpts);

    case osUser9:
      state=osContinue;
      if(!cGlobal::Active(true)) {
        if(Interface->Confirm(tr("Really reload files?"))) {
          Store();
          cSoftCAM::Load(cfgdir);
          state=osEnd;
          }
        }
      else 
        Skins.Message(mtError,tr("Active! Can't reload files now"));
      break;

    case osContinue:
      if(NORMALKEY(Key)==kUp || NORMALKEY(Key)==kDown) {
        cOsdItem *item=Get(Current());
        if(item) item->ProcessKey(kNone);
        }
      break;

    case osUnknown:
      if(Key==kOk) { Store(); state=osBack; }
      break;

    default:
      break;
    }
  return state;
}
示例#4
0
eOSState cMenuFavouritesFunction::ProcessKey(eKeys Key)
{
    eOSState state = cOsdMenu::ProcessKey(Key);

    const char* text = Get(Current())?Get(Current())->Text():NULL;
    if (state == osUnknown) {
        switch(Key) {
        case kOk:
            state = osContinue;
            if (text) {
                printf("Got text : '%s'\n", text);

                if (strstr(text, tr("Delete channel"))) {
                    printf("Deleting channel\n");
                    if (Interface->Confirm(tr("Delete channel from favourites?"), 3)) {
                        if (DelFavChannel(channel)) {
                            Skins.Message(mtInfo, tr("Channel deleted"));
                            state = osRefreshPage;
                        } else
                            Skins.Message(mtError, tr("Deletion of channel failed"));
                    } else
                        Skins.Message(mtInfo, tr("Delete cancelled"));

                } else if (strstr(text, tr("Delete folder"))) {
                    if (Interface->Confirm(tr("Delete folder and all its channels?"), 3)) {
                        // delete all channels in folder including folder
                        if (DelFavFolder(channel)) {
                            Skins.Message(mtInfo, tr("Folder and its contents deleted"));
                            state = osRefreshPage;
                        } else
                            Skins.Message(mtError, tr("Deletion of folder failed"));
                    } else
                        Skins.Message(mtInfo, tr("Delete cancelled"));

                } else if (strstr(text, tr("Rename folder")))
                    return AddSubMenu(new cMenuRenameFavFolder(channel));
                else if (strstr(text, tr("Move folder")))
                    return AddSubMenu(new cMenuMoveFavFolder(channel));
                else if (strstr(text, tr("Move channel")))
                    return AddSubMenu(new cMenuMoveChannelInFavBouquet(channel));
                else if (strstr(text, tr("CI-slot assignment for folder")))
                    return AddSubMenu(new cOsdMenuCISlot(channel->Name(), true));
                else if (strstr(text, tr("CI-slot assignment for channel")))
                    return AddSubMenu(new cOsdMenuCISlot(channel->Name(), true, channel));
            }

            break;

        default:
            break;
        } // switch
    } //if

    return state;
}
eOSState cAlbumList::ProcessKey(eKeys Key) {
        eOSState state = cOsdMenu::ProcessKey(Key);
        if (state != osUnknown ) 
                return state;

        cPlayList *List;
        cPlayListItem *Item;
        switch (Key) {
                case kOk:
                        MENUDEB("Current %d GetItem %p\n",Current(),playList->GetItem(Current()));
                        Item=playList->GetItem(Current());
                        List=dynamic_cast<cPlayList*>(Item);
                        MENUDEB("Item %p\n",Item);

                        if (List) {
                                cAlbumList *Menu=new cAlbumList(List);
                                return AddSubMenu(Menu);
                        }  else {
                                // skip to current track
                                playList->SetCurrIdx(
                                                playList->GetIndexByItem(Item));
                                state = PLAY_CURR_FILE;
                        };
                        break;
                case kBack:
                        state= osBack;
                        break;
                case kBlue:
                        state= osEnd;
                        break;
                case kRed:
                        return AddSubMenu(new cPlOptionsMenu(playList));
                        break;
                case kYellow:
                        MENUDEB("Del current %d: %s\n",
                                        Current(),
                                        playList->GetItem(Current())->GetName() );
                        playList->RemoveItem(
                                        playList->GetItem(Current()));
                        MENUDEB("Remove finished\n");
                        Del(Current());
                        Display();
                        state=osContinue;
                        break;

                default:    
                        break;
        }

        return state;
}
示例#6
0
eOSState cMenuSetupSearchtimers::ProcessKey(eKeys Key)
{
    int iTemp_useSearchTimers = data->useSearchTimers;
    int iTemp_checkEPGHours = data->checkEPGHours;

    int iOnSearchTemplates = 0;
    int iOnBlacklists = 0;
    int iOnChannelGroups = 0;

    eOSState state = cMenuSetupSubMenu::ProcessKey(Key);

    if (iTemp_useSearchTimers != data->useSearchTimers ||
	iTemp_checkEPGHours != data->checkEPGHours)
    {
	Set();
	Display();
    }

    const char* ItemText = Get(Current())->Text();
    if (!HasSubMenu())
    {
	if (strstr(ItemText, tr("Search templates")) == ItemText)
	    iOnSearchTemplates = 1;
	else if (strstr(ItemText, tr("Blacklists")) == ItemText)
	    iOnBlacklists = 1;
	if (strstr(ItemText, tr("Channel groups")) == ItemText)
	    iOnChannelGroups = 1;
    }
    SetHelpKeys();

    if (state == osUnknown) {
	switch (Key) {
	    case kBlue:
		if (!HasSubMenu())
		{
		    if (iOnSearchTemplates == 1)
			state = AddSubMenu(new cMenuEPGSearchTemplate(NULL, NULL, false));
		    else if (iOnBlacklists == 1)
			state = AddSubMenu(new cMenuBlacklists);
		    else if (iOnChannelGroups == 1)
			state = AddSubMenu(new cMenuChannelGroups);
		}
		break;
	    case kOk:
		return osBack;
	    default: break;
	}
    }
    return state;
}
示例#7
0
// --- cMenuSearchMain ---------------------------------------------------------
cMenuSearchMain::cMenuSearchMain(void)
:cOsdMenu("", GetTab(1), GetTab(2), GetTab(3), GetTab(4), GetTab(5))
{
#if VDRVERSNUM >= 10728
  SetMenuCategory(mcSchedule);
#endif
  helpKeys = -1;
  otherChannel = 0;
  toggleKeys = 0;
  shiftTime = 0;
  InWhatsOnMenu = false;
  InFavoritesMenu = false;
  cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
  schedules = cSchedules::Schedules(schedulesLock);
  if (channel) {
    cMenuWhatsOnSearch::SetCurrentChannel(channel->Number());
    if (EPGSearchConfig.StartMenu == 0 || forceMenu != 0)
      PrepareSchedule(channel);
    SetHelpKeys();
    cMenuWhatsOnSearch::currentShowMode = showNow;
    //    timeb tnow;
    //ftime(&tnow);
    //isyslog("duration epgs sched:  %d", tnow.millitm - gl_time.millitm + ((tnow.millitm - gl_time.millitm<0)?1000:0));

  }
  if ((EPGSearchConfig.StartMenu == 1 || forceMenu == 1) && forceMenu != 2)
    {
      InWhatsOnMenu = true;
      AddSubMenu(new cMenuWhatsOnSearch(schedules, cDevice::CurrentChannel()));
    }
  if (forceMenu == 3)
      ShowSummary();
}
示例#8
0
eOSState cMenuLogSys::ProcessKey(eKeys Key)
{
  eOSState state=cOsdMenu::ProcessKey(Key);
  switch(state) {
    case osUser9:
      if(Interface->Confirm(tr("Really disable ALL modules?"))) {
        for(int m=1; m<LMOD_MAX; m++)
          cLogging::SetModuleOption(LCLASS(m,LMOD_ENABLE),false);
        Store(); state=osBack;
        }
      break;

    case osUser8:
      if(Interface->Confirm(tr("Really reset ALL modules to default?"))) {
        for(int m=1; m<LMOD_MAX; m++)
          cLogging::SetModuleDefault(LCLASS(m,0));
        Store(); state=osBack;
        }
      break;

    case osUnknown:
      if(Key==kOk) {
        cLogModItem *item=dynamic_cast<cLogModItem *>(Get(Current()));
        if(item) state=AddSubMenu(new cMenuLogMod(item->Module()));
        else { Store(); state=osBack; }
        }
      break;

    default:
      break;
    }
  return state;
}
eOSState cMenuAnnounceList::ProcessKey(eKeys Key)
{
    eOSState state = cMenuSearchResultsForList::ProcessKey(Key);
    if (state == osUnknown)
    {
        switch (Key) {
        case kBlue:
        {
            cMenuSearchResultsItem *item = (cMenuSearchResultsItem *)Get(Current());
            if (item)
            {
                if (!HasSubMenu())
                    return AddSubMenu(new cMenuAnnounceDetails(item->event, item->search));
                else if (!showsDetails)
                    return Switch();
                else
                    return osContinue;
            }
        }
        break;
        default:
            break;
        }
    }
    return state;
}
示例#10
0
eOSState cSatipPluginSetup::ShowInfo(void)
{
  debug1("%s", __PRETTY_FUNCTION__);
  if (HasSubMenu() || Count() == 0)
     return osContinue;

  return AddSubMenu(new cSatipMenuInfo());
}
示例#11
0
eOSState cMenuBrowseFiles::Info(void)
{
  if (GetCurrent() && !GetCurrent()->IsDir()) {
    cString filename = cString::sprintf("%s/%s", *m_CurrentDir, GetCurrent()->Name());
    return AddSubMenu(new cMetainfoMenu(filename));
  }
  return osContinue;
}
示例#12
0
BOOL CMyMenuBar::RestoreOriginalstate () {
  if (!CMFCMenuBar::RestoreOriginalState()) {
    return FALSE;
  }

  AddSubMenu ();
  return TRUE;
}
示例#13
0
eOSState cMenuEpgTimers::Edit(void)
{
  if (HasSubMenu() || Count() == 0)
     return osContinue;

  cMenuSwitchTimerItem *item = dynamic_cast<cMenuSwitchTimerItem*> (Get(Current()));
  if (item && item->switchTimer)
      return AddSubMenu(new cMenuMyEditTimer(item->switchTimer, false));

  cTimer *timer = CurrentTimer();

  if (!timer) return osContinue; // nothing to edit here

  isyslog("editing timer %s", *timer->ToDescr());
  return AddSubMenu(new cMenuMyEditTimer(timer, false, NULL));

}
示例#14
0
eOSState cMenuEpgTimers::Info(void)
{
  if (HasSubMenu() || Count() == 0)
     return osContinue;
  cTimer *ti = CurrentTimer();
  if (ti && ti->Event())
     return AddSubMenu(new cMenuEvent(ti->Event()));
  return osContinue;
}
示例#15
0
eOSState cSkindesignerSkinSetup::ProcessKey(eKeys Key) {
    eOSState state = ProcessInstallationStatus();
    if (state == osEnd)
        return osEnd;
    state = cOsdMenu::ProcessKey(Key);
    if (state == osUnknown) {
        switch (Key) {
            case kOk: {
                cOsdItem *current = Get(Current());
                cSkinSetupSubMenu *subMenuItem = dynamic_cast<cSkinSetupSubMenu*>(current);
                if (subMenuItem) {
                    state = AddSubMenu(new cSkindesignerSkinSetup(skin, subMenuItem->GetName(), subMenuItem->GetDisplayText()));
                    break;
                } else {
                    return osBack;
                }
            }
            case kRed: {
                string versionNeeded = "";
                bool versionOk = config.CheckVersion(skin, versionNeeded);
                if (!versionOk) {
                    cString error = cString::sprintf("%s %s %s %s %s", 
                                                     tr("Skin Designer"),
                                                     tr("version"), 
                                                     versionNeeded.c_str(),
                                                     tr("or higher"),
                                                     tr("needed"));
                    Skins.Message(mtError, *error);
                    break;
                }
                bool gitAvailable = StartUpdate(skin);
                if (gitAvailable) {
                    Skins.Message(mtStatus, *cString::sprintf("%s ...", tr("Updating Skin from Git")));
                } else {
                    Skins.Message(mtStatus, tr("No Git Repsoitory available"));
                }
                break;
            }
            // KEY YELLOW
            case kYellow: {
                if (config.SkinActive(skin)) {
                    Skins.Message(mtError, tr("Skin is running and can't be deleted"));
                } else if (Interface->Confirm(*cString::sprintf("%s?", tr("Really delete skin")))) {
                    config.DeleteSkin(skin);
                    Skins.Message(mtStatus, tr("Skin deleted"));
                    cCondWait::SleepMs(1000);
                    return osEnd;
                }
                state = osContinue;
                break;
            }
            default:
                break;
        }
    }
    return state;
}
示例#16
0
eOSState cMenuSwitchTimers::Summary(void)
{
    if (HasSubMenu() || Count() == 0)
	return osContinue;
    cSwitchTimer *curSwitchTimer = CurrentSwitchTimer();
    if (curSwitchTimer && !isempty(curSwitchTimer->event->Description()))
	return AddSubMenu(new cMenuText(tr("Summary"), curSwitchTimer->event->Description()));
    return osContinue;
}
 HMENU AddPopupMenu(const RF_Draw::TrayIcon& Settings)
 {
     HMENU result = 0;
     if(Settings.Menu.Items.Count() > 0)
     {
         result = AddSubMenu(Settings.Menu);
     }
     return result;
 }
示例#18
0
eOSState cMenuEpgTimers::New(void)
{

  if (HasSubMenu())
     return osContinue;

  return AddSubMenu(new cMenuMyEditTimer(new cTimer, true, NULL));
  //return AddSubMenu(new cMenuEditTimer(new cTimer, true));
}
示例#19
0
eOSState cMenuBouquetsList::NewBouquet()
{
    cChannel *channel;
    if (HasSubMenu())
        return osContinue;
    channel = GetBouquet(Current());
    newChannel_ = channel;
    return AddSubMenu(new cMenuEditBouquet(channel, true, newChannel_));
}
示例#20
0
HMENU SWS_TrackListWnd::OnContextMenu(int x, int y, bool* wantDefaultItems)
{
	HMENU contextMenu = CreatePopupMenu();

	AddToMenu(contextMenu, __LOCALIZE("Snapshot current track visibility","tracklistmenu"), SWSGetCommandID(NewVisSnapshot));
	Snapshot* s;
	int i = 0;
	while((s = GetSnapshotPtr(i++)) != NULL)
	{
		if (s->m_iMask == VIS_MASK)
		{
			char cMenu[50];
			int iCmd = SWSGetCommandID(GetSnapshot, s->m_iSlot);
			if (!iCmd)
				iCmd = LOADSNAP_MSG + s->m_iSlot;
			_snprintf(cMenu, 50, __LOCALIZE_VERFMT("Recall snapshot %s","tracklistmenu"), s->m_cName);
			AddToMenu(contextMenu, cMenu, iCmd);
		}
	}

	AddToMenu(contextMenu, __LOCALIZE("Show all tracks","tracklistmenu"), SWSGetCommandID(ShowAll));
	AddToMenu(contextMenu, __LOCALIZE("Show SWS Snapshots","tracklistmenu"), SWSGetCommandID(OpenSnapshotsDialog));

	SWS_ListItem* item = m_pLists.Get(0)->GetHitItem(x, y, NULL);
	if (item)
	{
		m_trLastTouched = (MediaTrack*)item;
		AddToMenu(contextMenu, SWS_SEPARATOR, 0);
		AddToMenu(contextMenu, __LOCALIZE("Rename","tracklistmenu"), RENAME_MSG);
		AddToMenu(contextMenu, SWS_SEPARATOR, 0);
		AddToMenu(contextMenu, __LOCALIZE("Show only in MCP","tracklistmenu"), SWSGetCommandID(ShowInMCPOnly));
		AddToMenu(contextMenu, __LOCALIZE("Show only in TCP","tracklistmenu"), SWSGetCommandID(ShowInTCPOnly));
		AddToMenu(contextMenu, __LOCALIZE("Show in both MCP and TCP","tracklistmenu"), SWSGetCommandID(ShowInMCPandTCP));
		AddToMenu(contextMenu, __LOCALIZE("Hide in both MCP and TCP","tracklistmenu"), SWSGetCommandID(HideTracks));
		AddToMenu(contextMenu, SWS_SEPARATOR, 0);
		AddToMenu(contextMenu, __LOCALIZE("Invert selection","tracklistmenu"), SWSGetCommandID(TogTrackSel));
		AddToMenu(contextMenu, __LOCALIZE("Hide unselected","tracklistmenu"), SWSGetCommandID(HideUnSel));

		HMENU fxSubMenu;
		if(AddFXSubMenu(&fxSubMenu, m_trLastTouched))
		{
			AddToMenu(contextMenu, SWS_SEPARATOR, 0);
			AddSubMenu(contextMenu, fxSubMenu, __LOCALIZE("FX","tracklistmenu"));
		}

		// Check current state
		switch(GetTrackVis(m_trLastTouched))
		{
			case 0: CheckMenuItem(contextMenu, SWSGetCommandID(HideTracks),      MF_BYCOMMAND | MF_CHECKED); break;
			case 1: CheckMenuItem(contextMenu, SWSGetCommandID(ShowInMCPOnly),   MF_BYCOMMAND | MF_CHECKED); break;
			case 2: CheckMenuItem(contextMenu, SWSGetCommandID(ShowInTCPOnly),   MF_BYCOMMAND | MF_CHECKED); break;
			case 3: CheckMenuItem(contextMenu, SWSGetCommandID(ShowInMCPandTCP), MF_BYCOMMAND | MF_CHECKED); break;
		}
	}

	return contextMenu;
}
示例#21
0
eOSState cPlugOsdMenu::ProcessKey(eKeys key)
{
  eOSState state = cOsdMenu::ProcessKey(key);
  if (state == osUnknown) {
     switch (key) {
       case kOk: {
         int element = Current();
         if (element % 2)
            state = AddSubMenu(new cPlugDetailOsdMenu(element));
         else
            state = AddSubMenu(new cPlugOsdMenu(level + 1, element + 1, true));
         break;
         }
       default:
         break;
       }
     }
  return state;
}
示例#22
0
eOSState cMenuSearchMain::ShowSummary()
{
   if (Count())
   {
      cMenuMyScheduleItem *mi = (cMenuMyScheduleItem *)Get(Current());
      if (mi && mi->event)
         return AddSubMenu(new cMenuEventSearch(mi->event, eventObjects, SurfModeTime));
   }
   return osContinue;
}
示例#23
0
eOSState myMenuSetup::ProcessKey(eKeys Key) {
  eOSState state = cMenuSetupPage::ProcessKey(Key);

  switch (state) {
    case osUser1:
      return AddSubMenu(new myMenuSetupColumns(&reclistcolumn[0]));
    default: ;
  }
  return state;
}
示例#24
0
eOSState cMenuAddChannelToFavourites::ProcessKey(eKeys Key)
{
    bool hadSubMenu = HasSubMenu();

    eOSState state = cOsdMenu::ProcessKey(Key);

    /* close sub menus if channel list is requested */
    if (state == osShowChannelList) {
        CloseSubMenu();
        return state;
    }

    /* redrawn menu, if submenu was closed (create new folder menu adds new folder entries)*/
    if (hadSubMenu && !HasSubMenu()) {
        Set(true); // param true selects the last entry ie. newly created folder
    }

    if (state == osUnknown) {
        switch(Key) {
        case kOk:
        {
            const char* text = Get(Current())->Text();
            if (text && strstr(text, tr("Create new folder")))
                return AddSubMenu(new cMenuCreateFavouritesFolder);

            cOsdChannelItem *currItem = dynamic_cast<cOsdChannelItem*> (Get(Current()));
            if (currItem && currItem->Channel()) {
                bool success = AddChannelsToFavourites(channelsToAdd, currItem->Channel());

                if (success)  // added
                    Skins.Message(mtInfo, tr("Channel added to favourites") , 1);
                else
                    Skins.Message(mtError, tr("Channel not added to favourites") , 1);

                cMenuChannelList::ClearChannelSelectMode();
                return standAlone?osBack:osShowChannelList;
            } // if fav bouquet available
        }
        break;

        case kRed:
        case kBlue:
        case kGreen:
        case kYellow:
            if (standAlone) // ignore colour keys when in standalone mode
                state = osContinue;
            break;

        default:
            break;
        } // switch
    } // if state == osUnknown

    return state;
}
示例#25
0
eOSState cMenuEPGSearchSetup::ProcessKey(eKeys Key)
{
    bool hadSubMenu = HasSubMenu();
    eOSState state = cMenuSetupPage::ProcessKey(Key);

    const char* ItemText = Get(Current())->Text();
    int iOnGeneral = 0;
    int iOnEPGMenus = 0;
    int iOnUserdefTimes = 0;
    int iOnTimers = 0;
    int iOnSearchtimers = 0;
    int iOnTimerConflicts = 0;
    int iOnEmailNotification = 0;

    if (!HasSubMenu())
    {
	if (strstr(ItemText, tr("General")) == ItemText)
	    iOnGeneral = 1;
	else if (strstr(ItemText, tr("EPG menus")) == ItemText)
	    iOnEPGMenus = 1;
	else if (strstr(ItemText, tr("User-defined EPG times")) == ItemText)
	    iOnUserdefTimes = 1;
	else if (strstr(ItemText, tr("Timer programming")) == ItemText)
	    iOnTimers = 1;
	else if (strstr(ItemText, tr("Search and search timers")) == ItemText)
	    iOnSearchtimers = 1;
	else if (strstr(ItemText, tr("Timer conflict checking")) == ItemText)
	    iOnTimerConflicts = 1;
	else if (strstr(ItemText, tr("Email notification")) == ItemText)
	    iOnEmailNotification = 1;
    }

    if (!HasSubMenu() && (state == osUnknown || Key == kOk))
    {
	if ((Key == kOk && !hadSubMenu) || Key == kBlue)
	{
	    if (iOnGeneral == 1)
		state = AddSubMenu(new cMenuSetupGeneral(&data));
	    else if (iOnEPGMenus == 1)
		state = AddSubMenu(new cMenuSetupEPGMenus(&data));
	    else if (iOnUserdefTimes == 1)
		state = AddSubMenu(new cMenuSetupUserdefTimes(&data));
	    else if (iOnTimers == 1)
		state = AddSubMenu(new cMenuSetupTimers(&data));
	    else if (iOnSearchtimers == 1)
		state = AddSubMenu(new cMenuSetupSearchtimers(&data));
	    else if (iOnTimerConflicts == 1)
		state = AddSubMenu(new cMenuSetupTimerConflicts(&data));
	    else if (iOnEmailNotification == 1)
		state = AddSubMenu(new cMenuSetupMailNotification(&data));
	}
    }
    if (!HasSubMenu() && hadSubMenu)
	Store();

    return state;
}
示例#26
0
eOSState cMenuSetupMailNotification::TestMailAccount()
{
   if (strlen(data->MailAddress) == 0 || strlen(data->MailServer) == 0)
      return osContinue;
   cMailNotifier M;
   if (M.TestMailAccount(data->MailAddressTo, data->MailAddress, data->MailServer, data->MailAuthUser, data->MailAuthPass))
      return AddSubMenu(new cMenuText("", M.scriptReply.c_str(), fontSml));
   else
      Skins.Message(mtError, tr("Mail account check failed!"));
   return osContinue;
}
示例#27
0
eOSState cSatipPluginSetup::DeviceInfo(void)
{
  debug1("%s", __PRETTY_FUNCTION__);
  if (HasSubMenu() || Count() == 0)
     return osContinue;

  cSatipServerItem *item = reinterpret_cast<cSatipServerItem *>(Get(Current()));
  if (item && !!cSatipDiscover::GetInstance()->GetServer(item->Server()))
     return AddSubMenu(new cSatipServerInfo(item->Server()));

  return osContinue;
}
示例#28
0
eOSState cPvrMenuSetup::ProcessKey(eKeys Key) {
  eOSState state = osUnknown;
  if (Key == kOk && HasSubMenu()) {
    Store();
  }
  if (Key == kBack && HasSubMenu()) {
    newPvrSetup = cachedPvrSetup;
  }
  if (!HasSubMenu()) {
    if (Key == kOk) {
      const char* ItemText = Get(Current())->Text();
      if (strstr(ItemText, tr(tr("Setup.pvrinput$General Parameters"))) == ItemText) {
        state = AddSubMenu(new cPvrMenuGeneral(&newPvrSetup));
      } else if (strstr(ItemText, tr(tr("Setup.pvrinput$Video Parameters"))) == ItemText) {
        state = AddSubMenu(new cPvrMenuVideo(&newPvrSetup));
      } else if (strstr(ItemText, tr(tr("Setup.pvrinput$Audio Parameters"))) == ItemText) {
        state = AddSubMenu(new cPvrMenuAudio(&newPvrSetup));
      } else if (strstr(ItemText, tr(tr("Setup.pvrinput$MPEG Filter Parameters"))) == ItemText) {
        state = AddSubMenu(new cPvrMenuMpegFilter(&newPvrSetup));
      } else if (strstr(ItemText, tr(tr("Setup.pvrinput$Expert Parameters"))) == ItemText) {
        state = AddSubMenu(new cPvrMenuExperts(&newPvrSetup));
      } else if (strstr(ItemText, tr(tr("Setup.pvrinput$HDPVR Parameters"))) == ItemText) {
        state = AddSubMenu(new cPvrMenuHdPvr(&newPvrSetup));
      } else {
        state = cOsdMenu::ProcessKey(Key);
      }
    } else {
      state = cOsdMenu::ProcessKey(Key);
    }
  } else {
    state = cOsdMenu::ProcessKey(Key);
  }
  return state;
}
示例#29
0
cMenuXinelib::cMenuXinelib(cXinelibDevice *Dev)
{
  m_Dev = Dev;
  compression = xc.audio_compression;
  autocrop = xc.autocrop;
  overscan = xc.overscan;

  hotkey_state = hkInit;

  novideo = m_Dev->GetPlayMode() == pmAudioOnlyBlack ? 1 : 0;

  Add(SeparatorItem(tr("Media")));
  if (xc.media_menu_items & MEDIA_MENU_FILES)
    Add(SubMenuItem(tr("Play file"),        osUser1));
  if (xc.media_menu_items & MEDIA_MENU_MUSIC)
    Add(SubMenuItem(tr("Play music"),       osUser2));
  if (xc.media_menu_items & MEDIA_MENU_IMAGES)
    Add(SubMenuItem(tr("View images"),      osUser3));
  if (xc.media_menu_items & MEDIA_MENU_DVD)
    Add(SubMenuItem(tr("Play DVD disc"),    osUser4));
  if (xc.media_menu_items & MEDIA_MENU_BLURAY)
    Add(SubMenuItem(tr("Play BluRay disc"), osUser5));
  if (xc.media_menu_items & MEDIA_MENU_CD)
    Add(SubMenuItem(tr("Play audio CD"),    osUser6));

  if (xc.media_menu_items & MEDIA_MENU_VIDEO_SETUP) {
    Add(SeparatorItem(tr("Video settings")));
    Add(ctrl_novideo = new cMenuEditBoolItem(tr("Play only audio"),
                                             &novideo));
    Add(ctrl_autocrop = new cMenuEditBoolItem(tr("Crop letterbox 4:3 to 16:9"),
                                              &autocrop));
    Add(ctrl_overscan = new cMenuEditTypedIntItem(tr("Overscan (crop image borders)"), "%",
                                                  &overscan, 0, 10,
                                                  tr("Off")));
  }

  if (xc.media_menu_items & MEDIA_MENU_AUDIO_SETUP) {
    Add(SeparatorItem(tr("Audio settings")));
    Add(audio_ctrl_compress = new cMenuEditTypedIntItem(tr("Audio Compression"), "%",
                                                        &compression, 100, 500, NULL, tr("Off")));
    Add(SubMenuItem(tr("Audio equalizer"), osUser7));
  }

  switch (xc.main_menu_mode) {
    case ShowFiles:
    case ShowMusic:
    case ShowImages: AddSubMenu(new cMenuBrowseFiles(m_Dev, xc.main_menu_mode)); break;
    default: break;
  }

  xc.main_menu_mode = ShowMenu;
}
示例#30
0
wxMenuItem* wxMenuBase::DoAppend(wxMenuItem *item)
{
    wxCHECK_MSG( item, NULL, wxT("invalid item in wxMenu::Append()") );

    m_items.Append(item);
    item->SetMenu((wxMenu*)this);
    if ( item->IsSubMenu() )
    {
        AddSubMenu(item->GetSubMenu());
    }

    return item;
}