Ticket #3952: linkage_frontend_menu.2.diff
File linkage_frontend_menu.2.diff, 6.8 KB (added by , 17 years ago) |
---|
-
libs/libmythtv/tv_play.cpp
383 383 REG_KEY("TV Playback", "PLAY", "Play", "Ctrl+P"); 384 384 REG_KEY("TV Playback", "JUMPPREV", "Jump to previously played recording", ""); 385 385 REG_KEY("TV Playback", "JUMPREC", "Display menu of recorded programs to jump to", ""); 386 REG_KEY("TV Playback", "LINKMENU", "Display linked channels", "F1"); 386 387 REG_KEY("TV Playback", "SIGNALMON", "Monitor Signal Quality", "F7"); 387 388 REG_KEY("TV Playback", "JUMPTODVDROOTMENU", "Jump to the DVD Root Menu", ""); 388 389 REG_KEY("TV Playback", "EXITSHOWNOPROMPTS","Exit Show without any prompts", ""); … … 540 541 // RingBuffers 541 542 prbuffer(NULL), piprbuffer(NULL), activerbuffer(NULL), 542 543 // OSD info 543 dialogname(""), treeMenu(NULL), udpnotify(NULL), osdlock(true), 544 dialogname(""), treeMenu(NULL), linkMenu(NULL), 545 udpnotify(NULL), osdlock(true), 544 546 // LCD Info 545 547 lcdTitle(""), lcdSubtitle(""), lcdCallsign(""), 546 548 // Window info (GUI is optional, transcoding, preview img, etc) … … 734 736 if (treeMenu) 735 737 delete treeMenu; 736 738 739 if (linkMenu) 740 delete linkMenu; 741 737 742 if (playbackinfo) 738 743 delete playbackinfo; 739 744 … … 3106 3111 else 3107 3112 ChangeChannel(CHANNEL_DIRECTION_DOWN); 3108 3113 } 3114 else if (action == "LINKMENU") 3115 ShowOSDLinkMenu(); 3109 3116 else if (action == "TOGGLEEDIT") 3110 3117 StartChannelEditMode(); 3111 3118 else … … 5107 5114 5108 5115 // Collect channel info 5109 5116 pbinfoLock.lock(); 5110 uint chanid = playbackinfo->chanid.toUInt(); 5117 bool using_channum_for_startchannel = gContext->GetNumSetting("EPGUseChanNum",false); 5118 uint chanid = (using_channum_for_startchannel) ? 0 : playbackinfo->chanid.toUInt(); 5111 5119 QString channum = playbackinfo->chanstr; 5112 5120 pbinfoLock.unlock(); 5113 5121 … … 6628 6636 else if (RunPlaybackBoxPtr) 6629 6637 EditSchedule(kPlaybackBox); 6630 6638 } 6639 else if (action.left(8) == "JUMPLINK") 6640 { 6641 ChangeChannel(action.section(" ",1,1).toInt(),""); 6642 } 6631 6643 else if (StateIsLiveTV(GetState())) 6632 6644 { 6633 6645 if (action == "TOGGLEPIPMODE") … … 6719 6731 } 6720 6732 } 6721 6733 6734 void TV::ShowOSDLinkMenu(void) 6735 { 6736 if (linkMenu) 6737 delete linkMenu; 6738 6739 linkMenu = new OSDGenericTree(NULL, "linkMenu"); 6740 6741 if (GetOSD() && FillLinkMenu(linkMenu)) 6742 { 6743 ClearOSD(); 6744 6745 OSDListTreeType *tree = GetOSD()->ShowTreeMenu("linkmenu", linkMenu); 6746 if (tree) 6747 { 6748 connect(tree, SIGNAL(itemSelected(OSDListTreeType *,OSDGenericTree *)), 6749 this, SLOT(TreeMenuSelected(OSDListTreeType *, OSDGenericTree *))); 6750 6751 connect(tree, SIGNAL(itemEntered(OSDListTreeType *, OSDGenericTree *)), 6752 this, SLOT(TreeMenuEntered(OSDListTreeType *, OSDGenericTree *))); 6753 } 6754 } 6755 } 6756 6722 6757 void TV::BuildOSDTreeMenu(void) 6723 6758 { 6724 6759 if (treeMenu) … … 7840 7875 } 7841 7876 } 7842 7877 7878 bool TV::FillLinkMenu(OSDGenericTree *linkMenu) 7879 { 7880 uint chanid = 0; 7881 7882 chanid = playbackinfo->chanid.toUInt(); 7883 MSqlQuery query(MSqlQuery::InitCon()); 7884 query.prepare("SELECT linkage2.chanid,linkage2.subevent,program.title " 7885 "FROM linkage AS linkage1,linkage AS linkage2,program " 7886 "WHERE linkage1.chanid=:CHANID " 7887 "AND linkage1.portal_chanid=linkage2.portal_chanid " 7888 "AND linkage2.chanid = program.chanid " 7889 "AND program.starttime<now() " 7890 "AND program.endtime>now() " 7891 "ORDER BY linkage2.linknr"); 7892 7893 query.bindValue(":CHANID", chanid); 7894 7895 if (!query.exec() || !query.isActive()) 7896 { 7897 MythContext::DBError("GetLinkage", query); 7898 return false; 7899 } 7900 7901 if (query.size() == 0) 7902 return false; 7903 7904 while (query.next()) { 7905 new OSDGenericTree( 7906 linkMenu, QString::fromUtf8(query.value(1).toString()+":"+query.value(2).toString()), QString("JUMPLINK %1").arg(query.value(0).toString())); 7907 } 7908 7909 return true; 7910 } 7911 7843 7912 /* vim: set expandtab tabstop=4 shiftwidth=4: */ -
libs/libmythtv/tv_play.h
360 360 void BuildOSDTreeMenu(void); 361 361 void ShowOSDTreeMenu(void); 362 362 363 void ShowOSDLinkMenu(void); 364 bool FillLinkMenu(OSDGenericTree *linkMenu); 365 363 366 void UpdateLCD(void); 364 367 void ShowLCDChannelInfo(void); 365 368 void ShowLCDDVDInfo(void); … … 575 578 // OSD info 576 579 QString dialogname; ///< Name of current OSD dialog 577 580 OSDGenericTree *treeMenu; ///< OSD menu, 'm' using default keybindings 581 OSDGenericTree *linkMenu; ///< OSD link menu, 'F1' using default keybindings 578 582 MythTimer dialogboxTimer; ///< How long a dialog box is on the screen 579 583 580 584 /// UDPNotify instance which shows messages sent -
themes/defaultosd/osd.xml
345 345 </textarea> 346 346 </container> 347 347 348 <container name="linkmenu"> 349 <listtreemenu name="menu"> 350 <area>20,250,620,300</area> 351 <listsize>0,0,600,200</listsize> 352 <leveloffset>10</leveloffset> 353 <gradient type="unselected" start="#505050" end="#000000" alpha="150"> 354 </gradient> 355 <gradient type="selected" start="#52CA38" end="#349838" alpha="255"> 356 </gradient> 357 <fcnfont name="infofont" function="active"></fcnfont> 358 <fcnfont name="infofontgray" function="inactive"></fcnfont> 359 </listtreemenu> 360 </container> 361 348 362 </mythosdtheme> -
themes/blueosd/osd.xml
349 349 <fcnfont name="infofontgray" function="inactive"></fcnfont> 350 350 </listtreemenu> 351 351 </container> 352 353 <container name="linkmenu"> 354 <listtreemenu name="menu"> 355 <area>20,250,620,300</area> 356 <listsize>0,0,600,200</listsize> 357 <leveloffset>10</leveloffset> 358 <gradient type="unselected" start="#505050" end="#000000" alpha="100"> 359 </gradient> 360 <gradient type="selected" start="#52CA38" end="#349838" alpha="255"> 361 </gradient> 362 <fcnfont name="infofont" function="active"></fcnfont> 363 <fcnfont name="infofontgray" function="inactive"></fcnfont> 364 </listtreemenu> 365 </container> 352 366 353 354 367 </mythosdtheme>