Commit 29c9fc1d authored by Nate Graham's avatar Nate Graham
Browse files

Enable and disable UI controls properly based on sharing status

Summary:
When a folder isn't shared, all of the UI controls that depend on it being shared
should be disabled.

BUG: 407500
FIXED-IN: 19.04.1

Test Plan: {F6828673, size=full, loop=true, autoplay=true}

Reviewers: #vdg, filipf

Reviewed By: #vdg, filipf

Differential Revision: https://phabricator.kde.org/D21253
parent 105896cd
......@@ -238,10 +238,13 @@ void SambaUserSharePlugin::applyChanges()
void SambaUserSharePlugin::toggleShareStatus(bool checked)
{
propertiesUi.sambaNameEdit->setEnabled(checked);
propertiesUi.sambaAllowGuestChk->setCheckable(checked);
propertiesUi.sambaNameEdit->setEnabled(checked);
propertiesUi.sambaAllowGuestChk->setEnabled(checked);
propertiesUi.tableView->setEnabled(checked);
if (checked && propertiesUi.sambaNameEdit->text().isEmpty()) {
propertiesUi.sambaNameEdit->setText(getNewShareName());
} else {
propertiesUi.sambaNameEdit->setText(QString());
}
}
......
......@@ -32,6 +32,9 @@
</property>
<item row="0" column="0">
<widget class="QLabel" name="textLabel1">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Name:</string>
</property>
......@@ -50,7 +53,7 @@
<item>
<widget class="QCheckBox" name="sambaAllowGuestChk">
<property name="enabled">
<bool>true</bool>
<bool>false</bool>
</property>
<property name="text">
<string>Allow Guests</string>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment