diff --git mythplugins/mythgallery/mythgallery/iconview.cpp mythplugins/mythgallery/mythgallery/iconview.cpp
index da7f35b..d23f559 100644
|
|
|
bool IconView::Create(void)
|
| 204 | 204 | m_thumbGen->setSize(thumbWidth, thumbHeight); |
| 205 | 205 | |
| 206 | 206 | SetupMediaMonitor(); |
| 207 | | LoadDirectory(m_galleryDir); |
| | 207 | if (!m_currDevice) |
| | 208 | LoadDirectory(m_galleryDir); |
| 208 | 209 | |
| 209 | 210 | return true; |
| 210 | 211 | } |
| … |
… |
void IconView::LoadThumbnail(ThumbItem *item)
|
| 339 | 340 | |
| 340 | 341 | void IconView::SetupMediaMonitor(void) |
| 341 | 342 | { |
| 342 | | #ifndef _WIN32 |
| | 343 | #ifdef _WIN32 |
| | 344 | if (m_currDevice) |
| | 345 | LoadDirectory(m_currDevice->getDevicePath()); |
| | 346 | #else |
| 343 | 347 | MediaMonitor *mon = MediaMonitor::GetMediaMonitor(); |
| 344 | 348 | if (m_currDevice && mon && mon->ValidateAndLock(m_currDevice)) |
| 345 | 349 | { |
| … |
… |
void IconView::SetupMediaMonitor(void)
|
| 370 | 374 | mon->Unlock(m_currDevice); |
| 371 | 375 | } |
| 372 | 376 | } |
| 373 | | m_currDevice = NULL; |
| 374 | 377 | #endif // _WIN32 |
| 375 | 378 | } |
| 376 | 379 | |
| … |
… |
bool IconView::HandleMediaDeviceSelect(ThumbItem *item)
|
| 530 | 533 | { |
| 531 | 534 | m_currDevice = item->GetMediaDevice(); |
| 532 | 535 | |
| | 536 | #ifdef _WIN32 |
| | 537 | LoadDirectory(m_currDevice->getDevicePath()); |
| | 538 | #else |
| 533 | 539 | if (!m_currDevice->isMounted(false)) |
| 534 | 540 | m_currDevice->mount(); |
| 535 | 541 | |
| … |
… |
bool IconView::HandleMediaDeviceSelect(ThumbItem *item)
|
| 542 | 548 | MythMediaDevice*))); |
| 543 | 549 | |
| 544 | 550 | LoadDirectory(m_currDevice->getMountPath()); |
| | 551 | #endif |
| 545 | 552 | |
| 546 | 553 | mon->Unlock(m_currDevice); |
| 547 | 554 | } |
| … |
… |
void IconView::HandleSettings(void)
|
| 1036 | 1043 | MediaMonitor *mon = MediaMonitor::GetMediaMonitor(); |
| 1037 | 1044 | if (m_currDevice && mon && mon->ValidateAndLock(m_currDevice)) |
| 1038 | 1045 | { |
| | 1046 | #ifdef _WIN32 |
| | 1047 | LoadDirectory(m_currDevice->getDevicePath()); |
| | 1048 | #else |
| 1039 | 1049 | LoadDirectory(m_currDevice->getMountPath()); |
| | 1050 | #endif |
| 1040 | 1051 | mon->Unlock(m_currDevice); |
| 1041 | 1052 | } |
| 1042 | 1053 | else |
| … |
… |
void IconView::HandleImport(void)
|
| 1116 | 1127 | |
| 1117 | 1128 | void IconView::HandleShowDevices(void) |
| 1118 | 1129 | { |
| 1119 | | #ifndef _WIN32 |
| 1120 | 1130 | MediaMonitor *mon = MediaMonitor::GetMediaMonitor(); |
| | 1131 | #ifndef _WIN32 |
| 1121 | 1132 | if (m_currDevice && mon && mon->ValidateAndLock(m_currDevice)) |
| 1122 | 1133 | { |
| 1123 | 1134 | m_currDevice->disconnect(this); |
| … |
… |
void IconView::HandleShowDevices(void)
|
| 1145 | 1156 | m_itemList.append(item); |
| 1146 | 1157 | m_itemHash.insert(item->GetName(), item); |
| 1147 | 1158 | |
| 1148 | | #ifndef _WIN32 |
| 1149 | 1159 | if (mon) |
| 1150 | 1160 | { |
| 1151 | | QList<MythMediaDevice*> removables = mon->GetMedias(MEDIATYPE_DATA); |
| | 1161 | QList<MythMediaDevice*> removables = mon->GetMedias(MEDIATYPE_DATA|MEDIATYPE_MGALLERY); |
| 1152 | 1162 | QList<MythMediaDevice*>::Iterator it = removables.begin(); |
| 1153 | 1163 | for (; it != removables.end(); it++) |
| 1154 | 1164 | { |
| … |
… |
void IconView::HandleShowDevices(void)
|
| 1166 | 1176 | } |
| 1167 | 1177 | } |
| 1168 | 1178 | } |
| 1169 | | #endif |
| 1170 | 1179 | |
| 1171 | 1180 | ThumbItem *thumbitem; |
| 1172 | 1181 | for (int x = 0; x < m_itemList.size(); x++) |