+ def update(self, widget, data):
+ """ Start update process """
+ self.win.set_title(self.app_title)
+ self.location.reset()
+ if getattr(self, 'pannable_area', None):
+ self.win.remove(self.pannable_area)
+ self.add_button_area()
+ self.location.update_location()
+ Thread(target=self.update_gigs).start()
+
+ def update_gigs(self):
+ """ Get gig info """
+ gobject.idle_add(self.show_message, "Getting events")
+
+ if not 'applications' in os.path.abspath(__file__):
+ # if no gps fix wait
+ while not self.location.lat or not self.location.long:
+ time.sleep(1)
+ else:
+ self.location.lat = float(51.517369)
+ self.location.long = float(-0.082998)
+
+ events = self.events.get_events(self.location.lat,
+ self.location.long,
+ self.distance,)
+ gobject.idle_add(self.show_events, events)
+ gobject.idle_add(self.hide_message)
+ return True
+