Changeset View
Changeset View
Standalone View
Standalone View
src/views/dolphinitemlistview.cpp
Show All 24 Lines | |||||
25 | #include "dolphin_compactmodesettings.h" | 25 | #include "dolphin_compactmodesettings.h" | ||
26 | #include "dolphinfileitemlistwidget.h" | 26 | #include "dolphinfileitemlistwidget.h" | ||
27 | 27 | | |||
28 | #include <kitemviews/kfileitemlistview.h> | 28 | #include <kitemviews/kfileitemlistview.h> | ||
29 | #include <kitemviews/kfileitemmodel.h> | 29 | #include <kitemviews/kfileitemmodel.h> | ||
30 | #include <kitemviews/kitemlistcontroller.h> | 30 | #include <kitemviews/kitemlistcontroller.h> | ||
31 | #include <kitemviews/kitemliststyleoption.h> | 31 | #include <kitemviews/kitemliststyleoption.h> | ||
32 | 32 | | |||
33 | #include <KIO/PreviewJob> | ||||
33 | 34 | | |||
34 | #include <views/viewmodecontroller.h> | 35 | #include <views/viewmodecontroller.h> | ||
35 | 36 | | |||
36 | #include "zoomlevelinfo.h" | 37 | #include "zoomlevelinfo.h" | ||
37 | 38 | | |||
38 | 39 | | |||
39 | DolphinItemListView::DolphinItemListView(QGraphicsWidget* parent) : | 40 | DolphinItemListView::DolphinItemListView(QGraphicsWidget* parent) : | ||
40 | KFileItemListView(parent), | 41 | KFileItemListView(parent), | ||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Line(s) | 85 | { | |||
89 | 90 | | |||
90 | setEnabledSelectionToggles(GeneralSettings::showSelectionToggle()); | 91 | setEnabledSelectionToggles(GeneralSettings::showSelectionToggle()); | ||
91 | setSupportsItemExpanding(itemLayoutSupportsItemExpanding(itemLayout())); | 92 | setSupportsItemExpanding(itemLayoutSupportsItemExpanding(itemLayout())); | ||
92 | 93 | | |||
93 | updateFont(); | 94 | updateFont(); | ||
94 | updateGridSize(); | 95 | updateGridSize(); | ||
95 | 96 | | |||
96 | const KConfigGroup globalConfig(KSharedConfig::openConfig(), "PreviewSettings"); | 97 | const KConfigGroup globalConfig(KSharedConfig::openConfig(), "PreviewSettings"); | ||
97 | const QStringList plugins = globalConfig.readEntry("Plugins", QStringList() | 98 | QStringList enabledPlugins = globalConfig.readEntry("Plugins", QStringList()); | ||
98 | << QStringLiteral("directorythumbnail") | 99 | if (enabledPlugins.isEmpty()) { | ||
99 | << QStringLiteral("imagethumbnail") | 100 | enabledPlugins = KIO::PreviewJob::defaultPlugins(); | ||
100 | << QStringLiteral("jpegthumbnail")); | 101 | } | ||
101 | setEnabledPlugins(plugins); | 102 | setEnabledPlugins(enabledPlugins); | ||
102 | 103 | | |||
103 | endTransaction(); | 104 | endTransaction(); | ||
104 | } | 105 | } | ||
105 | 106 | | |||
106 | void DolphinItemListView::writeSettings() | 107 | void DolphinItemListView::writeSettings() | ||
107 | { | 108 | { | ||
108 | IconsModeSettings::self()->save(); | 109 | IconsModeSettings::self()->save(); | ||
109 | CompactModeSettings::self()->save(); | 110 | CompactModeSettings::self()->save(); | ||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |