Ticket #6318: recGroup-ui-v2a.patch
File recGroup-ui-v2a.patch, 3.0 KB (added by , 15 years ago) |
---|
-
programs/mythfrontend/playbackbox.cpp
406 406 if (!LoadWindowFromXML("recordings-ui.xml", "watchrecordings", this)) 407 407 return false; 408 408 409 m_recgroupList = dynamic_cast<MythUIButtonList *> (GetChild("recgroups")); 409 410 m_groupList = dynamic_cast<MythUIButtonList *> (GetChild("groups")); 410 411 m_recordingList = dynamic_cast<MythUIButtonList *> (GetChild("recordings")); 411 412 … … 434 435 m_groupList->SetLCDTitles(tr("Groups")); 435 436 m_recordingList->SetLCDTitles(tr("Recordings"), "titlesubtitle|shortdate|starttime"); 436 437 438 if (m_recgroupList) 439 m_recgroupList->SetCanTakeFocus(false); 440 437 441 if (!m_player && !m_recGroupPassword.isEmpty()) 438 442 displayRecGroup(m_recGroup); 439 443 else if (gContext->GetNumSetting("QueryInitialFilter", 0) == 1) … … 815 819 } 816 820 } 817 821 822 /* 823 * \fn PlaybackBox::updateRecGroupList(void) 824 * \brief called when the list of recording groups may have changed 825 */ 826 void PlaybackBox::updateRecGroupList(void) 827 { 828 if (m_recGroupIdx < 0 || !m_recgroupList) 829 return; 830 831 m_recgroupList->Reset(); 832 833 QStringList::iterator it; 834 int idx; 835 MythUIButtonListItem *item = NULL; 836 QString name; 837 QString state; 838 839 for (it = m_recGroups.begin(), idx = 0; 840 it != m_recGroups.end(); ++it, ++idx) 841 { 842 name = (*it).simplified(); 843 if (name == "All Programs") 844 name = "All"; 845 846 item = new MythUIButtonListItem(m_recgroupList, "", 847 qVariantFromValue(name.toLower())); 848 849 if (idx == m_recGroupIdx) 850 m_recgroupList->SetItemCurrent(item); 851 852 item->SetText(name); 853 } 854 } 855 818 856 void PlaybackBox::updateGroupList() 819 857 { 820 858 m_groupList->Reset(); … … 1028 1066 m_progLists.clear(); 1029 1067 m_recordingList->Reset(); 1030 1068 m_groupList->Reset(); 1069 if (m_recgroupList) 1070 m_recgroupList->Reset(); 1031 1071 // Clear autoDelete for the "all" list since it will share the 1032 1072 // objects with the title lists. 1033 1073 m_progLists[""] = ProgramList(false); … … 1488 1528 } 1489 1529 } 1490 1530 1531 updateRecGroupList(); 1491 1532 updateGroupList(); 1492 1533 updateUsage(); 1493 1534 -
programs/mythfrontend/playbackbox.h
307 307 QString testImageFiles(QString &testDirectory, 308 308 QString &seriesID, QString &titleIn); 309 309 310 void updateRecGroupList(); 310 311 void updateGroupList(); 311 312 void updateIcons(const ProgramInfo *pginfo = NULL); 312 313 void updateUsage(); … … 318 319 319 320 void HandlePreviewEvent(const ProgramInfo &evinfo); 320 321 322 MythUIButtonList *m_recgroupList; 321 323 MythUIButtonList *m_groupList; 322 324 MythUIButtonList *m_recordingList; 323 325