Changeset View
Changeset View
Standalone View
Standalone View
src/filewidgets/kfileplacesmodel.cpp
Show First 20 Lines • Show All 262 Lines • ▼ Show 20 Line(s) | 261 | KFilePlacesItem::createSystemBookmark(d->bookmarkManager, | |||
---|---|---|---|---|---|
263 | QUrl(QStringLiteral("trash:/")), QStringLiteral("user-trash")); | 263 | QUrl(QStringLiteral("trash:/")), QStringLiteral("user-trash")); | ||
264 | 264 | | |||
265 | setDefaultMetadataItemForGroup(PlacesType); | 265 | setDefaultMetadataItemForGroup(PlacesType); | ||
266 | setDefaultMetadataItemForGroup(RemoteType); | 266 | setDefaultMetadataItemForGroup(RemoteType); | ||
267 | setDefaultMetadataItemForGroup(DevicesType); | 267 | setDefaultMetadataItemForGroup(DevicesType); | ||
268 | setDefaultMetadataItemForGroup(RemovableDevicesType); | 268 | setDefaultMetadataItemForGroup(RemovableDevicesType); | ||
269 | 269 | | |||
270 | // Force bookmarks to be saved. If on open/save dialog and the bookmarks are not saved, QFile::exists | 270 | // Force bookmarks to be saved. If on open/save dialog and the bookmarks are not saved, QFile::exists | ||
271 | // will always return false, which opening/closing all the time the open/save dialog would case the | 271 | // will always return false, which opening/closing all the time the open/save dialog would case the | ||
meven: Should we add this to existing places settings ?
Like we do with `withBaloo` for instance… | |||||
272 | // bookmarks to be added once each time, having lots of times each bookmark. (ereslibre) | 272 | // bookmarks to be added once each time, having lots of times each bookmark. (ereslibre) | ||
273 | d->bookmarkManager->saveAs(file); | 273 | d->bookmarkManager->saveAs(file); | ||
274 | } | 274 | } | ||
275 | 275 | | |||
276 | // Add a Recently Used entry if available (it comes from kio-extras) | ||||
277 | if (KProtocolInfo::isKnownProtocol("recentdocuments")) { | ||||
278 | KFilePlacesItem::createSystemBookmark(d->bookmarkManager, | ||||
279 | QStringLiteral("Recently Used"), I18N_NOOP2("KFile System Bookmarks", "Recently Used"), | ||||
280 | QUrl(QStringLiteral("recentdocuments:/")), QStringLiteral("document-open-recent-symbolic")); | ||||
281 | } | ||||
282 | | ||||
276 | // if baloo is enabled, add new urls even if the bookmark file is not empty | 283 | // if baloo is enabled, add new urls even if the bookmark file is not empty | ||
277 | if (d->fileIndexingEnabled && | 284 | if (d->fileIndexingEnabled && | ||
278 | root.metaDataItem(QStringLiteral("withBaloo")) != QLatin1String("true")) { | 285 | root.metaDataItem(QStringLiteral("withBaloo")) != QLatin1String("true")) { | ||
279 | 286 | | |||
280 | root.setMetaDataItem(QStringLiteral("withBaloo"), QStringLiteral("true")); | 287 | root.setMetaDataItem(QStringLiteral("withBaloo"), QStringLiteral("true")); | ||
281 | KFilePlacesItem::createSystemBookmark(d->bookmarkManager, | 288 | KFilePlacesItem::createSystemBookmark(d->bookmarkManager, | ||
282 | QStringLiteral("Today"), I18N_NOOP2("KFile System Bookmarks", "Today"), | 289 | QStringLiteral("Created Today"), I18N_NOOP2("KFile System Bookmarks", "Today"), | ||
timeline protocol works on modification date, we should change this to "Modified Today". meven: timeline protocol works on modification date, we should change this to "Modified Today".
It is… | |||||
283 | QUrl(QStringLiteral("timeline:/today")), QStringLiteral("go-jump-today")); | 290 | QUrl(QStringLiteral("timeline:/today")), QStringLiteral("go-jump-today")); | ||
284 | KFilePlacesItem::createSystemBookmark(d->bookmarkManager, | 291 | KFilePlacesItem::createSystemBookmark(d->bookmarkManager, | ||
285 | QStringLiteral("Yesterday"), I18N_NOOP2("KFile System Bookmarks", "Yesterday"), | 292 | QStringLiteral("Created Yesterday"), I18N_NOOP2("KFile System Bookmarks", "Yesterday"), | ||
meven: same here | |||||
286 | QUrl(QStringLiteral("timeline:/yesterday")), QStringLiteral("view-calendar-day")); | 293 | QUrl(QStringLiteral("timeline:/yesterday")), QStringLiteral("view-calendar-day")); | ||
287 | KFilePlacesItem::createSystemBookmark(d->bookmarkManager, | 294 | KFilePlacesItem::createSystemBookmark(d->bookmarkManager, | ||
288 | QStringLiteral("Documents"), I18N_NOOP2("KFile System Bookmarks", "Documents"), | 295 | QStringLiteral("Documents"), I18N_NOOP2("KFile System Bookmarks", "Documents"), | ||
289 | QUrl(QStringLiteral("search:/documents")), QStringLiteral("folder-text")); | 296 | QUrl(QStringLiteral("search:/documents")), QStringLiteral("folder-text")); | ||
290 | KFilePlacesItem::createSystemBookmark(d->bookmarkManager, | 297 | KFilePlacesItem::createSystemBookmark(d->bookmarkManager, | ||
291 | QStringLiteral("Images"), I18N_NOOP2("KFile System Bookmarks", "Images"), | 298 | QStringLiteral("Images"), I18N_NOOP2("KFile System Bookmarks", "Images"), | ||
292 | QUrl(QStringLiteral("search:/images")), QStringLiteral("folder-images")); | 299 | QUrl(QStringLiteral("search:/images")), QStringLiteral("folder-images")); | ||
293 | KFilePlacesItem::createSystemBookmark(d->bookmarkManager, | 300 | KFilePlacesItem::createSystemBookmark(d->bookmarkManager, | ||
▲ Show 20 Lines • Show All 985 Lines • Show Last 20 Lines |
Should we add this to existing places settings ?
Like we do with withBaloo for instance, adding it if it was not added before.