From 033fe621dac20e43047d6c394bb378b9a86ec5f5 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 28 Apr 2011 00:10:08 +0200 Subject: Imported Opera feature to load favorite page with number 1..9 by pressing CTRL + 1..9 Courtesy patch by Thomas Murach. Thanks :) Reviewed by Pierre, Felix... and me! RB: 101043 PS: Thomas, I see one corner problem with your patch: Opera has clearly indicated favorites preview number, while rekonq hasn't. Any idea to fill the gap? --- src/mainview.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/mainview.cpp') diff --git a/src/mainview.cpp b/src/mainview.cpp index b34acc39..19e4aae7 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -679,6 +679,16 @@ void MainView::switchToTab() } +void MainView::loadFavorite(const int index) +{ + QStringList urls = ReKonfig::previewUrls(); + if (index < 0 || index > urls.length()) + return; + KUrl url = KUrl(urls.at(index-1)); + rApp->loadUrl(url); +} + + QLabel *MainView::animatedLoading(int index, bool addMovie) { if (index == -1) -- cgit v1.2.1