mirror of
https://invent.kde.org/system/dolphin
synced 2024-07-04 17:30:55 +00:00
Turn on Dolphin icon previews by default
Summary: BUG: 338492 BUG: 350212 By default, turn on all preview plugins and turn on previews themselves. Depends on D8347 Test Plan: Tested this change in an up-to-date KDE Neon: removed the existing dolphinrc file, deployed Dolphin with the change, and observed that previews are now turned on for all file types for which a plugin exists except for text files, which are in the blacklist because they're mostly useless at nearly all icon sizes (still available in case people want them, though). Here's how Dolphin's main window looks by default now in KDE Neon: {F5441184} (You may notice that there are no previews for the video files; that's because Neon doesn't ship with any plugins for them, so that would be expected at this point) And here is how the Settings > General > Preview window looks like now by default: {F5435391} Reviewers: #dolphin, #vdg, markg, abetts, dfaure, aseigo, elvisangelaccio Reviewed By: #vdg, abetts, dfaure, elvisangelaccio Subscribers: abetts, cfeck, andreaska, emmanuelp, andreask, markg, broulik, anthonyfieroni, davidedmundson, ltoscano, dfaure, elvisangelaccio, #konqueror Tags: #dolphin Differential Revision: https://phabricator.kde.org/D7440
This commit is contained in:
parent
a1108e8400
commit
bebcf035d2
|
@ -8,7 +8,7 @@ set (KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATI
|
|||
project(Dolphin VERSION ${KDE_APPLICATIONS_VERSION})
|
||||
|
||||
set(QT_MIN_VERSION "5.5.0")
|
||||
set(KF5_MIN_VERSION "5.37.0")
|
||||
set(KF5_MIN_VERSION "5.40.0")
|
||||
set(ECM_MIN_VERSION "1.6.0")
|
||||
|
||||
# ECM setup
|
||||
|
|
|
@ -99,10 +99,10 @@ KFileItemModelRolesUpdater::KFileItemModelRolesUpdater(KFileItemModel* model, QO
|
|||
Q_ASSERT(model);
|
||||
|
||||
const KConfigGroup globalConfig(KSharedConfig::openConfig(), "PreviewSettings");
|
||||
m_enabledPlugins = globalConfig.readEntry("Plugins", QStringList()
|
||||
<< QStringLiteral("directorythumbnail")
|
||||
<< QStringLiteral("imagethumbnail")
|
||||
<< QStringLiteral("jpegthumbnail"));
|
||||
m_enabledPlugins = globalConfig.readEntry("Plugins", QStringList());
|
||||
if (m_enabledPlugins.isEmpty()) {
|
||||
m_enabledPlugins = KIO::PreviewJob::defaultPlugins();
|
||||
}
|
||||
|
||||
connect(m_model, &KFileItemModel::itemsInserted,
|
||||
this, &KFileItemModelRolesUpdater::slotItemsInserted);
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<entry name="PreviewsShown" type="Bool" >
|
||||
<label context="@label">Previews shown</label>
|
||||
<whatsthis context="@info:whatsthis">When this option is enabled, a preview of the file content is shown as an icon.</whatsthis>
|
||||
<default>false</default>
|
||||
<default>true</default>
|
||||
</entry>
|
||||
|
||||
<entry name="GroupedSorting" type="Bool" >
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <KLocalizedString>
|
||||
#include <KServiceTypeTrader>
|
||||
#include <KService>
|
||||
#include <KIO/PreviewJob>
|
||||
|
||||
#include <settings/serviceitemdelegate.h>
|
||||
#include <settings/servicemodel.h>
|
||||
|
@ -172,12 +173,11 @@ void PreviewsSettingsPage::loadPreviewPlugins()
|
|||
|
||||
void PreviewsSettingsPage::loadSettings()
|
||||
{
|
||||
KConfigGroup globalConfig(KSharedConfig::openConfig(), "PreviewSettings");
|
||||
m_enabledPreviewPlugins = globalConfig.readEntry("Plugins", QStringList()
|
||||
<< QStringLiteral("directorythumbnail")
|
||||
<< QStringLiteral("imagethumbnail")
|
||||
<< QStringLiteral("jpegthumbnail"));
|
||||
|
||||
const KConfigGroup globalConfig(KSharedConfig::openConfig(), QStringLiteral("PreviewSettings"));
|
||||
m_enabledPreviewPlugins = globalConfig.readEntry("Plugins", QStringList());
|
||||
if (m_enabledPreviewPlugins.isEmpty()) {
|
||||
m_enabledPreviewPlugins = KIO::PreviewJob::defaultPlugins();
|
||||
}
|
||||
const qulonglong defaultRemotePreview = static_cast<qulonglong>(MaxRemotePreviewSize) * 1024 * 1024;
|
||||
const qulonglong maxRemoteByteSize = globalConfig.readEntry("MaximumRemoteSize", defaultRemotePreview);
|
||||
const int maxRemoteMByteSize = maxRemoteByteSize / (1024 * 1024);
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <kitemviews/kitemlistcontroller.h>
|
||||
#include <kitemviews/kitemliststyleoption.h>
|
||||
|
||||
#include <KIO/PreviewJob>
|
||||
|
||||
#include <views/viewmodecontroller.h>
|
||||
|
||||
|
@ -94,11 +95,11 @@ void DolphinItemListView::readSettings()
|
|||
updateGridSize();
|
||||
|
||||
const KConfigGroup globalConfig(KSharedConfig::openConfig(), "PreviewSettings");
|
||||
const QStringList plugins = globalConfig.readEntry("Plugins", QStringList()
|
||||
<< QStringLiteral("directorythumbnail")
|
||||
<< QStringLiteral("imagethumbnail")
|
||||
<< QStringLiteral("jpegthumbnail"));
|
||||
setEnabledPlugins(plugins);
|
||||
QStringList enabledPlugins = globalConfig.readEntry("Plugins", QStringList());
|
||||
if (enabledPlugins.isEmpty()) {
|
||||
enabledPlugins = KIO::PreviewJob::defaultPlugins();
|
||||
}
|
||||
setEnabledPlugins(enabledPlugins);
|
||||
|
||||
endTransaction();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user