Ticket #2114: 2114_patch.diff
File 2114_patch.diff, 2.6 KB (added by , 18 years ago) |
---|
-
iconview.cpp
old new 582 582 return false; 583 583 584 584 MediaMonitor *mon = MediaMonitor::GetMediaMonitor(); 585 if (!mon)586 return false;587 585 588 586 bool handled = false; 589 587 QDir curdir(m_currDir); 590 QValueList<MythMediaDevice*> removables = mon->GetMedias(MEDIATYPE_DATA);591 QValueList<MythMediaDevice*>::iterator it = removables.begin();592 for (; !handled && (it != removables.end()); it++)593 {594 if (!mon->ValidateAndLock(*it))595 continue;596 588 597 if (curdir == QDir((*it)->getMountPath())) 589 if (mon) 590 { 591 QValueList<MythMediaDevice*> removables = mon->GetMedias(MEDIATYPE_DATA); 592 QValueList<MythMediaDevice*>::iterator it = removables.begin(); 593 for (; !handled && (it != removables.end()); it++) 598 594 { 599 HandleShowDevices(); 595 if (!mon->ValidateAndLock(*it)) 596 continue; 600 597 601 // Make sure previous devices are visible and selected 602 ThumbItem *item = NULL; 603 if (!(*it)->getVolumeID().isEmpty()) 604 item = m_itemDict.find((*it)->getVolumeID()); 605 else 606 item = m_itemDict.find((*it)->getDevicePath()); 607 608 if (item) 598 if (curdir == QDir((*it)->getMountPath())) 609 599 { 610 int pos = m_itemList.find(item); 611 if (pos != -1) 600 HandleShowDevices(); 601 602 // Make sure previous devices are visible and selected 603 ThumbItem *item = NULL; 604 if (!(*it)->getVolumeID().isEmpty()) 605 item = m_itemDict.find((*it)->getVolumeID()); 606 else 607 item = m_itemDict.find((*it)->getDevicePath()); 608 609 if (item) 612 610 { 613 m_currRow = pos / m_nCols; 614 m_currCol = pos - (m_currRow * m_nCols); 615 m_topRow = max(0, m_currRow + 1 - m_nRows); 611 int pos = m_itemList.find(item); 612 if (pos != -1) 613 { 614 m_currRow = pos / m_nCols; 615 m_currCol = pos - (m_currRow * m_nCols); 616 m_topRow = max(0, m_currRow + 1 - m_nRows); 617 } 616 618 } 619 620 handled = true; 617 621 } 618 622 619 handled = true;623 mon->Unlock(*it); 620 624 } 621 622 mon->Unlock(*it);623 625 } 624 626 625 627 if (!handled && (curdir != QDir(m_galleryDir)))