Ticket #4504: 4504-v2.patch
File 4504-v2.patch, 22.9 KB (added by , 16 years ago) |
---|
-
themes/blootubelite-wide/ui.xml
114 114 <selector type="box" color="#F0F0F0"></selector> 115 115 <recordingcolor>#00aa00</recordingcolor> 116 116 <conflictingcolor>#ff6600</conflictingcolor> 117 <unavailablecolor>#ff0000</unavailablecolor> 117 118 <cutdown>no</cutdown> 118 119 <multiline>yes</multiline> 119 120 <textoffset>9,6</textoffset> … … 449 450 <selector type="box" color="#f0f0f0"></selector> 450 451 <recordingcolor>#00aa00</recordingcolor> 451 452 <conflictingcolor>#ff6600</conflictingcolor> 453 <unavailablecolor>#ff0000</unavailablecolor> 452 454 <textoffset>9,6</textoffset> 453 455 <multiline>yes</multiline> 454 456 <catcolor category="Unknown" color="#222200"></catcolor> -
themes/blootube-wide/ui.xml
114 114 <selector type="box" color="#F0F0F0"></selector> 115 115 <recordingcolor>#00aa00</recordingcolor> 116 116 <conflictingcolor>#ff6600</conflictingcolor> 117 <unavailablecolor>#ff0000</unavailablecolor> 117 118 <cutdown>no</cutdown> 118 119 <multiline>yes</multiline> 119 120 <textoffset>9,6</textoffset> … … 449 450 <selector type="box" color="#f0f0f0"></selector> 450 451 <recordingcolor>#00aa00</recordingcolor> 451 452 <conflictingcolor>#ff6600</conflictingcolor> 453 <unavailablecolor>#ff0000</unavailablecolor> 452 454 <textoffset>9,6</textoffset> 453 455 <multiline>yes</multiline> 454 456 <catcolor category="Unknown" color="#222200"></catcolor> -
themes/ProjectGrayhem/ui.xml
114 114 <selector type="box" color="#808080"></selector> 115 115 <recordingcolor>#00aa00</recordingcolor> 116 116 <conflictingcolor>#ff6600</conflictingcolor> 117 <unavailablecolor>#ff0000</unavailablecolor> 117 118 <cutdown>no</cutdown> 118 119 <multiline>yes</multiline> 119 120 <textoffset>9,6</textoffset> … … 447 448 <selector type="box" color="#808080"></selector> 448 449 <recordingcolor>#00aa00</recordingcolor> 449 450 <conflictingcolor>#ff6600</conflictingcolor> 451 <unavailablecolor>#ff0000</unavailablecolor> 450 452 <textoffset>9,6</textoffset> 451 453 <multiline>yes</multiline> 452 454 <catcolor category="Unknown" color="#222200"></catcolor> -
themes/neon-wide/ui.xml
118 118 <selector type="box" color="#F0F0F0"></selector> 119 119 <recordingcolor>#00aa00</recordingcolor> 120 120 <conflictingcolor>#ff6600</conflictingcolor> 121 <unavailablecolor>#ff0000</unavailablecolor> 121 122 <cutdown>no</cutdown> 122 123 <multiline>yes</multiline> 123 124 <textoffset>9,2</textoffset> … … 453 454 <selector type="box" color="#f0f0f0"></selector> 454 455 <recordingcolor>#00aa00</recordingcolor> 455 456 <conflictingcolor>#ff6600</conflictingcolor> 457 <unavailablecolor>#ff0000</unavailablecolor> 456 458 <textoffset>9,6</textoffset> 457 459 <multiline>yes</multiline> 458 460 <catcolor category="Unknown" color="#222200"></catcolor> -
themes/ProjectGrayhem-wide/ui.xml
114 114 <selector type="box" color="#808080"></selector> 115 115 <recordingcolor>#00aa00</recordingcolor> 116 116 <conflictingcolor>#ff6600</conflictingcolor> 117 <unavailablecolor>#ff0000</unavailablecolor> 117 118 <cutdown>no</cutdown> 118 119 <multiline>yes</multiline> 119 120 <textoffset>9,6</textoffset> … … 443 444 <selector type="box" color="#808080"></selector> 444 445 <recordingcolor>#00aa00</recordingcolor> 445 446 <conflictingcolor>#ff6600</conflictingcolor> 447 <unavailablecolor>#ff0000</unavailablecolor> 446 448 <textoffset>9,6</textoffset> 447 449 <multiline>yes</multiline> 448 450 <catcolor category="Unknown" color="#222200"></catcolor> -
themes/blootube/ui.xml
114 114 <selector type="box" color="#808080"></selector> 115 115 <recordingcolor>#00aa00</recordingcolor> 116 116 <conflictingcolor>#ff6600</conflictingcolor> 117 <unavailablecolor>#ff0000</unavailablecolor> 117 118 <cutdown>no</cutdown> 118 119 <multiline>yes</multiline> 119 120 <textoffset>9,6</textoffset> … … 447 448 <selector type="box" color="#808080"></selector> 448 449 <recordingcolor>#00aa00</recordingcolor> 449 450 <conflictingcolor>#ff6600</conflictingcolor> 451 <unavailablecolor>#ff0000</unavailablecolor> 450 452 <textoffset>9,6</textoffset> 451 453 <multiline>yes</multiline> 452 454 <catcolor category="Unknown" color="#222200"></catcolor> -
myththemes/MythCenter/ui.xml
99 99 <selector type="box" color="#ffff33"></selector> 100 100 <recordingcolor>#00aa00</recordingcolor> 101 101 <conflictingcolor>#ff6600</conflictingcolor> 102 <unavailablecolor>#ff0000</unavailablecolor> 102 103 <cutdown>no</cutdown> 103 104 <multiline>yes</multiline> 104 105 <textoffset>9,6</textoffset> … … 261 262 <selector type="box" color="#ffff33"></selector> 262 263 <recordingcolor>#00aa00</recordingcolor> 263 264 <conflictingcolor>#ff6600</conflictingcolor> 265 <unavailablecolor>#ff0000</unavailablecolor> 264 266 <textoffset>9,6</textoffset> 265 267 266 268 <recordstatus type="SingleRecord" image="gg-rs-single.png"></recordstatus> -
myththemes/Retro/ui.xml
99 99 <selector type="box" color="#ffff33"></selector> 100 100 <recordingcolor>#00aa00</recordingcolor> 101 101 <conflictingcolor>#ff6600</conflictingcolor> 102 <unavailablecolor>#ff0000</unavailablecolor> 102 103 <cutdown>no</cutdown> 103 104 <multiline>yes</multiline> 104 105 <textoffset>9,6</textoffset> … … 261 262 <selector type="box" color="#ffff33"></selector> 262 263 <recordingcolor>#00aa00</recordingcolor> 263 264 <conflictingcolor>#ff6600</conflictingcolor> 265 <unavailablecolor>#ff0000</unavailablecolor> 264 266 <textoffset>9,6</textoffset> 265 267 266 268 <recordstatus type="SingleRecord" image="gg-rs-single.png"></recordstatus> -
myththemes/Minimalist-wide/ui.xml
93 93 <selector type="box" color="#ffff33"></selector> 94 94 <recordingcolor>#00aa00</recordingcolor> 95 95 <conflictingcolor>#ff6600</conflictingcolor> 96 <unavailablecolor>#ff0000</unavailablecolor> 96 97 <cutdown>no</cutdown> 97 98 <multiline>yes</multiline> 98 99 <textoffset>3,3</textoffset> … … 249 250 <selector type="box" color="#ffff33"></selector> 250 251 <recordingcolor>#00aa00</recordingcolor> 251 252 <conflictingcolor>#ff6600</conflictingcolor> 253 <unavailablecolor>#ff0000</unavailablecolor> 252 254 <cutdown>no</cutdown> 253 255 <multiline>yes</multiline> 254 256 <textoffset>3,3</textoffset> -
myththemes/Titivillus/ui.xml
95 95 <selector type="box" color="#ffff33"></selector> 96 96 <recordingcolor>#00aa00</recordingcolor> 97 97 <conflictingcolor>#ff6600</conflictingcolor> 98 <unavailablecolor>#ff0000</unavailablecolor> 98 99 <cutdown>no</cutdown> 99 100 <multiline>yes</multiline> 100 101 <textoffset>3,3</textoffset> … … 255 256 <selector type="box" color="#ffff33"></selector> 256 257 <recordingcolor>#00aa00</recordingcolor> 257 258 <conflictingcolor>#ff6600</conflictingcolor> 259 <unavailablecolor>#ff0000</unavailablecolor> 258 260 <textoffset>3,3</textoffset> 259 261 <multiline>yes</multiline> 260 262 -
myththemes/MythCenter-wide/ui.xml
140 140 <selector type="box" color="#33ff33"></selector> 141 141 <recordingcolor>#00aa00</recordingcolor> 142 142 <conflictingcolor>#ff6600</conflictingcolor> 143 <unavailablecolor>#ff0000</unavailablecolor> 143 144 <cutdown>no</cutdown> 144 145 <multiline>yes</multiline> 145 146 <textoffset>9,6</textoffset> … … 300 301 <selector type="box" color="#33ff33"></selector> 301 302 <recordingcolor>#00aa00</recordingcolor> 302 303 <conflictingcolor>#ff6600</conflictingcolor> 304 <unavailablecolor>#ff0000</unavailablecolor> 303 305 <textoffset>9,6</textoffset> 304 306 305 307 <recordstatus type="SingleRecord" image="gg-rs-single.png"></recordstatus> -
myththemes/Iulius/ui.xml
98 98 <selector type="box" color="#ffff33"></selector> 99 99 <recordingcolor>#00aa00</recordingcolor> 100 100 <conflictingcolor>#ff6600</conflictingcolor> 101 <unavailablecolor>#ff0000</unavailablecolor> 101 102 <cutdown>no</cutdown> 102 103 <multiline>yes</multiline> 103 104 <textoffset>9,6</textoffset> … … 271 272 <selector type="box" color="#ffff33"></selector> 272 273 <recordingcolor>#00aa00</recordingcolor> 273 274 <conflictingcolor>#ff6600</conflictingcolor> 275 <unavailablecolor>#ff0000</unavailablecolor> 274 276 <textoffset>9,6</textoffset> 275 277 276 278 <!-- customized category colors --> -
mythtv/themes/blue/ui.xml
63 63 <selector type="box" color="#ffff33"></selector> 64 64 <recordingcolor>#00aa00</recordingcolor> 65 65 <conflictingcolor>#ff6600</conflictingcolor> 66 <unavailablecolor>#ff0000</unavailablecolor> 66 67 <cutdown>no</cutdown> 67 68 <multiline>yes</multiline> 68 69 <textoffset>9,6</textoffset> … … 187 188 <selector type="box" color="#ffff33"></selector> 188 189 <recordingcolor>#00aa00</recordingcolor> 189 190 <conflictingcolor>#ff6600</conflictingcolor> 191 <unavailablecolor>#ff0000</unavailablecolor> 190 192 <textoffset>9,6</textoffset> 191 193 192 194 <!-- customized category colors --> -
mythtv/themes/G.A.N.T/ui.xml
98 98 <selector type="box" color="#ffff33"></selector> 99 99 <recordingcolor>#00aa00</recordingcolor> 100 100 <conflictingcolor>#ff6600</conflictingcolor> 101 <unavailablecolor>#ff0000</unavailablecolor> 101 102 <cutdown>no</cutdown> 102 103 <multiline>yes</multiline> 103 104 <textoffset>9,6</textoffset> … … 271 272 <selector type="box" color="#ffff33"></selector> 272 273 <recordingcolor>#00aa00</recordingcolor> 273 274 <conflictingcolor>#ff6600</conflictingcolor> 275 <unavailablecolor>#ff0000</unavailablecolor> 274 276 <textoffset>9,6</textoffset> 275 277 276 278 <!-- customized category colors --> -
mythtv/libs/libmythtv/guidegrid.h
153 153 void paintPrograms(QPainter *); 154 154 void paintCurrentInfo(QPainter *); 155 155 void paintInfo(QPainter *); 156 157 bool isUnavailable(uint chanid, uint chanNumber, bool &channelsChanged); 156 158 157 159 void resizeImage(QPixmap *, QString); 158 160 void LoadWindow(QDomElement &); … … 247 249 JumpToChannel *jumpToChannel; 248 250 bool jumpToChannelEnabled; 249 251 bool jumpToChannelHasRect; 252 253 QMap<uint,bool> chan_unavailable; 250 254 }; 251 255 252 256 #endif -
mythtv/libs/libmythtv/guidegrid.cpp
1248 1248 QRect tempRect; 1249 1249 bool isCurrent = false; 1250 1250 1251 bool channelsChanged = false; 1252 1253 uint chanNumber = row + m_currentStartChannel; 1254 if (chanNumber >= m_channelInfos.size()) 1255 chanNumber -= m_channelInfos.size(); 1256 1257 PixmapChannel *chinfo = GetChannelInfo(chanNumber); 1258 1259 bool unavStat = isUnavailable(chinfo->chanid, chanNumber, channelsChanged); 1260 1251 1261 for (int x = 0; x < DISPLAY_TIMES; x++) 1252 1262 { 1253 1263 proginfo = m_programInfos[row][x]; … … 1344 1354 1345 1355 type->SetProgramInfo(row, cnt, tempRect, proginfo->title, 1346 1356 proginfo->category, arrow, recFlag, 1347 recStat, isCurrent);1357 recStat, unavStat, isCurrent); 1348 1358 1349 1359 cnt++; 1350 1360 } … … 1379 1389 1380 1390 if (r.intersects(channelRect) && paintChannels(&p)) 1381 1391 { 1392 chan_unavailable.clear(); 1382 1393 fillProgramInfos(); 1383 1394 update(programRect|curInfoRect|r); 1384 1395 qApp->unlock(); … … 1532 1543 UIImageType *itype = NULL; 1533 1544 container = theme->GetSet("chanbar"); 1534 1545 infocontainer = theme->GetSet("program_info"); 1546 1535 1547 if (container) 1536 1548 type = (UIBarType *)container->GetType("chans"); 1537 1549 if (infocontainer) … … 1553 1565 if (chanNumber >= m_channelInfos.size()) 1554 1566 chanNumber -= m_channelInfos.size(); 1555 1567 if (chanNumber >= m_channelInfos.size()) 1556 break; 1568 break; 1557 1569 1558 1570 chinfo = GetChannelInfo(chanNumber); 1559 1571 1560 bool unavailable = false; 1561 if (m_player && !m_player->IsTunable(chinfo->chanid, true)) 1562 { 1563 unavailable = true; 1572 bool unavailable = isUnavailable(chinfo->chanid, chanNumber, channelsChanged); 1564 1573 1565 // Try alternates with same channum if applicable 1566 uint alt = GetAlternateChannelIndex(chanNumber, true); 1567 if (alt != m_channelInfoIdx[chanNumber]) 1568 { 1569 unavailable = false; 1570 m_channelInfoIdx[chanNumber] = alt; 1571 chinfo = GetChannelInfo(chanNumber); 1572 channelsChanged = true; 1573 } 1574 if (channelsChanged) 1575 chinfo = GetChannelInfo(chanNumber); 1574 1576 1575 // Try alternates with different channum if applicable 1576 if (unavailable && GetProgramList(chinfo->chanid).count()) 1577 { 1578 alt = GetAlternateChannelIndex(chanNumber, false); 1579 unavailable = (alt == m_channelInfoIdx[chanNumber]); 1580 } 1581 } 1577 if (!chinfo || (chanNumber >= m_channelInfos.size())) 1578 break; 1582 1579 1583 1580 if ((y == (unsigned int)2 && scrolltype != 1) || 1584 1581 ((signed int)y == m_currentRow && scrolltype == 1)) … … 1775 1772 p->drawPixmap(pr.topLeft(), pix); 1776 1773 } 1777 1774 1775 bool GuideGrid::isUnavailable(uint chanid, uint chanNumber, bool &channelsChanged) 1776 { 1777 if (chan_unavailable.contains(chanNumber)) 1778 return chan_unavailable[chanNumber]; 1779 1780 bool unavailable = false; 1781 if (m_player && !m_player->IsTunable(chanid, true)) 1782 { 1783 unavailable = true; 1784 1785 // Try alternates with same channum if applicable 1786 uint alt = GetAlternateChannelIndex(chanNumber, true); 1787 if (alt != m_channelInfoIdx[chanNumber]) 1788 { 1789 unavailable = false; 1790 m_channelInfoIdx[chanNumber] = alt; 1791 channelsChanged = true; 1792 } 1793 1794 // Try alternates with different channum if applicable 1795 if (unavailable && GetProgramList(chanid).count()) 1796 { 1797 alt = GetAlternateChannelIndex(chanNumber, false); 1798 unavailable = (alt == m_channelInfoIdx[chanNumber]); 1799 } 1800 } 1801 1802 chan_unavailable[chanNumber] = unavailable; 1803 1804 return unavailable; 1805 } 1806 1778 1807 void GuideGrid::toggleGuideListing() 1779 1808 { 1780 1809 showFavorites = (!showFavorites); … … 2111 2140 2112 2141 void GuideGrid::enter() 2113 2142 { 2143 bool channelsChanged = false; 2144 2145 uint chanNumber = m_currentRow + m_currentStartChannel; 2146 if (chanNumber >= m_channelInfos.size()) 2147 chanNumber -= m_channelInfos.size(); 2148 2149 PixmapChannel *chinfo = GetChannelInfo(chanNumber); 2150 2151 if (isUnavailable(chinfo->chanid, chanNumber, channelsChanged)) 2152 return; 2153 2114 2154 if (timeCheck) 2115 2155 { 2116 2156 timeCheck->stop(); -
mythtv/libs/libmyth/xmlparse.cpp
729 729 QString selcolor = ""; 730 730 QString reccolor = ""; 731 731 QString concolor = ""; 732 QString unavcolor = ""; 732 733 QRect area; 733 734 QPoint textoff = QPoint(0, 0); 734 735 bool cutdown = true; … … 803 804 { 804 805 concolor = getFirstText(info); 805 806 } 807 else if (info.tagName() == "unavailablecolor") 808 { 809 unavcolor = getFirstText(info); 810 } 806 811 else if (info.tagName() == "multiline") 807 812 { 808 813 if (getFirstText(info).lower() == "yes") … … 889 894 guide->SetTextOffset(textoff); 890 895 if (concolor == "") 891 896 concolor = reccolor; 892 guide->SetRecordingColors(reccolor, concolor );897 guide->SetRecordingColors(reccolor, concolor, unavcolor); 893 898 guide->SetSelectorColor(selcolor); 894 899 for (int i = 1; i <= 7; i++) 895 900 guide->LoadImage(i, recImgs[i]); -
mythtv/libs/libmyth/uitypes.cpp
1 2 1 #include <iostream> 3 2 #include <math.h> 4 3 … … 639 638 { 640 639 for (data = allData[i].first(); data; data = allData[i].next()) 641 640 { 642 if (data->recStat == 0) 641 if (data->unavStat && (data->recStat != 1)) 642 drawBox(dr, data, unavcolor); 643 else if (data->recStat == 0) 643 644 drawBackground(dr, data); 644 645 else if (data->recStat == 1) 645 646 drawBox(dr, data, reccolor); … … 868 869 869 870 void UIGuideType::SetProgramInfo(int row, int col, const QRect &area, 870 871 const QString &title, const QString &genre, 871 int arrow, int recType, int recStat, 872 int arrow, int recType, int recStat, bool unavStat, 872 873 bool selected) 873 874 { 874 875 (void)col; 875 UIGTCon *data = new UIGTCon(area, title, genre, arrow, recType, recStat );876 UIGTCon *data = new UIGTCon(area, title, genre, arrow, recType, recStat, unavStat); 876 877 877 878 allData[row].append(data); 878 879 879 880 if (drawCategoryColors) 880 881 { 881 882 data->categoryColor = categoryColors[data->category.lower()]; 883 882 884 if (!data->categoryColor.isValid()) 883 885 data->categoryColor = categoryColors["none"]; 884 886 } -
mythtv/libs/libmyth/uitypes.h
235 235 UIGuideType(const QString &name, int order); 236 236 ~UIGuideType(); 237 237 238 enum FillType { Alpha = 10, Dense, Eco, Solid };238 enum FillType { Alpha = 10, Dense, Eco, Solid, Unavailable }; 239 239 240 240 void Draw(QPainter *dr, int drawlayer, int context); 241 241 … … 249 249 void SetNumRows(int numRows) { this->numRows = numRows; } 250 250 void SetWindow(MythDialog *win) { window = win; } 251 251 252 void SetRecordingColors(const QString &reccol, const QString &concol) 253 { reccolor = QColor(reccol); concolor = QColor(concol); } 252 void SetRecordingColors(const QString &reccol, const QString &concol, 253 const QString &unavcol) 254 { reccolor = QColor(reccol); concolor = QColor(concol); 255 unavcolor = QColor(unavcol); } 254 256 void SetSelectorColor(const QString &col) { selcolor = QColor(col); } 255 257 void SetSolidColor(const QString &col) { solidcolor = QColor(col); } 256 258 void SetCategoryColors(const QMap<QString, QString> &catColors); … … 262 264 void LoadImage(int, const QString &file); 263 265 void SetProgramInfo(int row, int col, const QRect &area, 264 266 const QString &title, const QString &category, 265 int arrow, int recType, int recStat, bool selected); 267 int arrow, int recType, int recStat, bool unavStat, 268 bool selected); 266 269 void ResetData(); 267 270 void ResetRow(int row); 268 271 void SetProgPast(int ppast); … … 272 275 class UIGTCon 273 276 { 274 277 public: 275 UIGTCon() { arrow = recType = recStat = 0; };278 UIGTCon() { arrow = recType = recStat = 0; unavStat = false; }; 276 279 UIGTCon(const QRect &drawArea, const QString &title, 277 const QString &category, int arrow, int recType, int recStat) 280 const QString &category, int arrow, int recType, 281 int recStat, bool unavStat) 278 282 { 279 283 this->drawArea = drawArea; 280 284 this->title = title; … … 282 286 this->arrow = arrow; 283 287 this->recType = recType; 284 288 this->recStat = recStat; 289 this->unavStat = unavStat; 285 290 } 286 291 287 292 UIGTCon(const UIGTCon &o) … … 293 298 arrow = o.arrow; 294 299 recType = o.recType; 295 300 recStat = o.recStat; 301 unavStat = o.unavStat; 296 302 } 297 303 298 304 QRect drawArea; … … 302 308 int arrow; 303 309 int recType; 304 310 int recStat; 311 bool unavStat; 305 312 }; 306 313 307 314 void drawBackground(QPainter *dr, UIGTCon *data); … … 334 341 335 342 QColor reccolor; 336 343 QColor concolor; 344 QColor unavcolor; 337 345 338 346 int filltype; 339 347 bool cutdown;