def edit(self, handle): """ Edit the media object with the given handle. """ media = self.db.get_media_from_handle(handle) try: EditMedia(self.dbstate, self.uistate, [], media) except WindowActiveError: pass
def edit(self, obj): """ Edit the selected objects in the EditMedia dialog """ for handle in self.selected_handles(): object = self.dbstate.db.get_object_from_handle(handle) try: EditMedia(self.dbstate, self.uistate, [], object) except WindowActiveError: pass
def add(self, obj): """Add a new media object to the media list""" try: EditMedia(self.dbstate, self.uistate, [], MediaObject()) except WindowActiveError: pass