Ticket #3999: mythvideousability.diff
| File mythvideousability.diff, 5.0 KB (added by , 18 years ago) |
|---|
-
mythvideo/mythvideo/videogallery.h
50 50 void updateView(QPainter *p); 51 51 void updateArrows(QPainter *p); 52 52 void updateSingleIcon(QPainter *p, int lx, int ly); 53 voiddrawIcon(QPainter *p, GenericTree *curTreePos, int curPos, int xpos,53 bool drawIcon(QPainter *p, GenericTree *curTreePos, int curPos, int xpos, 54 54 int ypos); 55 55 56 56 void positionIcon(); … … 87 87 88 88 GenericTree *video_tree_root; 89 89 GenericTree *where_we_are; 90 91 bool updatedView; 92 bool partialupdatedView; 90 93 }; 91 94 92 95 #endif -
mythvideo/mythvideo/imagecache.cpp
131 131 m_cache.push_back(*p->second); 132 132 m_cache.erase(p->second); 133 133 ret = *(p->second = --m_cache.end()); 134 VERBOSE(VB_ GENERAL, QString("ImageCache hit for: %1")134 VERBOSE(VB_FILE, QString("ImageCache hit for: %1") 135 135 .arg(image_file)); 136 136 } 137 137 else 138 138 { 139 VERBOSE(VB_ GENERAL, QString("ImageCache miss for: %1")139 VERBOSE(VB_FILE, QString("ImageCache miss for: %1") 140 140 .arg(image_file)); 141 141 142 142 cache_entry_ptr cep(new cache_entry(image_file)); … … 164 164 if (ret->scale_image.isNull() || ret->scale_mode != scale || 165 165 ret->scale_width != width || ret->scale_height != height) 166 166 { 167 VERBOSE(VB_ GENERAL,167 VERBOSE(VB_FILE, 168 168 QString("ImageCache miss for scale image: %1") 169 169 .arg(image_file)); 170 170 ret->scale_mode = scale; … … 177 177 } 178 178 else 179 179 { 180 VERBOSE(VB_ GENERAL,180 VERBOSE(VB_FILE, 181 181 QString("ImageCache hit for scale image: %1") 182 182 .arg(image_file)); 183 183 } -
mythvideo/mythvideo/videogallery.cpp
272 272 // Draw all video icons 273 273 // 274 274 275 updatedView = FALSE; 276 partialupdatedView = FALSE; 277 275 278 GenericTree *lparent = where_we_are->getParent(); 276 279 if (!lparent) 277 280 return; … … 299 302 300 303 GenericTree* curTreePos = lparent->getChildAt(curPos,0); 301 304 302 drawIcon(&tmp, curTreePos, curPos, xpos, ypos); 305 if(drawIcon(&tmp, curTreePos, curPos, xpos, ypos)) 306 p->drawPixmap(pr.topLeft(), pix); 303 307 304 308 curPos++; 309 310 qApp->processEvents(); 311 if(updatedView) 312 return; 313 314 if(partialupdatedView) 315 { 316 updateView(p); 317 return; 318 } 305 319 } 306 320 } 307 321 308 322 tmp.end(); 309 323 p->drawPixmap(pr.topLeft(), pix); // redraw area 324 updatedView = TRUE; 310 325 } 311 326 312 327 void VideoGallery::updateSingleIcon(QPainter *p, int lx, int ly) … … 345 360 p->drawPixmap(pr.topLeft(), pix); // redraw area 346 361 } 347 362 348 voidVideoGallery::drawIcon(QPainter *p, GenericTree* curTreePos, int curPos,363 bool VideoGallery::drawIcon(QPainter *p, GenericTree* curTreePos, int curPos, 349 364 int xpos, int ypos) 350 365 { 351 366 QString icon_file; 352 367 int yoffset = 0; 353 368 Metadata *meta = NULL; 369 bool retVal = FALSE; 354 370 355 371 if (curTreePos->getInt() < 0) // directory 356 372 { … … 437 453 438 454 if (icon_file.length() && !isDefaultCoverFile(icon_file)) 439 455 { 456 if(!ImageCache::getImageCache().hitTest(icon_file)) 457 retVal = TRUE; 458 440 459 const QPixmap *icon_image = ImageCache::getImageCache(). 441 460 load(icon_file, int(thumbW - 2 * sw), 442 461 int(thumbH - 2 * sh - yoffset), … … 484 503 for (int i = 0; i < 4; ++i) 485 504 ttype->Draw(p, i, 0); 486 505 } 506 507 return retVal; 487 508 } 488 509 489 510 void VideoGallery::doMenu(bool info) … … 507 528 SLOT(slotDoFilter())); 508 529 AddPopupViews(); 509 530 } 510 531 popup->addButton(tr("Increment Parental"), this, SLOT(shiftParental(1))); 511 532 popup->addButton(tr("Cancel"), this, SLOT(slotDoCancel())); 512 533 513 534 popup->ShowPopup(this, SLOT(slotDoCancel())); … … 742 763 743 764 if (topRow != oldRow) // renew the whole screen 744 765 { 766 update(arrowsRect); 745 767 update(viewRect); 746 768 update(textRect); 747 update(arrowsRect); 769 748 770 } 749 771 else // partial update only 750 772 { … … 752 774 updateSingleIcon(&p,prevCol,prevRow); 753 775 updateSingleIcon(&p,currCol,currRow); 754 776 updateText(&p); 777 partialupdatedView = TRUE; 755 778 } 756 779 } 757 780
