summaryrefslogtreecommitdiff
path: root/src/bookmarks
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/bookmarkmanager.cpp6
-rw-r--r--src/bookmarks/bookmarkmanager.h2
-rw-r--r--src/bookmarks/bookmarkowner.cpp9
-rw-r--r--src/bookmarks/bookmarkowner.h2
4 files changed, 16 insertions, 3 deletions
diff --git a/src/bookmarks/bookmarkmanager.cpp b/src/bookmarks/bookmarkmanager.cpp
index 57464846..42ae4c33 100644
--- a/src/bookmarks/bookmarkmanager.cpp
+++ b/src/bookmarks/bookmarkmanager.cpp
@@ -171,6 +171,12 @@ void BookmarkManager::slotBookmarksChanged()
}
+KBookmark BookmarkManager::bookmarkCurrentPage(const KBookmark &bookmark)
+{
+ return m_owner->bookmarkCurrentPage(bookmark);
+}
+
+
void BookmarkManager::fillBookmarkBar(BookmarkToolBar *toolBar)
{
KBookmarkGroup root = m_manager->toolbar();
diff --git a/src/bookmarks/bookmarkmanager.h b/src/bookmarks/bookmarkmanager.h
index 3538bcb8..0e86fcca 100644
--- a/src/bookmarks/bookmarkmanager.h
+++ b/src/bookmarks/bookmarkmanager.h
@@ -145,6 +145,8 @@ public Q_SLOTS:
void slotEditBookmarks();
+ KBookmark bookmarkCurrentPage(const KBookmark &bookmark = KBookmark());
+
Q_SIGNALS:
/**
* @short This signal is emitted when an url has to be loaded
diff --git a/src/bookmarks/bookmarkowner.cpp b/src/bookmarks/bookmarkowner.cpp
index aba4ec69..54a34b36 100644
--- a/src/bookmarks/bookmarkowner.cpp
+++ b/src/bookmarks/bookmarkowner.cpp
@@ -239,12 +239,17 @@ KBookmark BookmarkOwner::bookmarkCurrentPage(const KBookmark &bookmark)
}
-KBookmarkGroup BookmarkOwner::newBookmarkFolder(const KBookmark &bookmark)
+KBookmarkGroup BookmarkOwner::newBookmarkFolder(const KBookmark &bookmark, const QString &name)
{
KBookmarkGroup newBk;
KBookmarkDialog *dialog = bookmarkDialog(m_manager, 0);
- QString folderName = i18n("New folder");
+ QString folderName;
+ if (name.isEmpty())
+ folderName = i18n("New folder");
+ else
+ folderName = name;
+
if (!bookmark.isNull())
{
if (bookmark.isGroup())
diff --git a/src/bookmarks/bookmarkowner.h b/src/bookmarks/bookmarkowner.h
index f0b238b9..aca338dd 100644
--- a/src/bookmarks/bookmarkowner.h
+++ b/src/bookmarks/bookmarkowner.h
@@ -108,7 +108,7 @@ public Q_SLOTS:
void openBookmarkFolder(const KBookmark &bookmark);
KBookmark bookmarkCurrentPage(const KBookmark &bookmark = KBookmark());
- KBookmarkGroup newBookmarkFolder(const KBookmark &bookmark = KBookmark());
+ KBookmarkGroup newBookmarkFolder(const KBookmark &bookmark = KBookmark(), const QString &name = QString());
KBookmark newSeparator(const KBookmark &bookmark = KBookmark());
void copyLink(const KBookmark &bookmark);