~ubuntu-branches/ubuntu/natty/vdr-plugin-epgsearch/natty

« back to all changes in this revision

Viewing changes to menu_main.c

  • Committer: Bazaar Package Importer
  • Author(s): Tobias Grimm, Thomas Schmidt
  • Date: 2010-04-04 14:02:02 UTC
  • mfrom: (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100404140202-8wmh9mgrwg2im0yb
Tags: 0.9.25~beta16-3
[ Thomas Schmidt ]
Standards-Version: 3.8.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
Copyright (C) 2004-2008 Christian Wieninger
 
2
Copyright (C) 2004-2010 Christian Wieninger
3
3
 
4
4
This program is free software; you can redistribute it and/or
5
5
modify it under the terms of the GNU General Public License
43
43
int exitToMainMenu = 0;
44
44
extern int gl_InfoConflict;
45
45
 
 
46
int cMenuSearchMain::forceMenu = 0; // 1 = now, 2 = schedule, 3 = summary
 
47
 
46
48
// --- cMenuSearchMain ---------------------------------------------------------
47
49
cMenuSearchMain::cMenuSearchMain(void)
48
50
:cOsdMenu("", GetTab(1), GetTab(2), GetTab(3), GetTab(4), GetTab(5))
57
59
  schedules = cSchedules::Schedules(schedulesLock);
58
60
  if (channel) {
59
61
    cMenuWhatsOnSearch::SetCurrentChannel(channel->Number());
60
 
    if (EPGSearchConfig.StartMenu == 0)
 
62
    if (EPGSearchConfig.StartMenu == 0 || forceMenu != 0)
61
63
      PrepareSchedule(channel);
62
64
    SetHelpKeys();
63
65
    cMenuWhatsOnSearch::currentShowMode = showNow;
66
68
    //isyslog("duration epgs sched:  %d", tnow.millitm - gl_time.millitm + ((tnow.millitm - gl_time.millitm<0)?1000:0));
67
69
 
68
70
  }
69
 
  if (EPGSearchConfig.StartMenu == 1)
 
71
  if ((EPGSearchConfig.StartMenu == 1 || forceMenu == 1) && forceMenu != 2)
70
72
    {
71
73
      InWhatsOnMenu = true;
72
74
      AddSubMenu(new cMenuWhatsOnSearch(schedules, cDevice::CurrentChannel()));
73
75
    }
74
 
}
 
76
  if (forceMenu == 3)
 
77
      ShowSummary();
 
78
}
 
79
 
 
80
#ifdef USE_GRAPHTFT
 
81
void cMenuSearchMain::Display(void)
 
82
{
 
83
   cOsdMenu::Display();
 
84
   
 
85
   if (Count() > 0) 
 
86
   {
 
87
      int i = 0;
 
88
 
 
89
      for (cOsdItem *item = First(); item; item = Next(item)) 
 
90
         cStatus::MsgOsdEventItem(!item->Selectable() ? 0 : 
 
91
                                  ((cMenuMyScheduleItem*)item)->event, 
 
92
                                  item->Text(), i++, Count());
 
93
   }
 
94
}
 
95
#endif /* GRAPHTFT */
75
96
 
76
97
cMenuSearchMain::~cMenuSearchMain()
77
98
{
78
99
    cMenuWhatsOnSearch::ScheduleChannel(); // makes sure any posted data is cleared
 
100
    forceMenu = 0;
79
101
}
80
102
 
81
103
int cMenuSearchMain::GetTab(int Tab)