summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-22 10:38:36 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-10-22 10:38:36 +0200
commitc7b3f98fcae46f983a8163412c141244cf938fe7 (patch)
tree040950cd3d0c723a0bd42ab0dff463de9554a08c /src
parentrekonq 0.2.70 (diff)
downloadrekonq-c7b3f98fcae46f983a8163412c141244cf938fe7.tar.xz
Removed "Add to Favorites" action.
Matgic78 customizable favorites page is clearly better :D
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow.cpp41
-rw-r--r--src/mainwindow.h3
-rw-r--r--src/webview.cpp3
3 files changed, 1 insertions, 46 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 4e9c4b26..28a59f11 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -381,11 +381,6 @@ void MainWindow::setupActions()
bmMenu->setIcon(KIcon("bookmarks"));
bmMenu->setDelayed(false);
actionCollection()->addAction(QLatin1String("bookmarksActionMenu"), bmMenu);
-
- // Add to favorites
- a = new KAction(KIcon("rating"), i18n("Add to Favorites"), this);
- actionCollection()->addAction(QLatin1String("add_to_favorites"), a);
- connect(a, SIGNAL(triggered(bool)), this, SLOT(addFavoriteLink()));
}
@@ -1100,39 +1095,3 @@ void MainWindow::slotOpenActionUrl(QAction *action)
}
}
-
-
-void MainWindow::addFavoriteLink()
-{
- QString name = currentTab()->title();
- QString url = currentTab()->url().prettyUrl(KUrl::RemoveTrailingSlash);
-
- QStringList names = ReKonfig::previewNames();
- QStringList urls = ReKonfig::previewUrls();
-
-
- for (int i = 0; i < 8 && i < urls.size() ; ++i)
- {
- if(urls.at(i).isEmpty() || urls.at(i) == url)
- {
- names.replace(i, name);
- urls.replace(i, url);
- break;
- }
- if(i == 7)
- {
- names.prepend(name);
- if(names.count() > 8)
- names.removeLast();
-
- urls.prepend(url);
- if(urls.count() > 8)
- urls.removeLast();
-
- break;
- }
- }
-
- ReKonfig::setPreviewNames(names);
- ReKonfig::setPreviewUrls(urls);
-}
diff --git a/src/mainwindow.h b/src/mainwindow.h
index c680cc60..5d8aeec2 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -152,9 +152,6 @@ private slots:
void slotAboutToShowBackMenu();
void slotOpenActionUrl(QAction *action);
- // add link to the favorites shown in the rekonq homepage
- void addFavoriteLink();
-
private:
MainView *m_view;
FindBar *m_findBar;
diff --git a/src/webview.cpp b/src/webview.cpp
index c9160e5a..e65aea9e 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -333,8 +333,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
menu.addAction(mainwindow->actionByName(KStandardAction::name(KStandardAction::SaveAs)));
menu.addAction(mainwindow->actionByName("page_source"));
-
- menu.addAction(mainwindow->actionByName("add_to_favorites"));
+
QAction *addBookmarkAction = Application::bookmarkProvider()->actionByName("rekonq_add_bookmark");
menu.addAction(addBookmarkAction);