def save_settings(self): conf = (("DEFAULT", "interval", self.interval), ("DEFAULT", "counts", self.scounts), ("DEFAULT", "iconmode", self.iconmode), ("DEFAULT", "iconcache", self.iconcache), ("DEFAULT", "userstream", self.userstream), ("DEFAULT", "color", self.status_color), (self.twitter.my_name, "footer", self.msgfooter)) Config.save_section(conf)
def close(self, widget): window = self.builder.get_object("window1") # Save Allocation (window position, size) alloc = repr(window.allocation) Config.save("DEFAULT", "allocation", alloc) # hide window window.hide_all() # Stop Icon Refresh self.iconstore.stop()
def read_settings(self): # Read settings d = Config.get_section("DEFAULT") self.interval = eval(d.get("interval", str(self.interval))) self.alloc = eval(d.get("allocation", str(self.alloc))) self.scounts = eval(d.get("counts", str(self.scounts))) self.iconmode = eval(d.get("iconmode", str(self.iconmode))) self.iconcache = eval(d.get("iconcache", str(self.iconcache))) self.userstream = eval(d.get("userstream", str(self.userstream))) self.status_color = eval(d.get("color", str(self.status_color))) u = Config.get_section(self.twitter.my_name) self.msgfooter = u.get("footer", "")