diff options
author | Matt Wilson <msw@redhat.com> | 1999-09-02 01:33:54 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-09-02 01:33:54 +0000 |
commit | d80189d749140241d825a3977949e076219c3ee0 (patch) | |
tree | 2d2aeeeb95b1add19bbde02e66120452c9c6b9cf /text.py | |
parent | b532b05e1e9190c58859322bf445d212596585f8 (diff) | |
download | anaconda-d80189d749140241d825a3977949e076219c3ee0.tar.gz anaconda-d80189d749140241d825a3977949e076219c3ee0.tar.xz anaconda-d80189d749140241d825a3977949e076219c3ee0.zip |
x configuration
Diffstat (limited to 'text.py')
-rw-r--r-- | text.py | 82 |
1 files changed, 76 insertions, 6 deletions
@@ -1115,15 +1115,84 @@ class XConfigWindow: def __call__(self, screen, todo): todo.x.probe () - rc = ButtonChoiceWindow (screen, _("X probe results"), - todo.x.probeReport (), - buttons = [ _("OK"), _("Back") ]) + if todo.x.server: + rc = ButtonChoiceWindow (screen, _("X probe results"), + todo.x.probeReport (), + buttons = [ _("OK"), _("Back") ]) - if rc == string.lower (_("Back")): - return INSTALL_BACK - return INSTALL_OK + if rc == string.lower (_("Back")): + return INSTALL_BACK + return INSTALL_OK + else: + # if we didn't find a server, we need the user to choose... + carddb = todo.x.cards() + cards = carddb.keys () + cards.sort () + cards.append (_("Unlisted Card")) + + servers = [ "Mono", "VGA16", "SVGA", "S3", "Mach32", "Mach8", "8514", "P9000", "AGX", + "W32", "W32", "Mach64", "I128", "S3V", "3DLabs" ] + server = None + + rc = INSTALL_NOOP + while rc != INSTALL_OK: + (rc, choice) = ListboxChoiceWindow(screen, _("Video Card Selection"), + _("Which video card do you have?"), + cards, + buttons = [_("OK"), _("Back")], + width = 70, scroll = 1, + height = screen.height - 14) + if rc == string.lower (_("Back")): + return INSTALL_BACK + + todo._cardindex = -1 + + if cards[choice] == _("Unlisted Card"): + (rc , choice) = \ + ListboxChoiceWindow(screen, _("X Server Selection"), _("Choose a server"), + servers, + buttons = [ (_("Ok"), "ok"), (_("Back"), "back") ], + scroll = 1, + height = screen.height - 14) + + if (rc == "back"): + rc = INSTALL_BACK + else: + rc = INSTALL_OK + server = servers[choice] + else: + todo._cardindex = choice + rc = INSTALL_OK + if server: + todo.x.setVidcard ( { "NAME" : "Generic " + server, + "SERVER" : server } ) + else: + card = carddb[cards[choice]] + if card.has_key ("SEE"): + card = carddb[card["SEE"]] + + todo.x.setVidcard (card) + + return INSTALL_OK + + +class XconfiguratorWindow: + def __call__ (self, screen, todo): + if not todo.x.server: return INSTALL_NOOP + + f = open (todo.instPath + "/tmp/SERVER") + f.write ("%s %d\n", (todo.x.server, todo._cardindex)) + f.close () + + screen.suspend () + iutil.execWithRedirect ("/usr/X11R6/bin/Xconfigurator", + ["xconfigurator", "--contine"], + root = todo.instPath) + screen.resume () + return INSTALL_NOOP + class BeginInstallWindow: def __call__ (self, screen, todo): rc = ButtonChoiceWindow (screen, _("Installation to begin"), @@ -1479,6 +1548,7 @@ class InstallInterface: (self.screen, todo), "begininstall" ], [_("Install System"), InstallWindow, (self.screen, todo) ], [_("Bootdisk"), BootdiskWindow, (self.screen, todo), "bootdisk"], + [_("X Configuration"), XconfiguratorWindow, (self.screen, todo), "bootdisk"], [_("Installation Complete"), FinishedWindow, (self.screen,), "complete" ] ] |