[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Mon Apr 11 07:55:31 CEST 2005
CVS commit by staikos:
make the config dialog work properly from the data wizard
M +13 -0 datawizard.ui.h 1.132
--- kdeextragear-2/kst/kst/datawizard.ui.h #1.131:1.132
@@ -898,4 +898,15 @@ void DataWizard::_enableWindowEntries()
void DataWizard::configureSource()
{
+ KST::dataSourceList.lock().readLock();
+ KstDataSourcePtr ds = *KST::dataSourceList.findFileName(_file);
+ KST::dataSourceList.lock().readUnlock();
+ if (!ds) {
+ ds = KstDataSource::loadSource(_file);
+ if (!ds || !ds->isValid()) {
+ _configureSource->setEnabled(false);
+ return;
+ }
+ }
+
assert(_configWidget);
KDialogBase *dlg = new KDialogBase(this, "Data Config Dialog", true, i18n("Configure Data Source"));
@@ -904,4 +915,5 @@ void DataWizard::configureSource()
_configWidget->reparent(dlg, QPoint(0, 0));
dlg->setMainWidget(_configWidget);
+ static_cast<KstDataSourceConfigWidget*>((QWidget*)_configWidget)->setInstance(ds);
static_cast<KstDataSourceConfigWidget*>((QWidget*)_configWidget)->load();
dlg->exec();
@@ -909,4 +921,5 @@ void DataWizard::configureSource()
dlg->setMainWidget(0L);
delete dlg;
+ sourceChanged(_url->url());
}
More information about the Kst
mailing list