diff options
-rw-r--r-- | iw/xconfig_gui.py | 15 | ||||
-rw-r--r-- | textw/xconfig_text.py | 14 |
2 files changed, 22 insertions, 7 deletions
diff --git a/iw/xconfig_gui.py b/iw/xconfig_gui.py index 1ac3c0ce2..852fb0972 100644 --- a/iw/xconfig_gui.py +++ b/iw/xconfig_gui.py @@ -423,10 +423,13 @@ class MonitorWindow (InstallWindow): if self.currentMonitor[:len(ddc_monitor_string)] == ddc_monitor_string: idname = "DDCPROBED" + monname = self.currentMonitor[len(ddc_monitor_string)+3:] elif self.currentMonitor == unprobed_monitor_string: idname = "Unprobed Monitor" + monname = "Unprobed Monitor" else: idname = self.currentMonitor + monname = self.currentMonitor # XXX - this is messed up - we set the monitor object in instdata # to the current values, then we have to push it into the @@ -434,7 +437,7 @@ class MonitorWindow (InstallWindow): self.monitor.setSpecs(monHoriz, monVert, id=idname, - name=self.currentMonitor) + name=monname) # shove into hw state object, force it to recompute available modes self.xsetup.xhwstate.monitor = self.monitor @@ -645,20 +648,22 @@ class MonitorWindow (InstallWindow): #--Add a category for a DDC probed monitor if a DDC monitor was probed self.ddcmon = self.monitor.getDDCProbeResults() if self.ddcmon: - title = ddc_monitor_string + " - " + self.ddcmon[1] + title = ddc_monitor_string + monentry = title + " - " + self.ddcmon[1] else: title = unprobed_monitor_string + monentry = title man = title toplevels[man] = self.monitorstore.append(None) self.monitorstore.set_value(toplevels[man], 0, title) iter = self.monitorstore.append(toplevels[man]) - self.monitorstore.set_value(iter, 0, title) + self.monitorstore.set_value(iter, 0, monentry) # set as current monitor if necessary if self.origMonitorID == "DDCPROBED" or self.origMonitorID == "Unprobed Monitor": - self.currentMonitor = title - self.origMonitorName = title + self.currentMonitor = monentry + self.origMonitorName = monentry # now insert rest of monitors, unless we match the ddc probed id for man in keys: diff --git a/textw/xconfig_text.py b/textw/xconfig_text.py index 66e198835..941ce147e 100644 --- a/textw/xconfig_text.py +++ b/textw/xconfig_text.py @@ -384,6 +384,13 @@ class MonitorWindow: "31.5", "50-61") else: selMonitor = self.monitor.lookupMonitorByName(selMonitorName) + + # if lookup failed fail back to unprobed monitor + # should fix reports of tracebacks because selMonitor was None + if selMonitor is None: + selMonitor = (unprobed_monitor_string, + unprobed_monitor_string, + "31.5", "50-61") bb = ButtonBar (screen, (TEXT_OK_BUTTON, (_("Default"), "default"), TEXT_BACK_BUTTON)) @@ -453,16 +460,19 @@ class MonitorWindow: # store results selMonitorName = self.currentMonitor if selMonitorName[:len(ddc_monitor_string)] == ddc_monitor_string: - selMonitor = self.ddcmon + selMonitor = ("DDCPROBED",) + self.ddcmon[1:] + elif selMonitorName == unprobed_monitor_string: selMonitor = (unprobed_monitor_string, unprobed_monitor_string, "31.5", "50-61") else: selMonitor = self.monitor.lookupMonitorByName(selMonitorName) + # field 1 and two are reverse apparently from what ddcmon returns?! + selMonitor = (selMonitor[1], selMonitor[0], selMonitor[2], selMonitor[3]) if selMonitor: self.monitor.setSpecs(hval, vval, id=selMonitor[0], - name=selMonitor[0]) + name=selMonitor[1]) # shove into hw state object, force it to recompute available modes self.xsetup.xhwstate.monitor = self.monitor |