diff options
author | Martin Sivak <msivak@redhat.com> | 2008-07-15 15:25:32 +0200 |
---|---|---|
committer | Martin Sivak <msivak@redhat.com> | 2008-07-15 15:25:32 +0200 |
commit | 6a292f6309adfb39c56a9a0f1c697a70aad55555 (patch) | |
tree | 48ed3d938206fe80358c07cd757b6ec782c1b35d | |
parent | 9fbb5d9ca9026999c949035b535c0662694fb80b (diff) | |
download | anaconda-6a292f6309adfb39c56a9a0f1c697a70aad55555.tar.gz anaconda-6a292f6309adfb39c56a9a0f1c697a70aad55555.tar.xz anaconda-6a292f6309adfb39c56a9a0f1c697a70aad55555.zip |
Ask the user if he wants to use VNC instead of text mode (#453551)
-rwxr-xr-x | anaconda | 11 | ||||
-rw-r--r-- | vnc.py | 22 |
2 files changed, 24 insertions, 9 deletions
@@ -755,6 +755,17 @@ if __name__ == "__main__": opts.display_mode = 't' else: opts.display_mode = 'g' + + if opts.display_mode == 't': #we prefer vnc over text mode, so ask about that + title = _("Would you like to use VNC?") + message = _("The VNC mode installation offers more functionality than the text mode, would you like to use it instead?") + + ret = vnc.askVncWindow(title, message) + if ret != -1: + opts.display_mode = 'g' + flags.usevnc = 1 + if ret is not None: + vncpassword = ret if opts.debug: flags.debug = True @@ -335,13 +335,24 @@ class VncServer: continue continue -def askVncWindow(): +def askVncWindow(title = None, message = None): if not os.access('/usr/bin/Xvnc', os.X_OK): return -1 if not network.hasActiveNetDev(): return -1 + if not title: + title = _("Unable to Start X") + if not message: + message = _("X was unable to start on your " + "machine. Would you like to " + "start VNC to connect to " + "this computer from another " + "computer and perform a " + "graphical install or continue " + "with a text mode install?") + screen = SnackScreen() vncpass = None vncconnect = 0 @@ -352,14 +363,7 @@ def askVncWindow(): step = 0 while step < STEP_DONE: if step == STEP_MESSAGE: - button = ButtonChoiceWindow(screen, _("Unable to Start X"), - _("X was unable to start on your " - "machine. Would you like to " - "start VNC to connect to " - "this computer from another " - "computer and perform a " - "graphical install or continue " - "with a text mode install?"), + button = ButtonChoiceWindow(screen, title, message, buttons = [ _("Use text mode"), _("Start VNC") ]) |