Comment 9 for bug 708624

Revision history for this message
onox (onox) wrote :

Around line 280 in hardware-sensors.py, you should see this block:

sensor_default_settings = {
            # Sensor settings
            "ids": [str(sensor.id) for sensor in sensors],
            "labels": [sensor.label for sensor in sensors],
            "show": [sensor.show for sensor in sensors],
            "dialog_row": range(1, len(sensors) + 1),
            "in_icon": [sensor.in_icon for sensor in sensors],
            "high_values": [sensor.high_value for sensor in sensors],
            "low_values": [sensor.low_value for sensor in sensors],
            "high_alarms": [sensor.alarm_on_high for sensor in sensors],
            "low_alarms": [sensor.alarm_on_low for sensor in sensors]
        }

        # Load settings and replace with defaults if not set.
        for key, value in sensor_default_settings.iteritems():
            if key not in self.applet.settings:
                self.applet.settings[key] = value

Put a # in front of every row or just delete the whole block. I don't think it solves the issue but it seems to be dead code.

Find near line 340 the following:

# Save all sensor settings.
settings = self.applet.settings

Put a # in front of it or delete it.

--------------------------------------------------------------------------------

Now, go to line 730, near it you should see:

def label_edited_cb(bla bla bla

Insert a new line below it and put there:

print "label edited"

Now see if you see that text being printed when the applet loads.

In that method (label_edited_cb) you should see an assignment to self.applet.settings["labels"]

Do print self.applet.settings["labels"] before and after that assignment.