Ticket #6813: 033-showwatched.1.patch

File 033-showwatched.1.patch, 3.6 KB (added by anonymous, 10 years ago)
  • mythtv/programs/mythfrontend/playbackbox.cpp

    diff -p -r -u -N -X /tmp/diff.exclude -x release.21111.0803bare -x release.21111.0803bareb release.21111.0803bare/mythtv/programs/mythfrontend/playbackbox.cpp release.21111.0803bareb/mythtv/programs/mythfrontend/playbackbox.cpp
    PlaybackBox::PlaybackBox(BoxType ltype,  
    324324        drawTransPixmap = new QPixmap();
    325325
    326326    episodeSort = gContext->GetSetting("PlayBoxEpisodeSort", "Date");
     327    showWatched = gContext->GetNumSetting("ShowWatched", 1);
    327328
    328329    bool displayCat  = gContext->GetNumSetting("DisplayRecGroupIsCategory", 0);
    329330    int  initialFilt = gContext->GetNumSetting("QueryInitialFilter", 0);
    void PlaybackBox::updateSortOrder(QPaint 
    810811    LayerSet *container = theme->GetSet("sortorder_info");
    811812    if (container)
    812813    {
     814        UITextType *type1 = (UITextType *)container->GetType("showwatched");
     815        if (type1)
     816        {
     817            QString newtag = "(4) ";
     818            if (showWatched)
     819               newtag += "Hide Watched";
     820            else
     821               newtag += "Show Watched";
     822            type1->SetText(tr(newtag));
     823        }
     824
    813825        UITextType *type = (UITextType *)container->GetType("sortorder");
    814826        if (type)
    815827        {
    bool PlaybackBox::FillList(bool useCache 
    19141926            tmpsubtitle.remove(QRegExp("^(The |A |An )"));
    19151927            p->sortTitle = tmptitle + " - " + tmpsubtitle;
    19161928
    1917             if ((((p->recgroup == recGroup) ||
     1929            if ((showWatched || (! (p->programflags & FL_WATCHED))) &&
     1930               ( (((p->recgroup == recGroup) ||
    19181931                  ((recGroup == "All Programs") &&
    19191932                   (p->recgroup != "Deleted") &&
    19201933                   (p->recgroup != "LiveTV" || LiveTVInAllPrograms))) &&
    bool PlaybackBox::FillList(bool useCache 
    19221935                ((recGroupType[recGroup] == "category") &&
    19231936                 ((p->category == recGroup ) ||
    19241937                  ((p->category == "") && (recGroup == tr("Unknown")))) &&
    1925                  ( !recGroupPwCache.contains(p->recgroup))))
     1938                 ( !recGroupPwCache.contains(p->recgroup)))))
    19261939            {
    19271940                if (viewMask != VIEW_NONE)
    19281941                    progLists[""].prepend(p);
    void PlaybackBox::keyPressEvent(QKeyEven 
    43704383            paintSkipUpdate = false;
    43714384            update(drawTotalBounds);
    43724385        }
     4386        else if (action == "4")
     4387        {
     4388            showWatched = ! showWatched;
     4389            gContext->SaveSetting("ShowWatched", (int)showWatched);
     4390            connected = FillList(true);
     4391            paintSkipUpdate = false;
     4392            update(drawTotalBounds);
     4393        }
     4394
    43734395        else if (action == "MENU")
    43744396            showMenu();
    43754397        else if (action == "NEXTFAV")
  • mythtv/programs/mythfrontend/playbackbox.h

    diff -p -r -u -N -X /tmp/diff.exclude -x release.21111.0803bare -x release.21111.0803bareb release.21111.0803bare/mythtv/programs/mythfrontend/playbackbox.h release.21111.0803bareb/mythtv/programs/mythfrontend/playbackbox.h
    class PlaybackBox : public MythDialog 
    350350    QString             formatTime;
    351351
    352352    QString             episodeSort;
     353    bool                showWatched;
     354   
    353355    /// titleView controls showing titles in group list
    354356    bool                titleView;
    355357    /// useCategories controls showing categories in group list