Ticket #3952: linkage_frontend_menu.diff
File linkage_frontend_menu.diff, 6.4 KB (added by , 17 years ago) |
---|
-
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> -
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 -
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 … … 6628 6635 else if (RunPlaybackBoxPtr) 6629 6636 EditSchedule(kPlaybackBox); 6630 6637 } 6638 else if (action.left(8) == "JUMPLINK") 6639 { 6640 ChangeChannel(action.section(" ",1,1).toInt(),""); 6641 } 6631 6642 else if (StateIsLiveTV(GetState())) 6632 6643 { 6633 6644 if (action == "TOGGLEPIPMODE") … … 6719 6730 } 6720 6731 } 6721 6732 6733 void TV::ShowOSDLinkMenu(void) 6734 { 6735 if (linkMenu) 6736 delete linkMenu; 6737 6738 linkMenu = new OSDGenericTree(NULL, "linkMenu"); 6739 6740 if (GetOSD() && FillLinkMenu(linkMenu)) 6741 { 6742 ClearOSD(); 6743 6744 OSDListTreeType *tree = GetOSD()->ShowTreeMenu("linkmenu", linkMenu); 6745 if (tree) 6746 { 6747 connect(tree, SIGNAL(itemSelected(OSDListTreeType *,OSDGenericTree *)), 6748 this, SLOT(TreeMenuSelected(OSDListTreeType *, OSDGenericTree *))); 6749 6750 connect(tree, SIGNAL(itemEntered(OSDListTreeType *, OSDGenericTree *)), 6751 this, SLOT(TreeMenuEntered(OSDListTreeType *, OSDGenericTree *))); 6752 } 6753 } 6754 } 6755 6722 6756 void TV::BuildOSDTreeMenu(void) 6723 6757 { 6724 6758 if (treeMenu) … … 7840 7874 } 7841 7875 } 7842 7876 7877 bool TV::FillLinkMenu(OSDGenericTree *linkMenu) 7878 { 7879 uint chanid = 0; 7880 QString selStr = "JUMPLINK_"; 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 program.starttime,linkage2.serviceid"); 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: */