diff options
Diffstat (limited to 'tdeio/tdefile/kpropertiesdialog.cpp')
-rw-r--r-- | tdeio/tdefile/kpropertiesdialog.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tdeio/tdefile/kpropertiesdialog.cpp b/tdeio/tdefile/kpropertiesdialog.cpp index db2e8af0c..fdd72884e 100644 --- a/tdeio/tdefile/kpropertiesdialog.cpp +++ b/tdeio/tdefile/kpropertiesdialog.cpp @@ -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 ) |