This patch draws the menu on the LCD screen while walking through the
recording selection screen. The patch handles the quoting slightly
different wrt. my previous patch. This patch leave the subtitle quotes
on the tv screen to ", but translates " to ' before handing them to the LCD.

Leo.
Index: playbackbox.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/programs/mythfrontend/playbackbox.cpp,v
retrieving revision 1.213
diff -u -r1.213 playbackbox.cpp
--- playbackbox.cpp     5 May 2005 02:51:15 -0000       1.213
+++ playbackbox.cpp     15 May 2005 19:39:22 -0000
@@ -35,6 +35,7 @@
 #include "scheduledrecording.h"
 #include "remoteutil.h"
 #include "jobqueue.h"
+#include "lcddevice.h"
 
 static int comp_programid(ProgramInfo *a, ProgramInfo *b)
 {
@@ -946,6 +947,12 @@
     pix.fill(this, pr.topLeft());
     QPainter tmp(&pix);
 
+    class LCD * lcddev = LCD::Get();
+    QString lcdTitle;
+    QPtrList<LCDMenuItem> lcdItems;
+    lcdItems.setAutoDelete(true);
+
+
     container = theme->GetSet("selector");
 
     ProgramInfo *tempInfo;
@@ -978,14 +985,41 @@
 
             for (int cnt = 0; cnt < ltype->GetItems(); cnt++)
             {
+                QString tstring;
                 if (titleList[h] == "")
-                    ltype->SetItemText(cnt, groupDisplayName);
+                    tstring =  groupDisplayName;
                 else
-                    ltype->SetItemText(cnt, titleList[h]);
+                    tstring = titleList[h];
+
+                ltype->SetItemText(cnt, tstring);
+                if (lcddev && inTitle) {
+                    lcdItems.append(new LCDMenuItem(0, NOTCHECKABLE, tstring));
+                }
+
                 h = ++h % titleList.count();
              }
         }
 
+        UITextType *typeText = (UITextType *)container->GetType("current");
+        if (typeText)
+        {
+            QString tstring;
+
+            if (titleList[titleIndex] == "")
+                tstring = groupDisplayName;
+            else
+                tstring = titleList[titleIndex];
+            typeText->SetText(tstring);
+            if (lcddev) {
+                if(inTitle) {
+                    lcdItems.append(new LCDMenuItem(1, NOTCHECKABLE, tstring));
+                    lcdTitle = "Recordings";
+                }
+                else
+                    lcdTitle = " <<" + tstring;
+            }
+        }
+
         ltype = (UIListType *)container->GetType("bottomtitles");
         if (ltype)
         {
@@ -995,25 +1029,23 @@
             int h = titleIndex + 1;
             h = h % titleList.count();
 
+            QString tstring;
+
             for (int cnt = 0; cnt < ltype->GetItems(); cnt++)
             {
                 if (titleList[h] == "")
-                    ltype->SetItemText(cnt, groupDisplayName);
+                    tstring = groupDisplayName;
                 else
-                    ltype->SetItemText(cnt, titleList[h]);
+                    tstring = titleList[h];
+
+                ltype->SetItemText(cnt, tstring);
+                if (lcddev && inTitle) {
+                    lcdItems.append(new LCDMenuItem(0, NOTCHECKABLE, tstring));
+                }
                 h = ++h % titleList.count();
             }
         }
 
-        UITextType *typeText = (UITextType *)container->GetType("current");
-        if (typeText)
-        {
-            if (titleList[titleIndex] == "")
-                typeText->SetText(groupDisplayName);
-            else
-                typeText->SetText(titleList[titleIndex]);
-        }
-
         ltype = (UIListType *)container->GetType("showing");
         if (ltype)
         {
@@ -1066,6 +1098,12 @@
                     curitem = new ProgramInfo(*tempInfo);
                     ltype->SetItemCurrent(cnt);
                 }
+                if (lcddev && !inTitle) {
+                    lcdItems.append(new LCDMenuItem(skip + cnt == progIndex,
+                                       NOTCHECKABLE,
+                                       tempSubTitle.replace ('"', "'") +
+                                                        " " + tempDate));
+                }
 
                 ltype->SetItemText(cnt, 1, tempSubTitle);
                 ltype->SetItemText(cnt, 2, tempDate);
@@ -1088,6 +1126,10 @@
             }
         } 
     } 
+    if (lcddev) {
+            if (!lcdItems.isEmpty())
+                lcddev->switchToMenu(&lcdItems, lcdTitle);
+    }
 
     // DRAW LAYERS
     if (container && type != Delete)

Attachment: signature.asc
Description: Digital signature

_______________________________________________
mythtv-dev mailing list
[email protected]
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

Reply via email to