summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-19 17:06:29 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-10-19 17:06:29 +0200
commite261f974f77d8f12ddcdce8b7511a18952f449f8 (patch)
tree0f700139e92d48fa8d4ad6b219e7ff5cec711ba3
parentcheck title length fix (diff)
downloadrekonq-e261f974f77d8f12ddcdce8b7511a18952f449f8.tar.xz
Saving preferences
-rw-r--r--src/previewimage.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/previewimage.cpp b/src/previewimage.cpp
index b90a4720..e7f8aea5 100644
--- a/src/previewimage.cpp
+++ b/src/previewimage.cpp
@@ -299,6 +299,7 @@ void PreviewImage::setUrlFromAction()
m_url = KUrl(urlData.at(0));
m_title = urlData.at(1);
+ checkTitle();
if(m_button)
{
@@ -307,6 +308,20 @@ void PreviewImage::setUrlFromAction()
m_button->deleteLater();
}
loadUrlPreview(m_url);
+
+ // Update title
+ QStringList names = ReKonfig::previewNames();
+ // update url (for added thumbs)
+ QStringList urls = ReKonfig::previewUrls();
+
+ // stripTrailingSlash to be sure to get the same string for same adress
+ urls.replace(m_index, m_url.toString(QUrl::StripTrailingSlash));
+ names.replace(m_index, m_title);
+
+ ReKonfig::setPreviewNames(names);
+ ReKonfig::setPreviewUrls(urls);
+
+ ReKonfig::self()->writeConfig();
}