diff -r -u -N -X diff.exclude -x myth.20018.0218a -x myth.20018.0218b myth.20018.0218a/mythtv/programs/mythfrontend/viewscheduled.cpp myth.20018.0218b/mythtv/programs/mythfrontend/viewscheduled.cpp
--- mythtv/programs/mythfrontend/viewscheduled.cpp	2009-02-20 15:32:00.000000000 -0600
+++ mythtv/programs/mythfrontend/viewscheduled.cpp	2009-02-20 23:40:57.000000000 -0600
@@ -50,6 +50,8 @@
     m_inFill = false;
     m_needFill = false;
 
+    m_curView = TIMESORT;
+
     m_curcard  = 0;
     m_maxcard  = 0;
     m_curinput = 0;
@@ -151,6 +153,25 @@
             setShowAll(true);
         else if (action == "2")
             setShowAll(false);
+        else if (action == "4")
+        {
+            if (m_curView == TIMESORT)
+                m_curView = TIMESORTR;
+            else
+                m_curView = TIMESORT;
+
+            m_needFill = true;
+        }
+        else if (action == "5")
+        {
+            if (m_curView == TITLESORT)
+                m_curView = TITLESORTR;
+            else
+                m_curView = TITLESORT;
+
+            m_needFill = true;
+        }
+
         else if (action == "PREVVIEW" || action == "NEXTVIEW")
             setShowAll(!m_showAll);
         else if (action == "VIEWCARD")
@@ -278,6 +299,7 @@
             m_currentGroup = m_defaultGroup;
 
         plist = m_recgroupList[m_currentGroup];
+        SortList(plist); // FIXME
 
         int listPos = plist.count() - 1;
         int i;
@@ -313,6 +335,86 @@
         FillList();
 }
 
+class pbTitleSortP
+{
+    public:
+        pbTitleSortP(bool reverseSort = false) {m_reverse = reverseSort;}
+
+        bool operator()(const ProgramInfo *a, const ProgramInfo *b)
+        {
+            if (a->sortTitle == b->sortTitle)
+            {
+                if (a->programid == b->programid)
+                    return (a->startts < b->startts);
+                else
+                    return (a->programid < b->programid);
+            }
+            else if (m_reverse)
+                return (a->sortTitle > b->sortTitle);
+            else
+                return (a->sortTitle < b->sortTitle);
+        }
+
+    private:
+        bool m_reverse;
+};
+
+class pbTimeSortP
+{
+    public:
+        pbTimeSortP(bool reverseSort = false) {m_reverse = reverseSort;}
+
+        bool operator()(const ProgramInfo *a, const ProgramInfo *b)
+        {
+            if (m_reverse)
+                return (a->startts > b->startts);
+            else
+                return (a->startts < b->startts);
+        }
+
+    private:
+        bool m_reverse;
+};
+
+void ViewScheduled::SortList(ProgramList& plist)
+{
+  // Sort according to to 4/5 rules
+
+    vector<ProgramInfo *> sortedList;
+
+    ProgramList::iterator pit = plist.begin();
+    while (pit != plist.end())
+    {
+        ProgramInfo *pginfo = *pit;
+        if (!pginfo)
+        {
+            ++pit;
+            continue;
+        }
+        QString title = pginfo->title;
+        QString subtitle = pginfo->subtitle;
+        title.remove(QRegExp("^(The |A |An )"));
+        subtitle.remove(QRegExp("^(The |A |An )"));
+        pginfo->sortTitle = title + subtitle;
+        sortedList.push_back(pginfo);
+        ++pit;
+    }
+
+    if (m_curView == TIMESORTR)
+        sort(sortedList.begin(), sortedList.end(), pbTimeSortP(true));
+    else if (m_curView == TIMESORT)
+        sort(sortedList.begin(), sortedList.end(), pbTimeSortP(false));
+    else if (m_curView == TITLESORTR)
+        sort(sortedList.begin(), sortedList.end(), pbTitleSortP(true));
+    else
+        sort(sortedList.begin(), sortedList.end(), pbTitleSortP(false));
+
+    plist.clear();
+    vector<ProgramInfo *>::iterator i = sortedList.begin();
+    for (; i != sortedList.end(); i++)
+        plist.append(*i);
+}
+
 void ViewScheduled::FillList()
 {
     m_schedulesList->Reset();
@@ -333,6 +435,8 @@
 
     plist = m_recgroupList[m_currentGroup];
 
+    SortList(plist);
+
     ProgramList::iterator pit = plist.begin();
     while (pit != plist.end())
     {
@@ -453,10 +557,23 @@
     MythUIText *filterText = dynamic_cast<MythUIText*>(GetChild("filter"));
     if (filterText)
     {
+        QString newtag;
+
+        if (m_curView == TIMESORT)
+            newtag += tr("Time");
+        else if (m_curView == TIMESORTR)
+            newtag += tr("Desc Time");
+        else if (m_curView == TITLESORT)
+            newtag += tr("Title");
+        else if (m_curView == TITLESORTR)
+            newtag += tr("Desc Title");
+
         if (m_showAll)
-            filterText->SetText(tr("All"));
+            newtag += tr(" All");
         else
-            filterText->SetText(tr("Important"));
+            newtag += tr(" Important");
+
+        filterText->SetText(newtag);
     }
 }
 
diff -r -u -N -X diff.exclude -x myth.20018.0218a -x myth.20018.0218b myth.20018.0218a/mythtv/programs/mythfrontend/viewscheduled.h myth.20018.0218b/mythtv/programs/mythfrontend/viewscheduled.h
--- mythtv/programs/mythfrontend/viewscheduled.h	2009-02-19 18:18:41.000000000 -0600
+++ mythtv/programs/mythfrontend/viewscheduled.h	2009-02-20 23:42:54.000000000 -0600
@@ -46,6 +46,13 @@
     void SwitchList(void);
 
   private:
+    enum SORTORDER {
+	TIMESORT   = 0,
+        TIMESORTR  = 1,
+        TITLESORT  = 2,
+        TITLESORTR = 3
+    };
+    void SortList(ProgramList&);
     void FillList(void);
     void LoadList(void);
     void setShowAll(bool all);
@@ -67,6 +74,7 @@
     MythUIButtonList *m_groupList;
 
     bool m_showAll;
+    enum SORTORDER m_curView;
 
     bool m_inEvent;
     bool m_inFill;
