summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-08-03 20:48:05 +0000
committerMike Fulbright <msf@redhat.com>2001-08-03 20:48:05 +0000
commit0d5a71d71d1006be856638fd26309aa08308d798 (patch)
tree552f35c9dc8b19dffc2524e2de44d81bd2f031e1
parented57fd2d0d8d97a4a96040f680dbf3aff97c48e7 (diff)
downloadanaconda-0d5a71d71d1006be856638fd26309aa08308d798.tar.gz
anaconda-0d5a71d71d1006be856638fd26309aa08308d798.tar.xz
anaconda-0d5a71d71d1006be856638fd26309aa08308d798.zip
prompt for mouse if not detected
-rwxr-xr-xanaconda13
-rw-r--r--mouse.py51
2 files changed, 60 insertions, 4 deletions
diff --git a/anaconda b/anaconda
index d50b740ba..9745e274f 100755
--- a/anaconda
+++ b/anaconda
@@ -410,10 +410,15 @@ if (display_mode != 't' and method and
# if no mouse we force text mode
mousedev = mousehw.get()
if display_mode != 't' and mousedev[0] == "None - None":
- print _("No mouse was detected. A mouse is required for graphical "
- "installation. Starting text mode.")
- display_mode = 't'
- time.sleep(2)
+ # ask for the mouse type
+ if mouse.mouseWindow(mousehw) == 0:
+ print _("No mouse was detected. A mouse is required for graphical "
+ "installation. Starting text mode.")
+ display_mode = 't'
+ time.sleep(2)
+ else:
+ sys.stdout.write(_("Using mouse type: "))
+ sys.stdout.write(mousehw.shortDescription()+'\n')
#
# startup X server is we're not already running under an X session
diff --git a/mouse.py b/mouse.py
index 8faa88d39..7fab5feb1 100644
--- a/mouse.py
+++ b/mouse.py
@@ -253,3 +253,54 @@ class Mouse (SimpleConfigFile):
args.append("--emulthree")
return args
+
+
+# maybe doesnt belong here - just ask user what mouse they have on
+# startup if kudzu didn't find one
+def mouseWindow(mouse):
+ from snack import *
+ from mouse_text import MouseWindow, MouseDeviceWindow
+ from constants_text import INSTALL_BACK, INSTALL_OK
+ screen = SnackScreen()
+
+ STEP_MESSAGE = 0
+ STEP_TYPE = 1
+ STEP_DEVICE = 2
+ STEP_DONE = 3
+ step = 0
+ while step < STEP_DONE:
+ if step == STEP_MESSAGE:
+ button = ButtonChoiceWindow(screen, _("Mouse Not Detected"),
+ _("Your mouse was not automatically "
+ "detected. To proceed in the graphical "
+ "installation mode, please proceed to "
+ "the next screen and provide your mouse "
+ "information. You may also use text mode "
+ "installation which does not require a mouse."),
+ buttons = [ _("OK"), _("Use text mode") ])
+ if button == string.lower (_("Use text mode")):
+ screen.finish ()
+ return 0
+ else:
+ step = STEP_TYPE
+ continue
+
+ if step == STEP_TYPE:
+ rc = MouseWindow()(screen, mouse)
+ if rc == INSTALL_BACK:
+ step = STEP_MESSAGE
+ continue
+ else:
+ step = STEP_DEVICE
+ continue
+
+ if step == STEP_DEVICE:
+ rc = MouseDeviceWindow()(screen, mouse)
+ if rc == INSTALL_BACK:
+ step = STEP_TYPE
+ continue
+ else:
+ step = STEP_DONE
+ continue
+ screen.finish()
+ return 1