Fix disk vars and resolutions

master3.3
Mike Hiretsky 12 years ago
parent ad398eef03
commit 72f2cf8f7b

@ -52,13 +52,20 @@ class ResolutionVariable(VideoVariable):
"""
Abstract resolution variable
"""
fbres = False
def choice(self):
return ["800x600", "800x480", "640x480", "2560x1600", "2560x1440",
"2048x1152", "1920x1200", "1920x1080", "1680x945", "1680x1050",
"1600x900", "1600x768", "1600x1200", "1440x900", "1400x1050",
"1368x768", "1366x768", "1360x768", "1280x800", "1280x768",
"1280x720", "1280x1024", "1200x800", "1024x600", "1024x576",
"1024x768"]
resolutions = ["800x600", "800x480", "640x480", "2560x1600",
"2560x1440", "2048x1152", "1920x1200", "1920x1080",
"1680x945", "1680x1050", "1600x900", "1600x768",
"1600x1200", "1440x900", "1400x1050", "1368x768",
"1366x768", "1360x768", "1280x800", "1280x768",
"1280x720", "1280x1024", "1200x800", "1024x600",
"1024x576", "1024x768"]
if self.fbres:
return map(lambda x:"%s-32"%x,
resolutions)
else:
return resolutions
def check(self,value):
"""
@ -185,6 +192,7 @@ class VariableOsInstallFbResolution(ResolutionVariable):
opt = ['--fb']
metavalue = "<width>x<height>"
xorg_need = False
fbres = True
def init(self):
self.help = _("set framebuffer resolution")
@ -205,7 +213,7 @@ class VariableOsInstallFbResolution(ResolutionVariable):
[cxfb,cyfb,cxx11,cyx11])and \
int(cxx11) >= int(cxfb) and int(cyx11) >= int(cyfb):
resolution = "%s-32"%textLines[0]
return resolution or "1024x768-32@60"
return resolution or "1024x768-32"
class VariableOsInstallX11ServerSet(ReadonlyVariable):
"""

@ -115,6 +115,7 @@ class VariableOsDeviceDev(ReadonlyVariable,DeviceHelper):
res = os.read(self.master,65535)
self.parent.Invalidate(self.name)
self.parent.Invalidate('os_install_disk_uuid')
self.parent.Invalidate('os_disk_dev')
except OSError as e:
pass
@ -1058,8 +1059,9 @@ class VariableOsInstallDiskOptions(ReadonlyVariable):
def get(self):
"""TODO: get real options"""
diskOpts = dict(zip(self.Get('os_disk_dev'),
self.Get('os_disk_options')))
diskOpts = dict(filter(lambda x:x[1],
zip(self.Get('os_disk_dev'),
self.Get('os_disk_options'))))
return map(lambda x:diskOpts.get(x[0],x[1]),
map(lambda x:(x[0],FileSystemManager.getDefaultOpt(x[1])),
self.ZipVars('os_install_disk_dev',

Loading…
Cancel
Save