def openClicked(self, button): if self.widgets["createNew"].get_active(): perspective = perspective_manager.get_perspective("database") perspective.create_database() else: tree_iter = self.recent_combo.get_active_iter() if tree_iter is None: return else: model = self.recent_combo.get_model() uri = model[tree_iter][0] try: urlopen(unquote(uri)).close() perspective = perspective_manager.get_perspective("database") perspective.open_chessfile(unquote(uri)) recent_manager.add_item(uri) except (IOError, OSError): # shomething wrong whit the uri recent_manager.remove_item(uri)
def update_recent(self, gamemodel, uri): if isinstance(uri, str): path = url2pathname(uri) recent_manager.add_item("file:" + pathname2url(path))
def on_recent_game_activated(self, uri): if isinstance(uri, str): path = url2pathname(uri) recent_manager.add_item("file:" + pathname2url(path))