From e261f974f77d8f12ddcdce8b7511a18952f449f8 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Mon, 19 Oct 2009 17:06:29 +0200 Subject: Saving preferences --- src/previewimage.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') 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(); } -- cgit v1.2.1