summaryrefslogtreecommitdiffstats
path: root/mouse.py
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 /mouse.py
parented57fd2d0d8d97a4a96040f680dbf3aff97c48e7 (diff)
downloadanaconda-0d5a71d71d1006be856638fd26309aa08308d798.tar.gz
anaconda-0d5a71d71d1006be856638fd26309aa08308d798.tar.xz
anaconda-0d5a71d71d1006be856638fd26309aa08308d798.zip
prompt for mouse if not detected
Diffstat (limited to 'mouse.py')
-rw-r--r--mouse.py51
1 files changed, 51 insertions, 0 deletions
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