Ticket #3096: EPGSortReverse.patch
File EPGSortReverse.patch, 2.8 KB (added by , 17 years ago) |
---|
-
libs/libmythtv/guidegrid.h
154 154 155 155 bool selectState; 156 156 bool showFavorites; 157 bool sortReverse; 157 158 QString channelFormat; 158 159 159 160 int desiredDisplayChans; -
libs/libmythtv/guidegrid.cpp
137 137 } 138 138 139 139 scrolltype = gContext->GetNumSetting("EPGScrollType", 1); 140 sortReverse = gContext->GetNumSetting("EPGSortReverse", 0); 140 141 141 142 selectChangesChannel = gContext->GetNumSetting("SelectChangesChannel", 0); 142 143 selectRecThreshold = gContext->GetNumSetting("SelChangeRecThreshold", 16); … … 582 583 bool startingset = false; 583 584 for (uint i = 0; i < channels.size(); i++) 584 585 { 586 uint chan=i; 587 if (sortReverse) 588 { 589 chan=channels.size()-i-1; 590 } 585 591 ChannelInfo val; 586 val.chanstr = channels[ i].channum;587 val.chanid = channels[ i].chanid;588 val.callsign = channels[ i].callsign;589 val.favid = channels[ i].favorite;590 val.channame = channels[ i].name;591 val.iconpath = channels[ i].icon;592 val.chanstr = channels[chan].channum; 593 val.chanid = channels[chan].chanid; 594 val.callsign = channels[chan].callsign; 595 val.favid = channels[chan].favorite; 596 val.channame = channels[chan].name; 597 val.iconpath = channels[chan].icon; 592 598 val.iconload = false; 593 599 594 600 // set starting channel index if it hasn't been set -
programs/mythfrontend/globalsettings.cpp
2115 2115 return gc; 2116 2116 } 2117 2117 2118 static HostCheckBox *EPGSortReverse() 2119 { 2120 HostCheckBox *gc = new HostCheckBox("EPGSortReverse"); 2121 gc->setLabel(QObject::tr("Reverse Channel Order")); 2122 gc->setValue(false); 2123 gc->setHelpText(QObject::tr("If enabled, the program guide will be sorted " 2124 "in reverse order with lower numbered channels towards " 2125 "the bottom.")); 2126 return gc; 2127 } 2128 2118 2129 static HostComboBox *EPGFillType() 2119 2130 { 2120 2131 HostComboBox *gc = new HostComboBox("EPGFillType"); … … 3679 3690 epg->addChild(EPGShowCategoryColors()); 3680 3691 epg->addChild(EPGShowCategoryText()); 3681 3692 epg->addChild(EPGScrollType()); 3693 epg->addChild(EPGSortReverse()); 3682 3694 epg->addChild(EPGShowChannelIcon()); 3683 3695 epg->addChild(EPGShowFavorites()); 3684 3696 epg->addChild(WatchTVGuide());