def delete_event(self, widget, data=None): if self.settings.latitude != self.latsetting.get_text(): self.xflux_controller.set_xflux_latitude( self.latsetting.get_text()) if self.settings.longitude != self.lonsetting.get_text(): self.xflux_controller.set_xflux_longitude( self.lonsetting.get_text()) if self.settings.zipcode != self.zipsetting.get_text(): self.xflux_controller.set_xflux_zipcode( self.zipsetting.get_text()) colsetting_temperature = settings.key_to_temperature( self.colsetting.get_active()) if self.settings.color != colsetting_temperature: self.xflux_controller.color = colsetting_temperature if self.autostart.get_active(): self.xflux_controller.set_autostart(True) else: self.xflux_controller.set_autostart(False) if self.latsetting.get_text() == "" \ and self.zipsetting.get_text() == "": self.display_no_zipcode_or_latitude_error_box() return True self.window.hide() return False
def delete_event(self, widget, data=None): if self.settings.latitude != self.latsetting.get_text(): self.xflux_controller.set_xflux_latitude( self.latsetting.get_text()) if self.settings.longitude != self.lonsetting.get_text(): self.xflux_controller.set_xflux_longitude( self.lonsetting.get_text()) if self.settings.zipcode != self.zipsetting.get_text(): self.xflux_controller.set_xflux_zipcode(self.zipsetting.get_text()) colsetting_temperature = settings.key_to_temperature( self.colsetting.get_active()) if self.settings.color != colsetting_temperature: self.xflux_controller.color = colsetting_temperature if self.autostart.get_active(): self.xflux_controller.set_autostart(True) else: self.xflux_controller.set_autostart(False) if self.latsetting.get_text() == "" \ and self.zipsetting.get_text() == "": self.display_no_zipcode_or_latitude_error_box() return True self.window.hide() return True
def preview_click_event(self, widget, data=None): colsetting_temperature = settings.key_to_temperature( self.colsetting.get_active()) self.xflux_controller.preview_color(colsetting_temperature)