Ticket #6318: recGroup-ui-v3.patch
| File recGroup-ui-v3.patch, 3.0 KB (added by , 16 years ago) |
|---|
-
programs/mythfrontend/playbackbox.cpp
436 436 if (!LoadWindowFromXML("recordings-ui.xml", "watchrecordings", this)) 437 437 return false; 438 438 439 m_recgroupList = dynamic_cast<MythUIButtonList *> (GetChild("recgroups")); 439 440 m_groupList = dynamic_cast<MythUIButtonList *> (GetChild("groups")); 440 441 m_recordingList = dynamic_cast<MythUIButtonList *> (GetChild("recordings")); 441 442 … … 452 453 return false; 453 454 } 454 455 456 if (m_recgroupList) 457 m_recgroupList->SetCanTakeFocus(false); 458 455 459 connect(m_groupList, SIGNAL(itemSelected(MythUIButtonListItem*)), 456 460 SLOT(updateRecList(MythUIButtonListItem*))); 457 461 connect(m_groupList, SIGNAL(itemClicked(MythUIButtonListItem*)), … … 899 903 } 900 904 } 901 905 906 /* 907 * \fn PlaybackBox::updateRecGroupList(void) 908 * \brief called when the list of recording groups may have changed 909 */ 910 void PlaybackBox::updateRecGroupList(void) 911 { 912 if (m_recGroupIdx < 0 || !m_recgroupList || m_recGroups.size() < 2) 913 return; 914 915 m_recgroupList->Reset(); 916 917 QStringList::iterator it; 918 int idx; 919 MythUIButtonListItem *item = NULL; 920 QString name; 921 QString state; 922 923 for (it = m_recGroups.begin(), idx = 0; 924 it != m_recGroups.end(); ++it, ++idx) 925 { 926 name = (*it).simplified(); 927 if (name == "All Programs") 928 name = "All"; 929 930 item = new MythUIButtonListItem(m_recgroupList, "", 931 qVariantFromValue(name.toLower())); 932 933 if (idx == m_recGroupIdx) 934 m_recgroupList->SetItemCurrent(item); 935 936 item->SetText(name); 937 } 938 } 939 902 940 void PlaybackBox::updateGroupList() 903 941 { 904 942 m_groupList->Reset(); … … 1167 1205 m_progLists.clear(); 1168 1206 m_recordingList->Reset(); 1169 1207 m_groupList->Reset(); 1208 if (m_recgroupList) 1209 m_recgroupList->Reset(); 1170 1210 // Clear autoDelete for the "all" list since it will share the 1171 1211 // objects with the title lists. 1172 1212 m_progLists[""] = ProgramList(false); … … 1629 1669 } 1630 1670 } 1631 1671 1672 updateRecGroupList(); 1632 1673 updateGroupList(); 1633 1674 updateUsage(); 1634 1675 -
programs/mythfrontend/playbackbox.h
314 314 QString findArtworkFile(QString &seriesID, QString &titleIn, 315 315 QString imagetype, QString host); 316 316 317 void updateRecGroupList(); 317 318 void updateGroupList(); 318 319 void updateIcons(const ProgramInfo *pginfo = NULL); 319 320 void updateUsage(); … … 327 328 328 329 void ShowMenu(void); 329 330 331 MythUIButtonList *m_recgroupList; 330 332 MythUIButtonList *m_groupList; 331 333 MythUIButtonList *m_recordingList; 332 334
