summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--iw/xconfig.py17
-rw-r--r--xf86config.py3
2 files changed, 18 insertions, 2 deletions
diff --git a/iw/xconfig.py b/iw/xconfig.py
index 0aa7f462a..4c97e2f4a 100644
--- a/iw/xconfig.py
+++ b/iw/xconfig.py
@@ -293,6 +293,17 @@ class XConfigWindow (InstallWindow):
clist.select_row (row, 0)
clist.moveto (row, 0, 0.5, 0.0)
+
+ def selectCb (self, list, row, col, event):
+ cardname = list.get_row_data (row)
+ if cardname:
+ card = self.cards[cardname]
+ depth = 0
+ while depth < 16 and card.has_key ("SEE"):
+ card = self.cards[card["SEE"]]
+ depth = depth + 1
+ self.todo.x.setVidcard (card)
+
def getScreen (self):
# Don't configure X in reconfig mode.
# in regular install, check to see if the XFree86 package is
@@ -360,11 +371,15 @@ class XConfigWindow (InstallWindow):
# card configuration
self.cardList = GtkCList ()
self.cardList.set_selection_mode (SELECTION_BROWSE)
- cards = self.todo.x.cards ().keys ()
+ self.cardList.connect ("select_row", self.selectCb)
+
+ self.cards = self.todo.x.cards ()
+ cards = self.cards.keys ()
cards.sort ()
select = 0
for card in cards:
row = self.cardList.append ((card,))
+ self.cardList.set_row_data (row, card)
if card == self.todo.x.vidCards[self.todo.x.primary]["NAME"]:
select = row
self.cardList.connect ("draw", self.moveto, select)
diff --git a/xf86config.py b/xf86config.py
index 31d65bd3c..df10fbeec 100644
--- a/xf86config.py
+++ b/xf86config.py
@@ -163,7 +163,8 @@ class XF86Config:
self.monVert = vrange
def setVidcard (self, card):
- self.vidCards.append (card)
+ self.vidCards = [card]
+ self.primary = 0
if self.vidCards:
self.devID = self.vidCards[self.primary]["NAME"]