diff options
author | matgic78 <matgic78@gmail.com> | 2009-12-31 11:07:24 +0100 |
---|---|---|
committer | matgic78 <matgic78@gmail.com> | 2010-02-06 11:22:46 +0100 |
commit | 8b26d07972db5a2953e64f61bf86e2e31959a32f (patch) | |
tree | 78755581a33f551136fffb2d6aa2917f084b4b6c /src/rekonqpage/newtabpage.cpp | |
parent | little changes (diff) | |
download | rekonq-8b26d07972db5a2953e64f61bf86e2e31959a32f.tar.xz |
fix bug : closed Tabs replaced favorites when loaded
Diffstat (limited to 'src/rekonqpage/newtabpage.cpp')
-rw-r--r-- | src/rekonqpage/newtabpage.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rekonqpage/newtabpage.cpp b/src/rekonqpage/newtabpage.cpp index c8b2e916..78928bca 100644 --- a/src/rekonqpage/newtabpage.cpp +++ b/src/rekonqpage/newtabpage.cpp @@ -53,6 +53,7 @@ NewTabPage::NewTabPage(QWebFrame *frame) : m_root(frame->documentElement()) + , m_url(KUrl()) { QString htmlFilePath = KStandardDirs::locate("data", "rekonq/htmls/home.html"); @@ -73,7 +74,7 @@ NewTabPage::~NewTabPage() } -void NewTabPage::generate(const KUrl &url) +void NewTabPage::generate(KUrl url) { if(KUrl("about:preview").isParentOf(url)) { @@ -106,6 +107,7 @@ void NewTabPage::generate(const KUrl &url) { favoritesPage(); title = i18n("Favorites"); + url = KUrl("about:favorites"); } else if(url == KUrl("about:closedTabs")) { @@ -123,6 +125,8 @@ void NewTabPage::generate(const KUrl &url) title = i18n("Bookmarks"); } + m_url = url; + m_root.document().findFirst("title").setPlainText(title); } @@ -236,6 +240,9 @@ void NewTabPage::snapFinished() QWebElement prev = m_root.findFirst("#preview" + snap->data().toString()); prev.replace(validPreview(snap->data().toInt(), snap->snapUrl(), snap->snapTitle())); + if(m_url != KUrl("about:favorites")) + return; + // Save the new config QStringList names = ReKonfig::previewNames(); QStringList urls = ReKonfig::previewUrls(); |