From f7d0c1e847801b2ba303e6a0b60545779948fbbf Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 28 Apr 2009 03:40:54 +0200 Subject: Importing some reverted changes --- src/application.cpp | 4 ++-- src/application.h | 2 +- src/bookmarks.cpp | 11 +++++++++++ src/bookmarks.h | 7 +++++++ src/main.cpp | 5 +++++ 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/application.cpp b/src/application.cpp index eee803bc..b932203f 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -147,9 +147,9 @@ MainWindow *Application::mainWindow() } -WebView *Application::newWebView() +WebView *Application::newWebView(bool makeCurrent) { - return m_mainWindow->mainView()->newWebView(); + return m_mainWindow->mainView()->newWebView(makeCurrent); } diff --git a/src/application.h b/src/application.h index 98b213a3..234ed8e9 100644 --- a/src/application.h +++ b/src/application.h @@ -62,7 +62,7 @@ public: static Application *instance(); MainWindow *mainWindow(); - WebView* newWebView(); + WebView* newWebView(bool makeCurrent = true); KIcon icon(const KUrl &url) const; diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp index 568759a8..0b0f69bf 100644 --- a/src/bookmarks.cpp +++ b/src/bookmarks.cpp @@ -78,6 +78,17 @@ QString BookmarkOwner::currentTitle() const } +void BookmarkOwner::openFolderinTabs(const KBookmarkGroup &bm) +{ + QList urlList = bm.groupUrlList(); + QList::iterator url; + for(url = urlList.begin(); url != urlList.end(); ++url) + { + Application::instance()->newWebView()->loadUrl(*url); + } +} + + // ------------------------------------------------------------------------------------------------------ diff --git a/src/bookmarks.h b/src/bookmarks.h index 5ac1270d..e7875745 100644 --- a/src/bookmarks.h +++ b/src/bookmarks.h @@ -95,6 +95,13 @@ public: */ virtual bool supportsTabs() const { return true; } + /** + * Called if the user wants to open every bookmark in this folder in a new tab. + * The default implementation does nothing. + * This is only called if supportsTabs() returns true + */ + virtual void openFolderinTabs(const KBookmarkGroup &bm); + signals: /** * This signal is emitted when an url has to be loaded diff --git a/src/main.cpp b/src/main.cpp index d5e7c33b..80d94627 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -52,6 +52,11 @@ int main(int argc, char **argv) "adjam7@gmail.com", "http://www.adjam.org"); + about.addAuthor(ki18n("Domrachev Alexandr"), + ki18n("Developer, Russian translations"), + "alexandr.domrachev@gmail.com", + ""); + // about.addAuthor(ki18n("your name"), // ki18n("your role"), // "your mail", -- cgit v1.2.1