Do not allow device link creation/modification if no device is specified

This relates to Bug 2076
pull/16/head
Timothy Pearson 10 years ago
parent 5a3c9e4641
commit e3db584672

@ -2925,6 +2925,8 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
i18n("Device:") ); // new style (combobox)
layout->addWidget(label, 0, 0);
// RAJA FIXME
// Disable the OK button if no device is selected!
device = new TQComboBox( true, d->m_frame, "ComboBox_device" );
device->insertStringList( devices );
layout->addWidget(device, 0, 1);
@ -3032,6 +3034,8 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
connect( device, TQT_SIGNAL( textChanged( const TQString & ) ),
this, TQT_SLOT( slotDeviceChanged() ) );
processLockouts();
}
KDevicePropsPlugin::~KDevicePropsPlugin()
@ -3044,6 +3048,18 @@ KDevicePropsPlugin::~KDevicePropsPlugin()
// return i18n ("De&vice");
// }
void KDevicePropsPlugin::processLockouts()
{
if (device->currentText().stripWhiteSpace() != "")
{
properties->enableButtonOK(true);
}
else
{
properties->enableButtonOK(false);
}
}
void KDevicePropsPlugin::updateInfo()
{
// we show it in the slot when we know the values
@ -3061,6 +3077,8 @@ void KDevicePropsPlugin::updateInfo()
job->readDF( mountpoint->text() );
}
processLockouts();
}
void KDevicePropsPlugin::slotActivated( int index )

@ -740,6 +740,7 @@ private slots:
private:
void updateInfo();
void processLockouts();
private:
TQComboBox* device;

Loading…
Cancel
Save