Ticket #6318: recGroup-cycle-v1.1.patch
File recGroup-cycle-v1.1.patch, 2.9 KB (added by , 15 years ago) |
---|
-
programs/mythfrontend/playbackbox.cpp
345 345 } 346 346 347 347 // recording group stuff 348 m_recGroupIdx = -1; 348 349 m_recGroupType.clear(); 349 350 m_recGroupType[m_recGroup] = (displayCat) ? "category" : "recgroup"; 350 351 if (m_groupnameAsAllProg) … … 1422 1423 m_titleList << tr("LiveTV"); 1423 1424 m_titleList << sortedList.values(); 1424 1425 1426 // Populate list of recording groups 1427 if (m_progCache) 1428 { 1429 QString name; 1430 1431 m_recGroups.clear(); 1432 m_recGroupIdx = -1; 1433 1434 m_recGroups.append("All Programs"); 1435 1436 MSqlQuery query(MSqlQuery::InitCon()); 1437 1438 query.prepare("SELECT distinct recgroup from recorded WHERE " 1439 "deletepending = 0 ORDER BY recgroup"); 1440 if (query.exec()) 1441 { 1442 while (query.next()) 1443 { 1444 name = query.value(0).toString(); 1445 if (name != "Deleted" && name != "LiveTV") 1446 { 1447 m_recGroups.append(name); 1448 m_recGroupType[name] = "recgroup"; 1449 } 1450 } 1451 1452 m_recGroupIdx = m_recGroups.indexOf(m_recGroup); 1453 if (m_recGroupIdx < 0) 1454 m_recGroupIdx = 0; 1455 } 1456 } 1457 1425 1458 updateGroupList(); 1426 1459 updateUsage(); 1427 1460 … … 3147 3180 m_viewMask = m_viewMaskToggle(m_viewMask, VIEW_TITLES); 3148 3181 m_connected = FillList(true); 3149 3182 } 3183 else if (action == "PAGERIGHT") 3184 { 3185 if (m_recGroupIdx >= 0 && !m_recGroups.empty()) 3186 { 3187 if (++m_recGroupIdx >= m_recGroups.size()) 3188 m_recGroupIdx = 0; 3189 displayRecGroup(m_recGroups[m_recGroupIdx]); 3190 } 3191 } 3192 else if (action == "PAGELEFT") 3193 { 3194 if (m_recGroupIdx >= 0 && !m_recGroups.empty()) 3195 { 3196 if (--m_recGroupIdx < 0) 3197 m_recGroupIdx = m_recGroups.size() - 1; 3198 displayRecGroup(m_recGroups[m_recGroupIdx]); 3199 } 3200 } 3150 3201 else if (action == "CHANGERECGROUP") 3151 3202 showGroupFilter(); 3152 3203 else if (action == "CHANGEGROUPVIEW") -
programs/mythfrontend/playbackbox.h
373 373 int m_progsInDB; ///< total number of recordings in DB 374 374 bool m_isFilling; 375 375 376 QStringList m_recGroups; 377 int m_recGroupIdx; 378 376 379 // Other state 377 380 /// Program currently selected for deletion 378 381 ProgramInfo *m_delItem;