diff options
author | Matt Wilson <msw@redhat.com> | 1999-09-25 19:31:54 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-09-25 19:31:54 +0000 |
commit | b256de13e47ff731c99a940750bf440428577814 (patch) | |
tree | 1d85f3773535c2a27e35b7d2aedb82019b31bcc8 /xf86config.py | |
parent | cd2f5a889704ab197c5d44ee9bc81d7a78e60ab0 (diff) | |
download | anaconda-b256de13e47ff731c99a940750bf440428577814.tar.gz anaconda-b256de13e47ff731c99a940750bf440428577814.tar.xz anaconda-b256de13e47ff731c99a940750bf440428577814.zip |
more fixes.
Diffstat (limited to 'xf86config.py')
-rw-r--r-- | xf86config.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/xf86config.py b/xf86config.py index 5178590c6..07efc0d02 100644 --- a/xf86config.py +++ b/xf86config.py @@ -33,8 +33,9 @@ class XF86Config: self.keyLayout = "us" self.keyVariant = "" self.keyOptions = "" - + def setKeyboard (self, rules, model, layout, variant, options): + print self, rules, model, layout, variant, options self.keyRules = rules self.keyModel = model self.keyLayout = layout @@ -381,7 +382,7 @@ EndSection """ % self.mouse def keyboardSection (self): - return """ + string = """ # ********************************************************************** # Keyboard section # ********************************************************************** @@ -430,15 +431,16 @@ Section "Keyboard" # If you'd like to switch the positions of your capslock and # control keys, use: # XkbOptions "ctrl:nocaps" - - XkbRules "%s" - XkbModel "%s" - XkbLayout "%s" - XkbVariant "%s" - XkbOptions "%s" -EndSection -""" % (self.keyRules, self.keyModel, self.keyLayout, self.keyVariant, self.keyOptions) - +""" + for (tag, value) in (("XkbRules", self.keyRules), + ("XkbModel", self.keyModel), + ("XkbLayout", self.keyLayout), + ("XkbVariant", self.keyVariant), + ("XkbOptions", self.keyOptions)): + if value: + string = string + ' %s "%s"\n' % (tag, value) + string = string + "EndSection\n" + return string def monitorSection (self): info = {} |