X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/81fcd720a2cc095262e52b8a40dd1472d774a415..093efca22dfd247f06e2a669ad968300e71ef08d:/src/infosidebarpage.cpp diff --git a/src/infosidebarpage.cpp b/src/infosidebarpage.cpp index b1dee423f..319582cb4 100644 --- a/src/infosidebarpage.cpp +++ b/src/infosidebarpage.cpp @@ -121,6 +121,12 @@ void InfoSidebarPage::setUrl(const KUrl& url) void InfoSidebarPage::setSelection(const QList& selection) { SidebarPage::setSelection(selection); + if (selection.size() == 1) { + const KUrl url = selection.first().url(); + if (!url.isEmpty()) { + m_urlCandidate = url; + } + } m_timer->start(TimerDelay); } @@ -186,7 +192,7 @@ void InfoSidebarPage::showItemInfo() K3Icon::SizeEnormous); m_preview->setPixmap(icon); m_nameLabel->setText(i18ncp("@info", "%1 item selected", "%1 items selected", selectedItems.count())); - } else if (!applyBookmark(file)) { + } else if (!applyPlace(file)) { // try to get a preview pixmap from the item... KUrl::List list; list.append(file); @@ -226,7 +232,7 @@ void InfoSidebarPage::slotTimeout() void InfoSidebarPage::showIcon(const KFileItem& item) { m_pendingPreview = false; - if (!applyBookmark(item.url())) { + if (!applyPlace(item.url())) { m_preview->setPixmap(item.pixmap(K3Icon::SizeEnormous)); } } @@ -241,7 +247,7 @@ void InfoSidebarPage::showPreview(const KFileItem& item, } } -bool InfoSidebarPage::applyBookmark(const KUrl& url) +bool InfoSidebarPage::applyPlace(const KUrl& url) { KFilePlacesModel* placesModel = DolphinSettings::instance().placesModel(); int count = placesModel->rowCount();