From 6a292f6309adfb39c56a9a0f1c697a70aad55555 Mon Sep 17 00:00:00 2001 From: Martin Sivak Date: Tue, 15 Jul 2008 15:25:32 +0200 Subject: Ask the user if he wants to use VNC instead of text mode (#453551) --- anaconda | 11 +++++++++++ vnc.py | 22 +++++++++++++--------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/anaconda b/anaconda index 5d34a9673..09a110723 100755 --- a/anaconda +++ b/anaconda @@ -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 diff --git a/vnc.py b/vnc.py index 8b9ee4af6..0d86ed10f 100644 --- a/vnc.py +++ b/vnc.py @@ -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") ]) -- cgit