diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-11-11 09:40:36 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-12-10 02:48:06 +0100 |
commit | 4f1dae7834becb7d7105a0cc9945d9a0c04383b8 (patch) | |
tree | be823d81fe7ab1cc199b11bc5b32823d3cc9bdf7 /src/bookmarks | |
parent | Clean up previous commit about adblock and fix enable/disable feature (diff) | |
download | rekonq-4f1dae7834becb7d7105a0cc9945d9a0c04383b8.tar.xz |
WARNING: BIG COMMIT
This commit reviews and partially fix the Q/K action mess
in rekonq code.
We now store actions in different actioncollections
(one for each tab && one for each window).
Related to this code review, you can find also fixes for
some triggered actions NOT working (well) before:
- fullscreen
- bookmark all tabs
- new (clean) tab
Diffstat (limited to 'src/bookmarks')
-rw-r--r-- | src/bookmarks/bookmarkmanager.cpp | 6 | ||||
-rw-r--r-- | src/bookmarks/bookmarkmanager.h | 2 | ||||
-rw-r--r-- | src/bookmarks/bookmarkowner.cpp | 9 | ||||
-rw-r--r-- | src/bookmarks/bookmarkowner.h | 2 |
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); |