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

This relates to Bug 2076
(cherry picked from commit e3db584672)
v3.5.13-sru
Timothy Pearson 10 years ago committed by Slávek Banko
parent 9a335db701
commit 909773f4a4

@ -3032,6 +3032,8 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
connect( device, TQT_SIGNAL( textChanged( const TQString & ) ), connect( device, TQT_SIGNAL( textChanged( const TQString & ) ),
this, TQT_SLOT( slotDeviceChanged() ) ); this, TQT_SLOT( slotDeviceChanged() ) );
processLockouts();
} }
KDevicePropsPlugin::~KDevicePropsPlugin() KDevicePropsPlugin::~KDevicePropsPlugin()
@ -3044,6 +3046,18 @@ KDevicePropsPlugin::~KDevicePropsPlugin()
// return i18n ("De&vice"); // return i18n ("De&vice");
// } // }
void KDevicePropsPlugin::processLockouts()
{
if (device->currentText().stripWhiteSpace() != "")
{
properties->enableButtonOK(true);
}
else
{
properties->enableButtonOK(false);
}
}
void KDevicePropsPlugin::updateInfo() void KDevicePropsPlugin::updateInfo()
{ {
// we show it in the slot when we know the values // we show it in the slot when we know the values
@ -3061,6 +3075,8 @@ void KDevicePropsPlugin::updateInfo()
job->readDF( mountpoint->text() ); job->readDF( mountpoint->text() );
} }
processLockouts();
} }
void KDevicePropsPlugin::slotActivated( int index ) void KDevicePropsPlugin::slotActivated( int index )

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

Loading…
Cancel
Save