diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-07-24 10:41:53 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-12-23 02:22:44 +0100 |
commit | 909773f4a46197e655d63910d3f04546403cde9a (patch) | |
tree | 13bef07de63bb740b4373f5b88e4ddd38ffc5091 | |
parent | 9a335db701c9170e20284c5d62404b4bb5f49a37 (diff) | |
download | tdelibs-909773f4a46197e655d63910d3f04546403cde9a.tar.gz tdelibs-909773f4a46197e655d63910d3f04546403cde9a.zip |
Do not allow device link creation/modification if no device is specified
This relates to Bug 2076
(cherry picked from commit e3db584672f9ec310836dada13c4ae58f3f5c3a7)
-rw-r--r-- | kio/kfile/kpropertiesdialog.cpp | 16 | ||||
-rw-r--r-- | kio/kfile/kpropertiesdialog.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp index f3a20ab88..29eee9c34 100644 --- a/kio/kfile/kpropertiesdialog.cpp +++ b/kio/kfile/kpropertiesdialog.cpp @@ -3032,6 +3032,8 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP connect( device, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotDeviceChanged() ) ); + + processLockouts(); } KDevicePropsPlugin::~KDevicePropsPlugin() @@ -3044,6 +3046,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 +3075,8 @@ void KDevicePropsPlugin::updateInfo() job->readDF( mountpoint->text() ); } + + processLockouts(); } void KDevicePropsPlugin::slotActivated( int index ) diff --git a/kio/kfile/kpropertiesdialog.h b/kio/kfile/kpropertiesdialog.h index 4243bf602..fa0abec1c 100644 --- a/kio/kfile/kpropertiesdialog.h +++ b/kio/kfile/kpropertiesdialog.h @@ -740,6 +740,7 @@ private slots: private: void updateInfo(); + void processLockouts(); private: TQComboBox* device; |