summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tdeio/tdefile/kpropertiesdialog.cpp18
-rw-r--r--tdeio/tdefile/kpropertiesdialog.h1
2 files changed, 19 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 )
diff --git a/tdeio/tdefile/kpropertiesdialog.h b/tdeio/tdefile/kpropertiesdialog.h
index c67659ba7..2ff0c576d 100644
--- a/tdeio/tdefile/kpropertiesdialog.h
+++ b/tdeio/tdefile/kpropertiesdialog.h
@@ -740,6 +740,7 @@ private slots:
private:
void updateInfo();
+ void processLockouts();
private:
TQComboBox* device;