summaryrefslogtreecommitdiff
path: root/src/settings/settingsdialog.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-11-21 01:58:23 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-11-21 01:58:23 +0100
commit20a3df6c7d64d845009acc94ead1ddfbec4c413d (patch)
treeef36895b460d572f53c9dfa513a827c50575c9ce /src/settings/settingsdialog.cpp
parentAdBlock, first file (and first UI. Probably not last :) (diff)
downloadrekonq-20a3df6c7d64d845009acc94ead1ddfbec4c413d.tar.xz
A new kcmshell named "webkit adblock" to set... (guess what?!)
First bits work, seems enough for this evening
Diffstat (limited to 'src/settings/settingsdialog.cpp')
-rw-r--r--src/settings/settingsdialog.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/settings/settingsdialog.cpp b/src/settings/settingsdialog.cpp
index 1db38b96..1dde1196 100644
--- a/src/settings/settingsdialog.cpp
+++ b/src/settings/settingsdialog.cpp
@@ -70,6 +70,7 @@ private:
KCModuleProxy *ebrowsingModule;
KCModuleProxy *cookiesModule;
KCModuleProxy *cacheModule;
+ KCModuleProxy *adblockModule;
KShortcutsEditor *shortcutsEditor;
Private(SettingsDialog *parent);
@@ -124,6 +125,11 @@ Private::Private(SettingsDialog *parent)
KIcon webkitIcon = KIcon(QIcon(webkitIconPath));
pageItem->setIcon(webkitIcon);
+ KCModuleInfo adblockInfo("webkitAdblock.desktop");
+ adblockModule = new KCModuleProxy(adblockInfo,parent);
+ pageItem = parent->addPage(adblockModule, i18n(adblockInfo.moduleName().toLocal8Bit()));
+ pageItem->setIcon(KIcon(adblockInfo.icon()));
+
shortcutsEditor = new KShortcutsEditor(Application::instance()->mainWindow()->actionCollection(), parent);
pageItem = parent->addPage(shortcutsEditor , i18n("Shortcuts"));
pageItem->setIcon(KIcon("configure-shortcuts"));
@@ -133,7 +139,9 @@ Private::Private(SettingsDialog *parent)
pageItem = parent->addPage(ebrowsingModule, i18n(ebrowsingInfo.moduleName().toLocal8Bit()));
pageItem->setIcon(KIcon(ebrowsingInfo.icon()));
- parent->setMinimumSize(700,500);
+ // WARNING remember wheh changing here that the smaller netbooks
+ // have a 1024x576 resolution. So DONT bother that limits!!
+ parent->setMinimumSize(700,525);
}
@@ -144,22 +152,20 @@ SettingsDialog::SettingsDialog(QWidget *parent)
: KConfigDialog(parent, "rekonfig", ReKonfig::self())
, d(new Private(this))
{
- setFaceType(KPageDialog::Tree);
- showButtonSeparator(true);
-
- setWindowTitle(i18n("rekonfig..."));
+ showButtonSeparator(false);
+ setWindowTitle(i18n("Configure - rekonq"));
setModal(true);
readConfig();
-
connect(d->generalUi.setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
connect(d->ebrowsingModule, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
connect(d->cookiesModule, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
connect(d->proxyModule, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
connect(d->cacheModule, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
-
+ connect(d->adblockModule, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
+
connect(d->shortcutsEditor, SIGNAL(keyChange()), this, SLOT(updateButtons()));
connect(this, SIGNAL(applyClicked()), this, SLOT(saveSettings()));
@@ -209,6 +215,7 @@ void SettingsDialog::saveSettings()
d->proxyModule->save();
d->cacheModule->save();
d->shortcutsEditor->save();
+ d->adblockModule->save();
}
@@ -219,6 +226,7 @@ bool SettingsDialog::hasChanged()
|| d->cookiesModule->changed()
|| d->proxyModule->changed()
|| d->cacheModule->changed()
+ || d->adblockModule->changed()
|| d->shortcutsEditor->isModified();
;
}