def search(self, *args): logging.info("Location search pressed") model = self.ui["tree_loc"].get_model() for loc in location.search(self.ui["txtbx_loc_search"].get_text()): iter = model.append() model.set(iter, 0, loc.name, 1, loc.longitude, 2, loc.latitude, 3, loc) logging.debug(str(loc))
def parseRangePart(self, p): if p.isdigit(): return int(p) # Order matters! This case can contain the next one with other semantics. if p.startswith('/') or p.startswith('?'): if p.startswith('?'): return location.reverse_search(self.view, p[1:-1], end=self.view.sel()[0].begin()) return location.search(self.view, p[1:-1]) if p in ('$', '.'): return location.calculate_relative_ref(self.view, p)