diff options
author | Jeremy Katz <katzj@redhat.com> | 2004-11-11 17:05:48 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2004-11-11 17:05:48 +0000 |
commit | 20de3c4b1a02a7133a96f19e6c964a55175b2b45 (patch) | |
tree | aa40ef32fb5af6e2b083f6b9bb03cc3300fa7a3d /iw | |
parent | 409a6d2f2b725692f12bdf1274682847155f513d (diff) | |
download | anaconda-20de3c4b1a02a7133a96f19e6c964a55175b2b45.tar.gz anaconda-20de3c4b1a02a7133a96f19e6c964a55175b2b45.tar.xz anaconda-20de3c4b1a02a7133a96f19e6c964a55175b2b45.zip |
2004-11-11 Jeremy Katz <katzj@redhat.com>
* iw/partition_ui_helpers_gui.py (mountptchangeCB): Automatically
set the filesystem type to vfat if the user selects /boot/efi as
the mountpoint on ia64 (#138580)
* iw/datacombo.py (DataComboBox.set_active_text): Add convenience
method to set the active item based on text.
Diffstat (limited to 'iw')
-rw-r--r-- | iw/datacombo.py | 12 | ||||
-rw-r--r-- | iw/partition_ui_helpers_gui.py | 7 |
2 files changed, 18 insertions, 1 deletions
diff --git a/iw/datacombo.py b/iw/datacombo.py index e71e48e7d..abb7193f5 100644 --- a/iw/datacombo.py +++ b/iw/datacombo.py @@ -50,6 +50,16 @@ class DataComboBox(gtk.ComboBox): def get_text(self, row): return self.get_stored_data(row, col = 0) + def set_active_text(self, t): + n = 0 + i = self.store.get_iter(n) + while i is not None: + if self.store.get_value(i, 0) == t: + self.set_active(n) + break + i = self.store.iter_next(i) + n += 1 + def clear(self): self.store.clear() @@ -65,7 +75,7 @@ if __name__ == "__main__": cb.append("/dev/hda6", "hda6") cb.append("/dev/hda7", "hda7") cb.append("/dev/hda8", "hda8") - cb.set_active(0) + cb.set_active_text("/dev/hda7") cb.connect('changed', mycb) diff --git a/iw/partition_ui_helpers_gui.py b/iw/partition_ui_helpers_gui.py index 61eca1437..82aeb47da 100644 --- a/iw/partition_ui_helpers_gui.py +++ b/iw/partition_ui_helpers_gui.py @@ -18,6 +18,7 @@ import gobject import gtk import checklist import datacombo +import iutil from constants import * from fsset import * @@ -187,9 +188,15 @@ def createFSTypeMenu(fstype, fstypechangeCB, mountCombo, if mountCombo: mountCombo.set_data("prevmountable", fstypecombo.get_active_value().isMountable()) + mountCombo.connect("changed", mountptchangeCB, fstypecombo) return fstypecombo +def mountptchangeCB(widget, fstypecombo): + if iutil.getArch() == "ia64" and widget.get_children()[0].get_text() == "/boot/efi": + + fstypecombo.set_active_text("vfat") + def formatOptionCB(widget, data): (combowidget, mntptcombo, ofstype) = data combowidget.set_sensitive(widget.get_active()) |