[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kfile
From: Kevin Ottens <ervin () kde ! org>
Date: 2007-04-05 21:57:00
Message-ID: 1175810220.164937.8818.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 650947 by ervin:
Initialize places on first creation.
M +11 -0 kfileplacesmodel.cpp
--- trunk/KDE/kdelibs/kfile/kfileplacesmodel.cpp #650946:650947
@@ -23,6 +23,8 @@
#include <QMimeData>
#include <kglobal.h>
+#include <klocale.h>
+#include <kuser.h>
#include <kstandarddirs.h>
#include <kcomponentdata.h>
#include <kicon.h>
@@ -66,6 +68,15 @@
d->bookmarkManager = KBookmarkManager::managerForFile(file, "dolphin", false);
+ // Let's put some places in there if it's empty
+ KBookmarkGroup root = d->bookmarkManager->root();
+ if (root.first().isNull()) {
+ root.addBookmark(d->bookmarkManager, i18n("Home"), KUrl(KUser().homeDir()), \
"folder-home"); + root.addBookmark(d->bookmarkManager, i18n("Network"), \
KUrl("remote:/"), "network-local"); + root.addBookmark(d->bookmarkManager, \
i18n("Root"), KUrl("/"), "folder-red"); + root.addBookmark(d->bookmarkManager, \
i18n("Trash"), KUrl("trash:/"), "user-trash"); + }
+
d->deviceModel = new KDeviceListModel("[ Volume.ignored == false AND \
Volume.usage == 'FileSystem' ]", this);
connect(d->deviceModel, SIGNAL(rowsInserted(const QModelIndex&, int, int)),
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic