Ticket #10161: lazystrings_v9.patch

File lazystrings_v9.patch, 4.2 KB (added by Jim Stichnoth, 14 years ago)

Simpler still.

  • mythtv/programs/mythfrontend/playbackbox.cpp

    diff --git a/mythtv/programs/mythfrontend/playbackbox.cpp b/mythtv/programs/mythfrontend/playbackbox.cpp
    index 2e65654..296e021 100644
    a b void PlaybackBox::UpdateUIListItem(MythUIButtonListItem *item, 
    824824
    825825    SetItemIcons(item, pginfo);
    826826
     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
    827868    QString rating = QString::number(pginfo->GetStars(10));
    828869
    829870    item->DisplayState(rating, "ratingstate");
    void PlaybackBox::updateRecList(MythUIButtonListItem *sel_item) 
    13161357
    13171358    ProgramList &progList = *pmit;
    13181359
     1360#if 0
    13191361    QMap<AudioProps, QString> audioFlags;
    13201362    audioFlags[AUD_DOLBY] = "dolby";
    13211363    audioFlags[AUD_SURROUND] = "surround";
    void PlaybackBox::updateRecList(MythUIButtonListItem *sel_item) 
    13331375    subtitleFlags[SUB_ONSCREEN] = "onscreensub";
    13341376    subtitleFlags[SUB_NORMAL] = "subtitles";
    13351377    subtitleFlags[SUB_HARDHEAR] = "cc";
     1378#endif
    13361379
    13371380    ProgramList::iterator it = progList.begin();
    13381381    for (; it != progList.end(); ++it)
    void PlaybackBox::updateRecList(MythUIButtonListItem *sel_item) 
    13441387        MythUIButtonListItem *item =
    13451388            new PlaybackBoxListItem(this, m_recordingList, *it);
    13461389
     1390#if 0
    13471391        QString state = extract_main_state(**it, m_player);
    13481392
    13491393        item->SetFontState(state);
    void PlaybackBox::updateRecList(MythUIButtonListItem *sel_item) 
    13851429        }
    13861430
    13871431        item->DisplayState((*it)->GetCategoryType(), "categorytype");
     1432#endif
    13881433    }
    13891434
    13901435    if (m_noRecordingsText)
  • mythtv/programs/mythfrontend/playbackboxlistitem.cpp

    diff --git a/mythtv/programs/mythfrontend/playbackboxlistitem.cpp b/mythtv/programs/mythfrontend/playbackboxlistitem.cpp
    index 79772ab..f0c0663 100644
    a b PlaybackBoxListItem::PlaybackBoxListItem( 
    99    pbbox(parent), needs_update(true)
    1010{
    1111}
    12 /*
     12
    1313void PlaybackBoxListItem::SetToRealButton(
    1414    MythUIStateType *button, bool selected)
    1515{
    void PlaybackBoxListItem::SetToRealButton( 
    2020    }
    2121    MythUIButtonListItem::SetToRealButton(button, selected);
    2222}
    23 */
  • mythtv/programs/mythfrontend/playbackboxlistitem.h

    diff --git a/mythtv/programs/mythfrontend/playbackboxlistitem.h b/mythtv/programs/mythfrontend/playbackboxlistitem.h
    index 954161f..f5d21a9 100644
    a b class PlaybackBoxListItem : public MythUIButtonListItem 
    1414  public:
    1515    PlaybackBoxListItem(PlaybackBox *parent, MythUIButtonList *lbtype, ProgramInfo *pi);
    1616
    17 //    virtual void SetToRealButton(MythUIStateType *button, bool selected);
     17    virtual void SetToRealButton(MythUIStateType *button, bool selected);
    1818
    1919  private:
    2020    PlaybackBox *pbbox;