Ticket #6318: recGroup-ui-v2.patch
File recGroup-ui-v2.patch, 3.6 KB (added by , 15 years ago) |
---|
-
programs/mythfrontend/playbackbox.cpp
old new bool PlaybackBox::Create() 408 408 if (!LoadWindowFromXML("recordings-ui.xml", "watchrecordings", this)) 409 409 return false; 410 410 411 m_recgroupList = dynamic_cast<MythUIButtonList *> (GetChild("recgroups")); 411 412 m_groupList = dynamic_cast<MythUIButtonList *> (GetChild("groups")); 412 413 m_recordingList = dynamic_cast<MythUIButtonList *> (GetChild("recordings")); 413 414 … … bool PlaybackBox::Create() 436 437 m_groupList->SetLCDTitles(tr("Groups")); 437 438 m_recordingList->SetLCDTitles(tr("Recordings"), "titlesubtitle|shortdate|starttime"); 438 439 440 if (m_recgroupList) 441 m_recgroupList->SetCanTakeFocus(false); 442 439 443 if (!m_player && !m_recGroupPassword.isEmpty()) 440 444 displayRecGroup(m_recGroup); 441 445 else if (gContext->GetNumSetting("QueryInitialFilter", 0) == 1) … … void PlaybackBox::updateUsage() 817 821 } 818 822 } 819 823 824 /* 825 * \fn PlaybackBox::updateRecGroupList(void) 826 * \brief called when the list of recording groups may have changed 827 */ 828 void PlaybackBox::updateRecGroupList(void) 829 { 830 if (m_recGroupIdx < 0 || !m_recgroupList) 831 return; 832 833 m_recgroupList->Reset(); 834 835 QStringList::iterator it; 836 int idx; 837 MythUIButtonListItem *item = NULL; 838 QString name; 839 QString state; 840 841 for (it = m_recGroups.begin(), idx = 0; 842 it != m_recGroups.end(); ++it, ++idx) 843 { 844 name = (*it).simplified(); 845 if (name == "All Programs") 846 name = "All"; 847 848 item = new MythUIButtonListItem(m_recgroupList, "", 849 qVariantFromValue(name.toLower())); 850 851 if (idx == m_recGroupIdx) 852 m_recgroupList->SetItemCurrent(item); 853 854 item->SetText(name); 855 } 856 } 857 820 858 void PlaybackBox::updateGroupList() 821 859 { 822 860 m_groupList->Reset(); … … bool PlaybackBox::FillList(bool useCache 1030 1068 m_progLists.clear(); 1031 1069 m_recordingList->Reset(); 1032 1070 m_groupList->Reset(); 1071 if (m_recgroupList) 1072 m_recgroupList->Reset(); 1033 1073 // Clear autoDelete for the "all" list since it will share the 1034 1074 // objects with the title lists. 1035 1075 m_progLists[""] = ProgramList(false); … … bool PlaybackBox::FillList(bool useCache 1490 1530 } 1491 1531 } 1492 1532 1533 updateRecGroupList(); 1493 1534 updateGroupList(); 1494 1535 updateUsage(); 1495 1536 … … bool PlaybackBox::keyPressEvent(QKeyEven 3321 3362 deleteSelected(m_recordingList->GetItemCurrent()); 3322 3363 else if (action == "PLAYBACK") 3323 3364 playSelected(m_recordingList->GetItemCurrent()); 3324 else if (action == " INFO")3365 else if (action == "MENU2") 3325 3366 showActionsSelected(); 3326 3367 else if (action == "DETAILS") 3327 3368 details(); -
programs/mythfrontend/playbackbox.h
old new class PlaybackBox : public MythScreenTyp 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(); … … class PlaybackBox : public MythScreenTyp 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