Created
June 22, 2016 10:16
-
-
Save M4rtinK/7a6cdd4e0cb5d42537f5c1dbc3f874a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commit 5c7bc08b689807cd9a4269e8950ac89ade6567a2 | |
| Author: David Shea <[email protected]> | |
| Date: Tue Jun 7 14:59:17 2016 -0400 | |
| Fix the name sensitivity in the custom spoke. | |
| 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. | |
| (cherry picked from commit ac832a104209acad425e706c57ebc81ae5716749) | |
| Resolves: rhbz#1316269 | |
| diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py | |
| index af9e88c..209e735 100644 | |
| --- a/pyanaconda/ui/gui/spokes/custom.py | |
| +++ b/pyanaconda/ui/gui/spokes/custom.py | |
| @@ -1451,8 +1451,14 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): | |
| 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, use_dev, 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) | |
| @@ -1486,7 +1492,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker): | |
| 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) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment