class DataComboBox(gtk.ComboBox):
- """A class derived from gtk.ComboBox to allow setting a user visible
- string and (not-visible) data string"""
+ """ A class derived from gtk.ComboBox to allow setting a user visible string
+ and (not-visible) data object.
+ """
def __init__(self, store = None):
if store is None:
- self.store = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
+ self.store = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_PYOBJECT)
else:
self.store = store
gtk.ComboBox.__init__(self, self.store)
@@ -80,10 +81,11 @@ if __name__ == "__main__":
def mycb(widget, *args):
idx = widget.get_active()
print(idx, widget.get_stored_data(idx), widget.get_text(idx))
-
+
win = gtk.Window()
actualPE = []
for curpe in lvm.getPossiblePhysicalExtents(floor=1024):
diff --git a/pyanaconda/iw/osbootwidget.py b/pyanaconda/iw/osbootwidget.py
index 9fc3dbd..1b18070 100644
--- a/pyanaconda/iw/osbootwidget.py
+++ b/pyanaconda/iw/osbootwidget.py
@@ -163,7 +163,8 @@ class OSBootWidget:
parts.append(part)
- deviceCombo = datacombo.DataComboBox()
+ store = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_STRING)
+ deviceCombo = datacombo.DataComboBox(store)
defindex = 0
i = 0
for part in parts:
@@ -174,7 +175,7 @@ class OSBootWidget: