Ticket #223: playbackbox-lcd.patch
| File playbackbox-lcd.patch, 4.1 KB (added by , 20 years ago) |
|---|
-
programs/mythfrontend/playbackbox.cpp
35 35 #include "scheduledrecording.h" 36 36 #include "remoteutil.h" 37 37 #include "jobqueue.h" 38 #include "lcddevice.h" 38 39 39 40 static int comp_programid(ProgramInfo *a, ProgramInfo *b) 40 41 { … … 952 953 pix.fill(this, pr.topLeft()); 953 954 QPainter tmp(&pix); 954 955 956 class LCD * lcddev = LCD::Get(); 957 QString lcdTitle; 958 QPtrList<LCDMenuItem> lcdItems; 959 lcdItems.setAutoDelete(true); 960 961 955 962 container = theme->GetSet("selector"); 956 963 957 964 ProgramInfo *tempInfo; … … 984 991 985 992 for (int cnt = 0; cnt < ltype->GetItems(); cnt++) 986 993 { 994 QString tstring; 987 995 if (titleList[h] == "") 988 ltype->SetItemText(cnt, groupDisplayName);996 tstring = groupDisplayName; 989 997 else 990 ltype->SetItemText(cnt, titleList[h]); 998 tstring = titleList[h]; 999 1000 ltype->SetItemText(cnt, tstring); 1001 if (lcddev && inTitle) { 1002 lcdItems.append(new LCDMenuItem(0, NOTCHECKABLE, tstring)); 1003 } 1004 991 1005 h = ++h % titleList.count(); 992 1006 } 993 1007 } 994 1008 1009 UITextType *typeText = (UITextType *)container->GetType("current"); 1010 if (typeText) 1011 { 1012 QString tstring; 1013 1014 if (titleList[titleIndex] == "") 1015 tstring = groupDisplayName; 1016 else 1017 tstring = titleList[titleIndex]; 1018 typeText->SetText(tstring); 1019 if (lcddev) { 1020 if(inTitle) { 1021 lcdItems.append(new LCDMenuItem(1, NOTCHECKABLE, tstring)); 1022 lcdTitle = "Recordings"; 1023 } 1024 else 1025 lcdTitle = " <<" + tstring; 1026 } 1027 } 1028 995 1029 ltype = (UIListType *)container->GetType("bottomtitles"); 996 1030 if (ltype) 997 1031 { … … 1001 1035 int h = titleIndex + 1; 1002 1036 h = h % titleList.count(); 1003 1037 1038 QString tstring; 1039 1004 1040 for (int cnt = 0; cnt < ltype->GetItems(); cnt++) 1005 1041 { 1006 1042 if (titleList[h] == "") 1007 ltype->SetItemText(cnt, groupDisplayName);1043 tstring = groupDisplayName; 1008 1044 else 1009 ltype->SetItemText(cnt, titleList[h]); 1045 tstring = titleList[h]; 1046 1047 ltype->SetItemText(cnt, tstring); 1048 if (lcddev && inTitle) { 1049 lcdItems.append(new LCDMenuItem(0, NOTCHECKABLE, tstring)); 1050 } 1010 1051 h = ++h % titleList.count(); 1011 1052 } 1012 1053 } 1013 1054 1014 UITextType *typeText = (UITextType *)container->GetType("current");1015 if (typeText)1016 {1017 if (titleList[titleIndex] == "")1018 typeText->SetText(groupDisplayName);1019 else1020 typeText->SetText(titleList[titleIndex]);1021 }1022 1023 1055 ltype = (UIListType *)container->GetType("showing"); 1024 1056 if (ltype) 1025 1057 { … … 1072 1104 curitem = new ProgramInfo(*tempInfo); 1073 1105 ltype->SetItemCurrent(cnt); 1074 1106 } 1107 if (lcddev && !inTitle) { 1108 lcdItems.append(new LCDMenuItem(skip + cnt == progIndex, 1109 NOTCHECKABLE, 1110 tempSubTitle.replace ('"', "'") + 1111 " " + tempDate)); 1112 } 1075 1113 1076 1114 ltype->SetItemText(cnt, 1, tempSubTitle); 1077 1115 ltype->SetItemText(cnt, 2, tempDate); … … 1094 1132 } 1095 1133 } 1096 1134 } 1135 if (lcddev) { 1136 if (!lcdItems.isEmpty()) 1137 lcddev->switchToMenu(&lcdItems, lcdTitle); 1138 } 1097 1139 1098 1140 // DRAW LAYERS 1099 1141 if (container && type != Delete)
