Ticket #6318: recGroup-cycle-1a.patch
| File recGroup-cycle-1a.patch, 2.8 KB (added by , 17 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) … … 1428 1429 m_titleList << tr("LiveTV"); 1429 1430 m_titleList << sortedList.values(); 1430 1431 1432 // Populate list of recording groups 1433 if (m_progCache) 1434 { 1435 QString name; 1436 1437 m_recGroups.clear(); 1438 m_recGroupIdx = -1; 1439 1440 m_recGroups.append("All Programs"); 1441 1442 MSqlQuery query(MSqlQuery::InitCon()); 1443 1444 query.prepare("SELECT distinct recgroup from recorded WHERE " 1445 "deletepending = 0 ORDER BY recgroup"); 1446 if (query.exec()) 1447 { 1448 while (query.next()) 1449 { 1450 name = query.value(0).toString(); 1451 if (name != "Deleted" && name != "LiveTV") 1452 m_recGroups.append(name); 1453 } 1454 1455 m_recGroupIdx = m_recGroups.indexOf(m_recGroup); 1456 if (m_recGroupIdx < 0) 1457 m_recGroupIdx = 0; 1458 } 1459 } 1460 1431 1461 updateGroupList(); 1432 1462 updateUsage(); 1433 1463 … … 3147 3177 m_viewMask = m_viewMaskToggle(m_viewMask, VIEW_TITLES); 3148 3178 m_connected = FillList(true); 3149 3179 } 3180 else if (action == "PAGERIGHT") 3181 { 3182 if (m_recGroupIdx >= 0 && !m_recGroups.empty()) 3183 { 3184 if (++m_recGroupIdx >= m_recGroups.size()) 3185 m_recGroupIdx = 0; 3186 displayRecGroup(m_recGroups[m_recGroupIdx]); 3187 } 3188 } 3189 else if (action == "PAGELEFT") 3190 { 3191 if (m_recGroupIdx >= 0 && !m_recGroups.empty()) 3192 { 3193 if (--m_recGroupIdx < 0) 3194 m_recGroupIdx = m_recGroups.size() - 1; 3195 displayRecGroup(m_recGroups[m_recGroupIdx]); 3196 } 3197 } 3150 3198 else if (action == "CHANGERECGROUP") 3151 3199 showGroupFilter(); 3152 3200 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;
