Merge branch 'master' of git://anongit.kde.org/kdelibs

This commit is contained in:
Marco Martin 2011-02-01 19:27:06 +01:00
commit aeb6408fad

View File

@ -1857,7 +1857,6 @@ void Applet::showConfigurationInterface()
d->script->showConfigurationInterface();
} else {
KConfigDialog *dialog = d->generateGenericConfigDialog();
//createConfigurationInterface(dialog);
d->addStandardConfigurationPages(dialog);
showConfigurationInterface(dialog);
}
@ -1922,8 +1921,6 @@ KConfigDialog *AppletPrivate::generateGenericConfigDialog()
dialog->setWindowTitle(configWindowTitle());
dialog->setAttribute(Qt::WA_DeleteOnClose, true);
q->createConfigurationInterface(dialog);
//TODO: Apply button does not correctly work for now, so do not show it
dialog->showButton(KDialog::Apply, false);
dialog->showButton(KDialog::Default, false);
QObject::connect(dialog, SIGNAL(applyClicked()), q, SLOT(configDialogFinished()));
QObject::connect(dialog, SIGNAL(okClicked()), q, SLOT(configDialogFinished()));
@ -1956,8 +1953,6 @@ void AppletPrivate::addGlobalShortcutsPage(KConfigDialog *dialog)
layout->addStretch();
dialog->addPage(page, i18n("Keyboard Shortcut"), "preferences-desktop-keyboard");
//TODO: Apply button does not correctly work for now, so do not show it
dialog->showButton(KDialog::Apply, false);
QObject::connect(dialog, SIGNAL(applyClicked()), q, SLOT(configDialogFinished()), Qt::UniqueConnection);
QObject::connect(dialog, SIGNAL(okClicked()), q, SLOT(configDialogFinished()), Qt::UniqueConnection);
}
@ -2041,6 +2036,9 @@ void AppletPrivate::configDialogFinished()
if (!configLoader) {
// the config loader will trigger this for us, so we don't need to.
q->configChanged();
if (KConfigDialog *dialog = qobject_cast<KConfigDialog *>(q->sender())) {
dialog->enableButton(KDialog::Apply, false);
}
}
}