D28402: Provide ability to configure size cut-off for local file previews
Méven Car
noreply at phabricator.kde.org
Fri Apr 24 07:04:49 BST 2020
meven accepted this revision.
meven added a comment.
In D28402#656077 <https://phabricator.kde.org/D28402#656077>, @harogaston wrote:
> In D28402#655312 <https://phabricator.kde.org/D28402#655312>, @meven wrote:
>
> > Should we make the information panel follow those settings as well (currently the preview there has no limit, nor plugin limitations) ?
> > Same question about tooltips.
> >
> > I think we should. Essentially copying to there code :
> >
> > const KConfigGroup globalConfig(KSharedConfig::openConfig(), "PreviewSettings");
> > m_enabledPlugins = globalConfig.readEntry("Plugins", KIO::PreviewJob::defaultPlugins());
> > m_localFileSizeLimit = globalConfig.readEntry("LimitLocalFiles", false);
>
>
> I think I agree with you even though I didn't get your point regarding the code snippet.
It's the code the toolptipmanager and the information panel need to support limiting its previews as the rest.
> In any case I guess that idea should be part of a new patch, do you agree?
As you want, it can be in another patch.
> As I am a noob it currently has a flaw.
> It is that it doesn't pick up all the configuration changes 'on the fly' but only after restarting Dolphin.
> If the check "Local files" is checked then the file size limit affects immediately.
But not a new size limit...
> But changes to the checkbox itself only take effect after restarting dolphing. I know why it happens but I > couldn't code a solution. Maybe Nate can give me a hand or point to someone that can.
You need to move `m_localFileSizeLimit = globalConfig.readEntry("LimitLocalFiles", false);` in `KFileItemModelRolesUpdater::startPreviewJob` to keep the m_localFileSizeLimit value fresh.
The other two values are read from the Job anyway.
Please remove those lines from the commit comment before merging (you can edit here and use `arc amend`)
You can move it to a comment.
REPOSITORY
R318 Dolphin
BRANCH
gui-setting-to-limit-local-file-preview (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D28402
To: harogaston, ngraham, #dolphin, meven, elvisangelaccio
Cc: cfeck, kfm-devel, azyx, nikolaik, pberestov, iasensio, aprcela, 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/20200424/0ebeff76/attachment.htm>
More information about the kfm-devel
mailing list