@@ -824,6 +824,47 @@ void PlaybackBox::UpdateUIListItem(MythUIButtonListItem *item,
824
824
825
825
SetItemIcons (item, pginfo);
826
826
827
+ QMap<AudioProps, QString> audioFlags;
828
+ audioFlags[AUD_DOLBY] = " dolby" ;
829
+ audioFlags[AUD_SURROUND] = " surround" ;
830
+ audioFlags[AUD_STEREO] = " stereo" ;
831
+ audioFlags[AUD_MONO] = " mono" ;
832
+
833
+ QMap<VideoProps, QString> videoFlags;
834
+ videoFlags[VID_1080] = " hd1080" ;
835
+ videoFlags[VID_720] = " hd720" ;
836
+ videoFlags[VID_HDTV] = " hdtv" ;
837
+ videoFlags[VID_WIDESCREEN] = " widescreen" ;
838
+
839
+ QMap<SubtitleTypes, QString> subtitleFlags;
840
+ subtitleFlags[SUB_SIGNED] = " deafsigned" ;
841
+ subtitleFlags[SUB_ONSCREEN] = " onscreensub" ;
842
+ subtitleFlags[SUB_NORMAL] = " subtitles" ;
843
+ subtitleFlags[SUB_HARDHEAR] = " cc" ;
844
+
845
+ QMap<AudioProps, QString>::iterator ait;
846
+ for (ait = audioFlags.begin (); ait != audioFlags.end (); ++ait)
847
+ {
848
+ if (pginfo->GetAudioProperties () & ait.key ())
849
+ item->DisplayState (ait.value (), " audioprops" );
850
+ }
851
+
852
+ QMap<VideoProps, QString>::iterator vit;
853
+ for (vit = videoFlags.begin (); vit != videoFlags.end (); ++vit)
854
+ {
855
+ if (pginfo->GetVideoProperties () & vit.key ())
856
+ item->DisplayState (vit.value (), " videoprops" );
857
+ }
858
+
859
+ QMap<SubtitleTypes, QString>::iterator sit;
860
+ for (sit = subtitleFlags.begin (); sit != subtitleFlags.end (); ++sit)
861
+ {
862
+ if (pginfo->GetSubtitleType () & sit.key ())
863
+ item->DisplayState (sit.value (), " subtitletypes" );
864
+ }
865
+
866
+ item->DisplayState (pginfo->GetCategoryType (), " categorytype" );
867
+
827
868
QString rating = QString::number (pginfo->GetStars (10 ));
828
869
829
870
item->DisplayState (rating, " ratingstate" );
@@ -920,6 +961,7 @@ void PlaybackBox::ItemVisible(MythUIButtonListItem *item)
920
961
m_helper.GetPreviewImage (*sel_pginfo, false ));
921
962
}
922
963
}
964
+ UpdateUIListItem (item, item == sel_item, false );
923
965
}
924
966
925
967
@@ -1316,24 +1358,6 @@ void PlaybackBox::updateRecList(MythUIButtonListItem *sel_item)
1316
1358
1317
1359
ProgramList &progList = *pmit;
1318
1360
1319
- QMap<AudioProps, QString> audioFlags;
1320
- audioFlags[AUD_DOLBY] = " dolby" ;
1321
- audioFlags[AUD_SURROUND] = " surround" ;
1322
- audioFlags[AUD_STEREO] = " stereo" ;
1323
- audioFlags[AUD_MONO] = " mono" ;
1324
-
1325
- QMap<VideoProps, QString> videoFlags;
1326
- videoFlags[VID_1080] = " hd1080" ;
1327
- videoFlags[VID_720] = " hd720" ;
1328
- videoFlags[VID_HDTV] = " hdtv" ;
1329
- videoFlags[VID_WIDESCREEN] = " widescreen" ;
1330
-
1331
- QMap<SubtitleTypes, QString> subtitleFlags;
1332
- subtitleFlags[SUB_SIGNED] = " deafsigned" ;
1333
- subtitleFlags[SUB_ONSCREEN] = " onscreensub" ;
1334
- subtitleFlags[SUB_NORMAL] = " subtitles" ;
1335
- subtitleFlags[SUB_HARDHEAR] = " cc" ;
1336
-
1337
1361
ProgramList::iterator it = progList.begin ();
1338
1362
for (; it != progList.end (); ++it)
1339
1363
{
@@ -1343,48 +1367,8 @@ void PlaybackBox::updateRecList(MythUIButtonListItem *sel_item)
1343
1367
1344
1368
MythUIButtonListItem *item =
1345
1369
new PlaybackBoxListItem (this , m_recordingList, *it);
1346
-
1347
- QString state = extract_main_state (**it, m_player);
1348
-
1349
- item->SetFontState (state);
1350
-
1351
- InfoMap infoMap;
1352
- (*it)->ToMap (infoMap);
1353
- item->SetTextFromMap (infoMap);
1354
-
1355
- QString tempSubTitle = extract_subtitle (**it, groupname);
1356
-
1357
- if (groupname == (*it)->GetTitle ().toLower ())
1358
- item->SetText (tempSubTitle, " titlesubtitle" );
1359
-
1360
- item->DisplayState (state, " status" );
1361
-
1362
- item->DisplayState (QString::number ((*it)->GetStars (10 )), " ratingstate" );
1363
-
1364
- SetItemIcons (item, (*it));
1365
-
1366
- QMap<AudioProps, QString>::iterator ait;
1367
- for (ait = audioFlags.begin (); ait != audioFlags.end (); ++ait)
1368
- {
1369
- if ((*it)->GetAudioProperties () & ait.key ())
1370
- item->DisplayState (ait.value (), " audioprops" );
1371
- }
1372
-
1373
- QMap<VideoProps, QString>::iterator vit;
1374
- for (vit = videoFlags.begin (); vit != videoFlags.end (); ++vit)
1375
- {
1376
- if ((*it)->GetVideoProperties () & vit.key ())
1377
- item->DisplayState (vit.value (), " videoprops" );
1378
- }
1379
-
1380
- QMap<SubtitleTypes, QString>::iterator sit;
1381
- for (sit = subtitleFlags.begin (); sit != subtitleFlags.end (); ++sit)
1382
- {
1383
- if ((*it)->GetSubtitleType () & sit.key ())
1384
- item->DisplayState (sit.value (), " subtitletypes" );
1385
- }
1386
-
1387
- item->DisplayState ((*it)->GetCategoryType (), " categorytype" );
1370
+ // Defer initialization of the item's properties until it
1371
+ // first becomes visible.
1388
1372
}
1389
1373
1390
1374
if (m_noRecordingsText)
0 commit comments