Ticket #1894: guideicons.patch
File guideicons.patch, 2.3 KB (added by , 19 years ago) |
---|
-
libs/libmythtv/guidegrid.cpp
1135 1135 if ((y == (unsigned int)2 && scrolltype != 1) || 1136 1136 ((signed int)y == m_currentRow && scrolltype == 1)) 1137 1137 { 1138 if ( chinfo->iconpath != "none" && chinfo->iconpath != "")1138 if (!chinfo->iconpath.isEmpty() && chinfo->iconpath != "none") 1139 1139 { 1140 1140 int iconsize = 0; 1141 1141 if (itype) … … 1144 1144 iconsize = type->GetSize(); 1145 1145 if (!chinfo->iconload) 1146 1146 chinfo->LoadIcon(iconsize); 1147 if (chinfo->iconload && itype) 1148 itype->SetImage(chinfo->icon); 1147 if (chinfo->iconload) 1148 { 1149 if (itype) 1150 itype->SetImage(chinfo->icon); 1151 } 1152 else 1153 { 1154 chinfo->iconpath = QString::null; 1155 } 1149 1156 } 1150 1157 } 1151 1158 … … 1166 1173 chinfo->LoadIcon(iconsize); 1167 1174 if (chinfo->iconload) 1168 1175 type->SetIcon(y, chinfo->icon); 1176 else 1177 { 1178 chinfo->iconpath = QString::null; 1179 type->ResetImage(y); 1180 } 1169 1181 } 1170 1182 else 1171 1183 { … … 1271 1283 container->ClearAllText(); 1272 1284 container->SetText(infoMap); 1273 1285 1274 UITextType *type;1275 1276 type = (UITextType *)container->GetType("misicon");1277 if (type)1278 type->SetText(chinfo->callsign);1279 1280 1286 UIImageType *itype = (UIImageType *)container->GetType("icon"); 1281 1287 if (itype) 1282 1288 { … … 1284 1290 itype->LoadImage(); 1285 1291 } 1286 1292 1293 if (!itype || chinfo->iconpath.isEmpty() || chinfo->iconpath == "none") 1294 { 1295 UITextType *type = (UITextType *)container->GetType("misicon"); 1296 if (type) 1297 type->SetText(chinfo->callsign); 1298 } 1299 1287 1300 container->Draw(&tmp, 1, m_context); 1288 1301 container->Draw(&tmp, 2, m_context); 1289 1302 container->Draw(&tmp, 3, m_context);