def animate_in(anim=True): """Fade in all the map actors.""" for i in range(Gst.get_int('animation-steps') if anim else 1, 0, -1): for actor in (Crosshair, Box, Scale): actor.set_opacity(256 - i) Widgets.redraw_interface() sleep(0.01)
def search_completed(self, entry, model, itr): """Go to the selected location.""" self.last_search = itr.copy() MapView.emit('realize') MapView.set_zoom_level(MapView.get_max_zoom_level()) Widgets.redraw_interface() MapView.center_on(*model.get(itr, LATITUDE, LONGITUDE)) MapView.set_zoom_level(11)
def offset_handler(self, *ignore): """When the offset is changed, update the loaded photos.""" for i, photo in enumerate(self.photos): if not i % 10: Widgets.redraw_interface() photo.calculate_timestamp(self.offset)