D28402: Provide ability to configure size cut-off for local file previews
Gaston Haro
noreply at phabricator.kde.org
Thu Apr 16 01:43:09 BST 2020
harogaston added inline comments.
INLINE COMMENTS
> ngraham wrote in previewssettingspage.cpp:74
> I would put the whole text in this checkbox ("Skip previews for local files above:") rather than splitting it between a checkbox and a label
Yes, I guess it can be done. It is related to KIO code in the following way
src/widgets/previewjob.cpp:492
if (itemUrl.isLocalFile() || KProtocolInfo::protocolClass(itemUrl.scheme()) == QLatin1String(":local")) {
skipCurrentItem = !d->ignoreMaximumSize && size > d->maximumLocalSize
&& !d->currentItem.plugin->property(QStringLiteral("IgnoreMaximumSize")).toBool();
} else {
// For remote items the "IgnoreMaximumSize" plugin property is not respected
skipCurrentItem = !d->ignoreMaximumSize && size > d->maximumRemoteSize;
// Remote directories are not supported, don't try to do a file_copy on them
if (!skipCurrentItem) {
// TODO update item.mimeType from the UDS entry, in case it wasn't set initially
// But we don't use the mimetype anymore, we just use isDir().
if (d->currentItem.item.isDir()) {
skipCurrentItem = true;
}
}
}
Do you think it is correct to allow for the "Skip previews for local files above:" spinner to take value 0 to note that no limit should be imposed for previews? Or any other suggestions?
REPOSITORY
R318 Dolphin
REVISION DETAIL
https://phabricator.kde.org/D28402
To: harogaston, ngraham, #dolphin, meven, elvisangelaccio
Cc: kfm-devel, azyx, nikolaik, pberestov, iasensio, fprice, fbampaloukas, alexde, Codezela, feverfew, meven, spoorun, navarromorales, firef, ngraham, andrebarros, emmanuelp, rdieter, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200416/f6781ada/attachment.htm>
More information about the kfm-devel
mailing list