Skip to content

Commit

Permalink
Fix the name sensitivity in the custom spoke.
Browse files Browse the repository at this point in the history
When switching from an existing device to a non-existing device of the
same type, the sensitivity of the "Name" field was not being updated.
Add an extra call to the combo box change signal handler to handle this
case.
  • Loading branch information
dashea committed Jun 7, 2016
1 parent 51f45d5 commit 92662b3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pyanaconda/ui/gui/spokes/custom.py
Expand Up @@ -1552,8 +1552,14 @@ def _populate_right_side(self, selector):
self._setup_fstype_combo(device)

# Set up the device type combo.
orig_device_type = self._get_current_device_type()
device_type = self._setup_device_type_combo(device, device_name)

# If the device type did not change, run the signal handler anyway
# to update widgets for the new device
if orig_device_type == device_type:
self.on_device_type_changed(self._typeCombo)

fancy_set_sensitive(self._fsCombo, self._reformatCheckbox.get_active() and
device_type != DEVICE_TYPE_BTRFS)

Expand Down Expand Up @@ -1586,7 +1592,8 @@ def _populate_right_side(self, selector):

self._populate_raid(get_raid_level(device))
self._populate_container(device=use_dev)
# do this last in case this was set sensitive in on_device_type_changed

# do this last to override the decision made by on_device_type_changed if necessary
if use_dev.exists or use_dev.type == "btrfs volume":
fancy_set_sensitive(self._nameEntry, False)

Expand Down

0 comments on commit 92662b3

Please sign in to comment.