self.refresh()
self.lock.wait()
except:
- pass
+ # TODO: Find out which exceptions to catch here. Catching
+ # and silencing all exceptions is not a good idea.
+ raise
restore_gui(self)
def exit(self):
""" Changes the currently selected item to index. """
self.view.set_list(self.items(),index % len(self.items()))
+ def selected_item(self):
+ """ Returns the (title of the) currently selected list item. """
+ if not self.items_cache:
+ return None # No items, so none is selected.
+ return self.items_cache[self.selected_index()]
+
+
def selected_index(self):
""" Returns the currently selected index. """
if not self.current_index is None: