diff options
-rw-r--r-- | data/category.png | bin | 695 -> 334 bytes | |||
-rw-r--r-- | data/home.html | 9 | ||||
-rw-r--r-- | src/mainwindow.cpp | 47 | ||||
-rw-r--r-- | src/mainwindow.h | 3 | ||||
-rw-r--r-- | src/webview.cpp | 3 |
5 files changed, 9 insertions, 53 deletions
diff --git a/data/category.png b/data/category.png Binary files differindex 52df230d..796875d4 100644 --- a/data/category.png +++ b/data/category.png diff --git a/data/home.html b/data/home.html index 1a5f1474..fd949660 100644 --- a/data/home.html +++ b/data/home.html @@ -18,7 +18,7 @@ border:0; body{ background: url(%2/tile.gif) repeat-x #fff; font-family: sans-serif; -font-size: 90%; +font-size: 0.8em; text-align: center; } @@ -38,11 +38,12 @@ margin-top: 2em; } h3{ -background: url(%2/category.png) no-repeat; +border-bottom-width: 1px; +-webkit-border-image: url(%2/category.png) 1 1 1 1 stretch stretch; padding: 0.2em; -margin-top: 1em; +margin-top: 0.5em; margin-bottom: 0.5em; -padding-left: 0.4em; +font: normal bold 1em sans-serif; } h4{ diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4e9c4b26..02102ae1 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -147,7 +147,6 @@ MainWindow::~MainWindow() { Application::instance()->removeMainWindow(this); delete m_popup; -// delete m_view; } @@ -381,11 +380,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())); } @@ -394,6 +388,7 @@ void MainWindow::setupTools() KActionMenu *toolsMenu = new KActionMenu(KIcon("configure"), i18n("&Tools"), this); toolsMenu->setDelayed(false); + toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Open))); toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::SaveAs))); toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Print))); toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Find))); @@ -576,8 +571,8 @@ void MainWindow::slotUpdateWindowTitle(const QString &title) void MainWindow::slotFileOpen() { QString filePath = KFileDialog::getOpenFileName(KUrl(), - i18n("*.html *.htm *.svg *.png *.gif *.svgz|Web Resources (*.html *.htm *.svg *.png *.gif *.svgz)\n" \ - "*.*|All files (*.*)"), + i18n("*.html *.htm *.svg *.png *.gif *.svgz|Web Resources (*.html *.htm *.svg *.png *.gif *.svgz)\n" + "*.*|All files (*.*)"), this, i18n("Open Web Resource")); @@ -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); |