diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-07-11 18:10:18 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-07-11 18:10:18 +0200 |
commit | 7b015bc02b7311b9746320ecd11383e13036195d (patch) | |
tree | 74dd9944ffba9478a2e89b3963477f87b87b2ca6 | |
parent | Fixing addTabButton visibility. (diff) | |
download | rekonq-7b015bc02b7311b9746320ecd11383e13036195d.tar.xz |
New Add Bookmark Action
-rw-r--r-- | src/bookmarks.cpp | 8 | ||||
-rw-r--r-- | src/mainwindow.cpp | 10 | ||||
-rw-r--r-- | src/rekonqui.rc | 4 | ||||
-rw-r--r-- | src/webview.cpp | 6 |
4 files changed, 15 insertions, 13 deletions
diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp index ace45c2f..69bb5687 100644 --- a/src/bookmarks.cpp +++ b/src/bookmarks.cpp @@ -108,10 +108,10 @@ BookmarkMenu::BookmarkMenu(KBookmarkManager *manager, : KBookmarkMenu(manager, owner, menu, actionCollection) { - actionCollection->addAction(KStandardAction::AddBookmark, - QLatin1String("add_bookmark_payload"), - this, SLOT(slotAddBookmark())); - + KAction *a = KStandardAction::addBookmark(this, SLOT(slotAddBookmark()), this); + a->setText(i18n("Add Bookmark")); + a->setIcon(KIcon("rating")); + actionCollection->addAction(QLatin1String("rekonq_add_bookmark"),a); } BookmarkMenu::~BookmarkMenu() diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 82f95cfa..110cadc9 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -315,10 +315,12 @@ void MainWindow::setupActions() actionCollection()->addAction(QLatin1String("show_prev_tab"), a); connect(a, SIGNAL(triggered(bool)), m_view, SLOT(previousTab())); - // ==================== Bookmarks Actions - a = new KAction(i18n("Add Bookmark"), this); - a->setIcon(KIcon("rating")); - actionCollection()->addAction(QLatin1String("add_bookmark"),a); +// // ==================== Bookmarks Actions +// a = new KAction(i18n("Add Bookmark"), this); +// a->setIcon(KIcon("rating")); +// actionCollection()->addAction(QLatin1String("add_bookmark"),a); + QAction *ba = Application::bookmarkProvider()->actionByName("rekonq_add_bookmark"); + actionCollection()->addAction(QLatin1String("rekonq_add_bookmark"), ba); } diff --git a/src/rekonqui.rc b/src/rekonqui.rc index dfc8bd2b..34e705f0 100644 --- a/src/rekonqui.rc +++ b/src/rekonqui.rc @@ -1,6 +1,6 @@ <?xml version="1.0"?> <!DOCTYPE gui SYSTEM "kpartgui.dtd"> -<gui name="rekonq" version="42"> +<gui name="rekonq" version="43"> <MenuBar> @@ -88,7 +88,7 @@ <Action name="stop_reload" /> <Action name="go_home" /> <Action name="url_bar" /> - <Action name="add_bookmark" /> + <Action name="rekonq_add_bookmark" /> <Action name="options_configure" /> </ToolBar> diff --git a/src/webview.cpp b/src/webview.cpp index 2273dcb5..f0aa6641 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -199,9 +199,9 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) if (!linkIsEmpty) { menu.addSeparator(); - QAction *addBookmarkAction = Application::bookmarkProvider()->actionByName("add_bookmark_payload"); - addBookmarkAction->setData(result.linkUrl()); - addBookmarkAction->setText(i18n("&Bookmark This Link")); + QAction *addBookmarkAction = Application::bookmarkProvider()->actionByName("rekonq_add_bookmark"); +// addBookmarkAction->setData(result.linkUrl()); +// addBookmarkAction->setText(i18n("&Bookmark This Link")); menu.addAction(addBookmarkAction); } |