diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-25 00:12:10 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-25 00:12:10 +0200 |
commit | df884995df935d128f1809512a24cd436e5f985f (patch) | |
tree | 1ac954f38b6dd341934362f3336784c7a54ddfca /src/settings.cpp | |
parent | Home page translations (diff) | |
download | rekonq-df884995df935d128f1809512a24cd436e5f985f.tar.xz |
Removing thumbs files on tableWidget changes && removing some
unuseful kWarning..
Diffstat (limited to 'src/settings.cpp')
-rw-r--r-- | src/settings.cpp | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/settings.cpp b/src/settings.cpp index de15708a..3264ba05 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -115,7 +115,6 @@ Private::Private(SettingsDialog *parent) widget->layout()->setMargin(0); pageItem = parent->addPage(widget , i18n("WebKit")); QString webkitIconPath = KStandardDirs::locate("appdata", "pics/webkit-icon.png"); - kWarning() << webkitIconPath; KIcon webkitIcon = KIcon(QIcon(webkitIconPath)); pageItem->setIcon(webkitIcon); @@ -149,6 +148,8 @@ SettingsDialog::SettingsDialog(QWidget *parent) connect(d->generalUi.setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage())); + connect(d->newtabpageUi.tableWidget, SIGNAL(cellChanged(int, int)), this, SLOT(deleteThumb(int,int))); + connect(d->ebrowsingModule, SIGNAL(changed(bool)), this, SLOT(updateButtons())); connect(d->cookiesModule, SIGNAL(changed(bool)), this, SLOT(updateButtons())); @@ -232,11 +233,10 @@ void SettingsDialog::saveSettings() QStringList names, urls; for(int i=0; i<9; ++i) { - if(t->item(i,0)) - { + if(t->item(i,0) && !t->item(i,0)->text().isEmpty()) names << t->item(i,0)->text(); + if(t->item(i,1)&& !t->item(i,1)->text().isEmpty()) urls << t->item(i,1)->text(); - } } ReKonfig::setPreviewNames(names); @@ -268,3 +268,14 @@ void SettingsDialog::setHomeToCurrentPage() d->generalUi.kcfg_homePage->setText(webView->url().prettyUrl()); } } + + +void SettingsDialog::deleteThumb(int row ,int col) +{ + if(col!=1) + return; + + QString path = KStandardDirs::locateLocal("cache", QString("thumbs/rek") + QString::number(row) + ".png", true); + QFile::remove(path); +} + |