[mythtv-users] Digital channel ordering

Ron Garrison ron.garrison at gmail.com
Fri Sep 7 03:49:10 UTC 2007


On 9/6/07, Phil Bridges <gravityhammer at gmail.com> wrote:
>
> On 9/6/07, Ron Garrison <ron.garrison at gmail.com> wrote:
>
> > I might mention that I also like my guide revresed from the normal
> display
> > (lower channels at the bottom of the screen) because its more logical
> for me
> > to hit channel up and have the cursor move up and the channel
> increments.
> > Its a very simple update if anyone is interested.
> >
>
> How did you do this?
>
>
I reversed the order in which the guide channels are displayed by

 Adding the line

 reverse(tmp.begin(), tmp.end());

to channelutil.cpp as seen below:



void ChannelUtil::SortChannels(DBChanList &list, const QString &order,
                               bool eliminate_duplicates)
{
    bool cs = order.lower() == "callsign";
    if (cs)
        stable_sort(list.begin(), list.end(), lt_callsign);
    else /* if (sortorder == "channum") */
        stable_sort(list.begin(), list.end(), lt_smart);

    if (eliminate_duplicates && !list.empty())
    {
        DBChanList tmp;
        tmp.push_back(list[0]);
        for (uint i = 1; i < list.size(); i++)
        {
            if ((cs && lt_callsign(tmp.back(), list[i])) ||
                (!cs && lt_smart(tmp.back(), list[i])))
            {
                tmp.push_back(list[i]);
            }
        }

        reverse(tmp.begin(), tmp.end());
        list = tmp;
    }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20070906/9dfa8042/attachment.htm 


More information about the mythtv-users mailing list